remove paperpackage stuff (fixes bug 1929)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10352 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2005-07-25 13:45:17 +00:00
parent 00ef03a081
commit 267b209869
5 changed files with 19 additions and 76 deletions

View File

@ -1,3 +1,8 @@
2005-07-24 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* GDocument.[Ch], glade/document.glade: remove remaining
paperpackage bits
2005-07-18 José Matos <jamatos@fc.up.pt>
* GDocument.C: new file format, remove support for a4.sty,

View File

@ -207,13 +207,9 @@ void GDocument::doBuild()
// *** End "Page" Page ***
// *** Begin "Margins" Page ***
xml_->get_widget("Margins", box);
box->pack_start(marginscombo_, true, true, 0);
box->show_all();
marginscombo_.signal_changed().connect(
xml_->get_widget("DefaultMargins", defaultmargins_);
defaultmargins_->signal_clicked().connect(
sigc::mem_fun(*this, &GDocument::marginsChanged));
pagesizecombo_.signal_changed().connect(
sigc::mem_fun(*this, &GDocument::populateMargins));
xml_->get_widget("MarginTop", mtopspin_);
xml_->get_widget("MarginBottom", mbottomspin_);
@ -347,7 +343,7 @@ void GDocument::update()
comboBoxTextSet(pagestylecombo_, params.pagestyle);
// *** End "Page" Page ***
marginscombo_.set_active(0);
defaultmargins_->set_active(!params.use_geometry);
setWidgetsFromLength(
*(mtopspin_->get_adjustment()),
@ -377,6 +373,7 @@ void GDocument::update()
*(mfootskipspin_->get_adjustment()),
mfootskipunitcombo_,
LyXLength(params.footskip));
marginsChanged();
// *** End "Margins" Page ***
@ -498,15 +495,7 @@ void GDocument::apply()
// *** End "Page" Page ***
// *** Begin "Margins" Page ***
int psize = pagesizecombo_.get_active_row_number();
bool geom_papersize = (psize == 1 || psize == 5 || psize == 8 || psize == 9);
params.use_geometry =
(marginscombo_.get_active_row_number() == 1 || geom_papersize);
int margin = marginscombo_.get_active_row_number();
if (margin > 0) {
margin = margin - 1;
}
params.use_geometry = !defaultmargins_->get_active();
params.topmargin = getLengthFromWidgets(
*(mtopspin_->get_adjustment()),
@ -643,36 +632,9 @@ void GDocument::pageSizeChanged()
}
void GDocument::populateMargins()
{
int olditem = marginscombo_.get_active_row_number();
marginscombo_.clear();
// Magic order
marginscombo_.append_text(_("Default"));
marginscombo_.append_text(_("Custom"));
int papersize = pagesizecombo_.get_active_row_number();
if (papersize < 0)
papersize = 0;
bool const a4size = (papersize == 6 || papersize == 0
&& lyxrc.default_papersize == PAPER_A4);
if (a4size && portraitradio_->get_active()) {
marginscombo_.append_text(_("Small margins"));
marginscombo_.append_text(_("Very small margins"));
marginscombo_.append_text(_("Very wide margins"));
} else if (olditem > 1) {
olditem = 0;
}
marginscombo_.set_active(olditem);
}
void GDocument::marginsChanged()
{
bool const custom =
marginscombo_.get_active_row_number() == 1;
bool const custom = !defaultmargins_->get_active();
mtopspin_->set_sensitive(custom);
mbottomspin_->set_sensitive(custom);

View File

@ -74,7 +74,7 @@ private:
// *** End "Page" Page ***
// *** Begin "Margins" Page ***
Gtk::ComboBoxText marginscombo_;
Gtk::CheckButton * defaultmargins_;
Gtk::SpinButton * mtopspin_;
Gtk::SpinButton * mbottomspin_;
Gtk::SpinButton * minnerspin_;
@ -89,7 +89,6 @@ private:
Gtk::ComboBoxText mheadsepunitcombo_;
Gtk::ComboBoxText mheadheightunitcombo_;
Gtk::ComboBoxText mfootskipunitcombo_;
void populateMargins();
void marginsChanged();
// *** End "Margins" Page ***

View File

@ -1746,18 +1746,16 @@
</child>
<child>
<widget class="GtkLabel" id="label50">
<widget class="GtkCheckButton" id="DefaultMargins">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Ma_rgins:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="left_attach">0</property>
@ -1769,26 +1767,6 @@
</packing>
</child>
<child>
<widget class="GtkVBox" id="Margins">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">3</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="MarginTopUnits">
<property name="visible">True</property>

View File

@ -37,7 +37,6 @@
// FIXME: move this stuff out again
#include "bufferlist.h"
#include "buffer_funcs.h"
#include "lyxfunc.h"
#include "lyxserver.h"
#include "lyxsocket.h"