Jose' Matos wrote:
> > > The only thing that the patch doesn't do is to remove the interface
> > > from the different frontends, could you do it after the patch is
> > > applied?
> >
> > Yes.
>
>   Thanks, the patch was committed.

Attached is the removal of those widgets from the xforms and qt frontends. I 
did not touch gtk, because I cannot compile it at the moment.

Lars, can I apply this?

Jürgen
Index: qt2/QDocument.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QDocument.C,v
retrieving revision 1.83
diff -p -u -r1.83 QDocument.C
--- qt2/QDocument.C	17 Jul 2005 11:17:13 -0000	1.83
+++ qt2/QDocument.C	19 Jul 2005 14:47:21 -0000
@@ -167,8 +167,6 @@ void QDocument::build_dialog()
 	dialog_->textLayoutModule->lspacingCO->insertItem(
 		qt_("Custom"), Spacing::Other);
 
-	// margins
-	dialog_->setMargins(0);
 
 	// Manage the restore, ok, apply, restore and cancel/close buttons
 	bcview().setOK(dialog_->okPB);
@@ -387,13 +385,9 @@ void QDocument::apply()
 
 	// margins
 	params.use_geometry =
-		(dialog_->marginsModule->marginCO->currentItem() == 1
+		(!dialog_->marginsModule->marginCB->isChecked()
 		|| geom_papersize);
 
-	int margin = dialog_->marginsModule->marginCO->currentItem();
-	if (margin > 0) {
-		margin = margin - 1;
-	}
 	MarginsModuleBase const * m(dialog_->marginsModule);
 
 	params.leftmargin = widgetsToLength(m->innerLE, m->innerUnit);
@@ -555,7 +549,6 @@ void QDocument::update_contents()
 		case Spacing::Default: case Spacing::Single: nitem = 0; break;
 	}
 
-
 	// layout
 	dialog_->latexModule->classCO->setCurrentItem(params.textclass);
 
@@ -628,7 +621,6 @@ void QDocument::update_contents()
 	// paper
 	int const psize = params.papersize;
 	dialog_->pageLayoutModule->papersizeCO->setCurrentItem(psize);
-	dialog_->setMargins(psize);
 	dialog_->setCustomPapersize(psize);
 
 	bool const landscape =
@@ -648,11 +640,9 @@ void QDocument::update_contents()
 		dialog_->pageLayoutModule->paperheightUnitCO, params.paperheight, defaultUnit);
 
 	// margins
-
 	MarginsModuleBase * m = dialog_->marginsModule;
 
-	m->marginCO->setCurrentItem(0);
-	dialog_->setCustomMargins(0);
+	dialog_->setMargins(!params.use_geometry);
 
 	lengthToWidgets(m->topLE, m->topUnit,
 		params.topmargin, defaultUnit);
Index: qt2/QDocumentDialog.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QDocumentDialog.C,v
retrieving revision 1.62
diff -p -u -r1.62 QDocumentDialog.C
--- qt2/QDocumentDialog.C	16 Jul 2005 16:57:54 -0000	1.62
+++ qt2/QDocumentDialog.C	19 Jul 2005 14:47:24 -0000
@@ -132,8 +132,8 @@ QDocumentDialog::QDocumentDialog(QDocume
 	connect(textLayoutModule->twoColumnCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
 
 	// margins
-	connect(marginsModule->marginCO, SIGNAL(activated(int)), this, SLOT(setCustomMargins(int)));
-	connect(marginsModule->marginCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
+	connect(marginsModule->marginCB, SIGNAL(toggled(bool)), this, SLOT(setCustomMargins(bool)));
+	connect(marginsModule->marginCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
 	connect(marginsModule->topLE, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
 	connect(marginsModule->topUnit, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
 	connect(marginsModule->bottomLE, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
@@ -150,7 +150,6 @@ QDocumentDialog::QDocumentDialog(QDocume
 	connect(marginsModule->footskipUnit, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
 
 	// page layout
-	connect(pageLayoutModule->papersizeCO, SIGNAL(activated(int)), this, SLOT(setMargins(int)));
 	connect(pageLayoutModule->papersizeCO, SIGNAL(activated(int)), this, SLOT(setCustomPapersize(int)));
 	connect(pageLayoutModule->papersizeCO, SIGNAL(activated(int)), this, SLOT(setCustomPapersize(int)));
 	connect(pageLayoutModule->portraitRB, SIGNAL(toggled(bool)), this, SLOT(portraitChanged()));
@@ -266,23 +265,10 @@ void QDocumentDialog::portraitChanged()
 	setMargins(pageLayoutModule->papersizeCO->currentItem());
 }
 
-void QDocumentDialog::setMargins(int papersize)
+void QDocumentDialog::setMargins(bool custom)
 {
-	int olditem = marginsModule->marginCO->currentItem();
-	marginsModule->marginCO->clear();
-	marginsModule->marginCO->insertItem(qt_("Default"));
-	marginsModule->marginCO->insertItem(qt_("Custom"));
-	bool a4size = (papersize == 6 || papersize == 0
-			&& lyxrc.default_papersize == PAPER_A4);
-	if (a4size && pageLayoutModule->portraitRB->isChecked()) {
-		marginsModule->marginCO->insertItem(qt_("Small margins"));
-		marginsModule->marginCO->insertItem(qt_("Very small margins"));
-		marginsModule->marginCO->insertItem(qt_("Very wide margins"));
-	} else if (olditem > 1) {
-		olditem = 0;
-	}
-	marginsModule->marginCO->setCurrentItem(olditem);
-	setCustomMargins(olditem);
+	marginsModule->marginCB->setChecked(custom);
+	setCustomMargins(custom);
 }
 
 
@@ -300,37 +286,35 @@ void QDocumentDialog::setCustomPapersize
 }
 
 
-void QDocumentDialog::setCustomMargins(int margin)
+void QDocumentDialog::setCustomMargins(bool custom)
 {
-	bool const custom = (margin == 1);
-
-	marginsModule->topL->setEnabled(custom);
-	marginsModule->topLE->setEnabled(custom);
-	marginsModule->topUnit->setEnabled(custom);
-
-	marginsModule->bottomL->setEnabled(custom);
-	marginsModule->bottomLE->setEnabled(custom);
-	marginsModule->bottomUnit->setEnabled(custom);
-
-	marginsModule->innerL->setEnabled(custom);
-	marginsModule->innerLE->setEnabled(custom);
-	marginsModule->innerUnit->setEnabled(custom);
-
-	marginsModule->outerL->setEnabled(custom);
-	marginsModule->outerLE->setEnabled(custom);
-	marginsModule->outerUnit->setEnabled(custom);
-
-	marginsModule->headheightL->setEnabled(custom);
-	marginsModule->headheightLE->setEnabled(custom);
-	marginsModule->headheightUnit->setEnabled(custom);
-
-	marginsModule->headsepL->setEnabled(custom);
-	marginsModule->headsepLE->setEnabled(custom);
-	marginsModule->headsepUnit->setEnabled(custom);
-
-	marginsModule->footskipL->setEnabled(custom);
-	marginsModule->footskipLE->setEnabled(custom);
-	marginsModule->footskipUnit->setEnabled(custom);
+	marginsModule->topL->setEnabled(!custom);
+	marginsModule->topLE->setEnabled(!custom);
+	marginsModule->topUnit->setEnabled(!custom);
+
+	marginsModule->bottomL->setEnabled(!custom);
+	marginsModule->bottomLE->setEnabled(!custom);
+	marginsModule->bottomUnit->setEnabled(!custom);
+
+	marginsModule->innerL->setEnabled(!custom);
+	marginsModule->innerLE->setEnabled(!custom);
+	marginsModule->innerUnit->setEnabled(!custom);
+
+	marginsModule->outerL->setEnabled(!custom);
+	marginsModule->outerLE->setEnabled(!custom);
+	marginsModule->outerUnit->setEnabled(!custom);
+
+	marginsModule->headheightL->setEnabled(!custom);
+	marginsModule->headheightLE->setEnabled(!custom);
+	marginsModule->headheightUnit->setEnabled(!custom);
+
+	marginsModule->headsepL->setEnabled(!custom);
+	marginsModule->headsepLE->setEnabled(!custom);
+	marginsModule->headsepUnit->setEnabled(!custom);
+
+	marginsModule->footskipL->setEnabled(!custom);
+	marginsModule->footskipLE->setEnabled(!custom);
+	marginsModule->footskipUnit->setEnabled(!custom);
 }
 
 
Index: qt2/QDocumentDialog.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QDocumentDialog.h,v
retrieving revision 1.24
diff -p -u -r1.24 QDocumentDialog.h
--- qt2/QDocumentDialog.h	12 May 2005 10:16:04 -0000	1.24
+++ qt2/QDocumentDialog.h	19 Jul 2005 14:47:24 -0000
@@ -57,9 +57,9 @@ public slots:
 
 protected slots:
 	void setLSpacing(int);
-	void setMargins(int);
+	void setMargins(bool);
 	void setCustomPapersize(int);
-	void setCustomMargins(int);
+	void setCustomMargins(bool);
 	void setSkip(int);
 	void enableSkip(bool);
 	void portraitChanged();
Index: qt2/ui/MarginsModuleBase.ui
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/ui/MarginsModuleBase.ui,v
retrieving revision 1.5
diff -p -u -r1.5 MarginsModuleBase.ui
--- qt2/ui/MarginsModuleBase.ui	7 May 2005 12:12:24 -0000	1.5
+++ qt2/ui/MarginsModuleBase.ui	19 Jul 2005 14:47:26 -0000
@@ -13,13 +13,13 @@
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>337</width>
-            <height>370</height>
+            <width>329</width>
+            <height>373</height>
         </rect>
     </property>
     <property stdset="1">
         <name>caption</name>
-        <string></string>
+        <string>MarginsModuleBase</string>
     </property>
     <grid>
         <property stdset="1">
@@ -30,232 +30,29 @@
             <name>spacing</name>
             <number>6</number>
         </property>
-        <widget row="1"  column="0" >
-            <class>QLabel</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>topL</cstring>
-            </property>
-            <property stdset="1">
-                <name>enabled</name>
-                <bool>false</bool>
-            </property>
-            <property stdset="1">
-                <name>text</name>
-                <string>&amp;Top:</string>
-            </property>
-            <property>
-                <name>buddy</name>
-                <cstring>topLE</cstring>
-            </property>
-        </widget>
-        <widget row="2"  column="0" >
-            <class>QLabel</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>bottomL</cstring>
-            </property>
-            <property stdset="1">
-                <name>enabled</name>
-                <bool>false</bool>
-            </property>
-            <property stdset="1">
-                <name>text</name>
-                <string>&amp;Bottom:</string>
-            </property>
-            <property>
-                <name>buddy</name>
-                <cstring>bottomLE</cstring>
-            </property>
-        </widget>
-        <widget row="3"  column="0" >
-            <class>QLabel</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>innerL</cstring>
-            </property>
-            <property stdset="1">
-                <name>enabled</name>
-                <bool>false</bool>
-            </property>
-            <property stdset="1">
-                <name>text</name>
-                <string>&amp;Inner:</string>
-            </property>
-            <property>
-                <name>buddy</name>
-                <cstring>innerLE</cstring>
-            </property>
-        </widget>
-        <widget row="4"  column="0" >
-            <class>QLabel</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>outerL</cstring>
-            </property>
-            <property stdset="1">
-                <name>enabled</name>
-                <bool>false</bool>
-            </property>
-            <property stdset="1">
-                <name>text</name>
-                <string>O&amp;uter:</string>
-            </property>
-            <property>
-                <name>buddy</name>
-                <cstring>outerLE</cstring>
-            </property>
-        </widget>
         <widget row="0"  column="0" >
-            <class>QLabel</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>marginL</cstring>
-            </property>
-            <property stdset="1">
-                <name>text</name>
-                <string>&amp;Margins:</string>
-            </property>
-            <property>
-                <name>buddy</name>
-                <cstring>marginCO</cstring>
-            </property>
-        </widget>
-        <widget row="1"  column="1" >
-            <class>QLineEdit</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>topLE</cstring>
-            </property>
-            <property stdset="1">
-                <name>enabled</name>
-                <bool>false</bool>
-            </property>
-        </widget>
-        <widget row="2"  column="1" >
-            <class>QLineEdit</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>bottomLE</cstring>
-            </property>
-            <property stdset="1">
-                <name>enabled</name>
-                <bool>false</bool>
-            </property>
-            <property stdset="1">
-                <name>text</name>
-                <string></string>
-            </property>
-        </widget>
-        <widget row="4"  column="1" >
-            <class>QLineEdit</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>outerLE</cstring>
-            </property>
-            <property stdset="1">
-                <name>enabled</name>
-                <bool>false</bool>
-            </property>
-        </widget>
-        <widget row="7"  column="0" >
-            <class>QLabel</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>footskipL</cstring>
-            </property>
-            <property stdset="1">
-                <name>enabled</name>
-                <bool>false</bool>
-            </property>
-            <property stdset="1">
-                <name>text</name>
-                <string>&amp;Foot skip:</string>
-            </property>
-            <property>
-                <name>buddy</name>
-                <cstring>footskipLE</cstring>
-            </property>
-        </widget>
-        <widget row="5"  column="0" >
-            <class>QLabel</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>headsepL</cstring>
-            </property>
-            <property stdset="1">
-                <name>enabled</name>
-                <bool>false</bool>
-            </property>
-            <property stdset="1">
-                <name>text</name>
-                <string>Head &amp;sep:</string>
-            </property>
-            <property>
-                <name>buddy</name>
-                <cstring>headsepLE</cstring>
-            </property>
-        </widget>
-        <widget row="5"  column="1" >
-            <class>QLineEdit</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>headsepLE</cstring>
-            </property>
-            <property stdset="1">
-                <name>enabled</name>
-                <bool>false</bool>
-            </property>
-        </widget>
-        <widget row="6"  column="1" >
-            <class>QLineEdit</class>
+            <class>QCheckBox</class>
             <property stdset="1">
                 <name>name</name>
-                <cstring>headheightLE</cstring>
-            </property>
-            <property stdset="1">
-                <name>enabled</name>
-                <bool>false</bool>
-            </property>
-        </widget>
-        <widget row="6"  column="0" >
-            <class>QLabel</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>headheightL</cstring>
-            </property>
-            <property stdset="1">
-                <name>enabled</name>
-                <bool>false</bool>
+                <cstring>marginCB</cstring>
             </property>
             <property stdset="1">
                 <name>text</name>
-                <string>Head &amp;height:</string>
+                <string>&amp;Default Margins</string>
             </property>
             <property>
-                <name>buddy</name>
-                <cstring>headheightLE</cstring>
+                <name>toolTip</name>
+                <string>Use the margin settings provided by the document class</string>
             </property>
         </widget>
-        <widget row="7"  column="1" >
-            <class>QLineEdit</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>footskipLE</cstring>
-            </property>
-            <property stdset="1">
-                <name>enabled</name>
-                <bool>false</bool>
-            </property>
-        </widget>
-        <spacer row="8"  column="1" >
+        <spacer row="1"  column="1" >
             <property>
                 <name>name</name>
-                <cstring>Spacer21</cstring>
+                <cstring>Spacer22</cstring>
             </property>
             <property stdset="1">
                 <name>orientation</name>
-                <enum>Vertical</enum>
+                <enum>Horizontal</enum>
             </property>
             <property stdset="1">
                 <name>sizeType</name>
@@ -269,14 +66,14 @@
                 </size>
             </property>
         </spacer>
-        <spacer row="3"  column="3" >
+        <spacer row="2"  column="0" >
             <property>
                 <name>name</name>
-                <cstring>Spacer22</cstring>
+                <cstring>Spacer21</cstring>
             </property>
             <property stdset="1">
                 <name>orientation</name>
-                <enum>Horizontal</enum>
+                <enum>Vertical</enum>
             </property>
             <property stdset="1">
                 <name>sizeType</name>
@@ -290,107 +87,364 @@
                 </size>
             </property>
         </spacer>
-        <widget row="1"  column="2" >
-            <class>LengthCombo</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>topUnit</cstring>
-            </property>
-            <property stdset="1">
-                <name>enabled</name>
-                <bool>false</bool>
-            </property>
-        </widget>
-        <widget row="2"  column="2" >
-            <class>LengthCombo</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>bottomUnit</cstring>
-            </property>
-            <property stdset="1">
-                <name>enabled</name>
-                <bool>false</bool>
-            </property>
-        </widget>
-        <widget row="3"  column="2" >
-            <class>LengthCombo</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>innerUnit</cstring>
-            </property>
-            <property stdset="1">
-                <name>enabled</name>
-                <bool>false</bool>
-            </property>
-        </widget>
-        <widget row="3"  column="1" >
-            <class>QLineEdit</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>innerLE</cstring>
-            </property>
-            <property stdset="1">
-                <name>enabled</name>
-                <bool>false</bool>
-            </property>
-        </widget>
-        <widget row="4"  column="2" >
-            <class>LengthCombo</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>outerUnit</cstring>
-            </property>
-            <property stdset="1">
-                <name>enabled</name>
-                <bool>false</bool>
-            </property>
-        </widget>
-        <widget row="5"  column="2" >
-            <class>LengthCombo</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>headsepUnit</cstring>
-            </property>
-            <property stdset="1">
-                <name>enabled</name>
-                <bool>false</bool>
-            </property>
-        </widget>
-        <widget row="6"  column="2" >
-            <class>LengthCombo</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>headheightUnit</cstring>
-            </property>
-            <property stdset="1">
-                <name>enabled</name>
-                <bool>false</bool>
-            </property>
-        </widget>
-        <widget row="7"  column="2" >
-            <class>LengthCombo</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>footskipUnit</cstring>
-            </property>
-            <property stdset="1">
-                <name>enabled</name>
-                <bool>false</bool>
-            </property>
-        </widget>
-        <widget row="0"  column="1"  rowspan="1"  colspan="2" >
-            <class>QComboBox</class>
+        <widget row="1"  column="0" >
+            <class>QLayoutWidget</class>
             <property stdset="1">
                 <name>name</name>
-                <cstring>marginCO</cstring>
-            </property>
-            <property stdset="1">
-                <name>sizePolicy</name>
-                <sizepolicy>
-                    <hsizetype>5</hsizetype>
-                    <vsizetype>0</vsizetype>
-                </sizepolicy>
+                <cstring>Layout5</cstring>
             </property>
+            <hbox>
+                <property stdset="1">
+                    <name>margin</name>
+                    <number>0</number>
+                </property>
+                <property stdset="1">
+                    <name>spacing</name>
+                    <number>6</number>
+                </property>
+                <widget>
+                    <class>QLayoutWidget</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>Layout4</cstring>
+                    </property>
+                    <vbox>
+                        <property stdset="1">
+                            <name>margin</name>
+                            <number>0</number>
+                        </property>
+                        <property stdset="1">
+                            <name>spacing</name>
+                            <number>6</number>
+                        </property>
+                        <widget>
+                            <class>QLabel</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>topL</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>enabled</name>
+                                <bool>false</bool>
+                            </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>&amp;Top:</string>
+                            </property>
+                            <property>
+                                <name>buddy</name>
+                                <cstring>topLE</cstring>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>QLabel</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>bottomL</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>enabled</name>
+                                <bool>false</bool>
+                            </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>&amp;Bottom:</string>
+                            </property>
+                            <property>
+                                <name>buddy</name>
+                                <cstring>bottomLE</cstring>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>QLabel</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>innerL</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>enabled</name>
+                                <bool>false</bool>
+                            </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>&amp;Inner:</string>
+                            </property>
+                            <property>
+                                <name>buddy</name>
+                                <cstring>innerLE</cstring>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>QLabel</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>outerL</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>enabled</name>
+                                <bool>false</bool>
+                            </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>O&amp;uter:</string>
+                            </property>
+                            <property>
+                                <name>buddy</name>
+                                <cstring>outerLE</cstring>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>QLabel</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>headsepL</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>enabled</name>
+                                <bool>false</bool>
+                            </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>Head &amp;sep:</string>
+                            </property>
+                            <property>
+                                <name>buddy</name>
+                                <cstring>headsepLE</cstring>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>QLabel</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>headheightL</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>enabled</name>
+                                <bool>false</bool>
+                            </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>Head &amp;height:</string>
+                            </property>
+                            <property>
+                                <name>buddy</name>
+                                <cstring>headheightLE</cstring>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>QLabel</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>footskipL</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>enabled</name>
+                                <bool>false</bool>
+                            </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>&amp;Foot skip:</string>
+                            </property>
+                            <property>
+                                <name>buddy</name>
+                                <cstring>footskipLE</cstring>
+                            </property>
+                        </widget>
+                    </vbox>
+                </widget>
+                <widget>
+                    <class>QLayoutWidget</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>Layout3</cstring>
+                    </property>
+                    <vbox>
+                        <property stdset="1">
+                            <name>margin</name>
+                            <number>0</number>
+                        </property>
+                        <property stdset="1">
+                            <name>spacing</name>
+                            <number>6</number>
+                        </property>
+                        <widget>
+                            <class>QLineEdit</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>topLE</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>enabled</name>
+                                <bool>false</bool>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>QLineEdit</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>bottomLE</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>enabled</name>
+                                <bool>false</bool>
+                            </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string></string>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>QLineEdit</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>innerLE</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>enabled</name>
+                                <bool>false</bool>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>QLineEdit</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>outerLE</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>enabled</name>
+                                <bool>false</bool>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>QLineEdit</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>headsepLE</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>enabled</name>
+                                <bool>false</bool>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>QLineEdit</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>headheightLE</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>enabled</name>
+                                <bool>false</bool>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>QLineEdit</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>footskipLE</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>enabled</name>
+                                <bool>false</bool>
+                            </property>
+                        </widget>
+                    </vbox>
+                </widget>
+                <widget>
+                    <class>QLayoutWidget</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>Layout2</cstring>
+                    </property>
+                    <vbox>
+                        <property stdset="1">
+                            <name>margin</name>
+                            <number>0</number>
+                        </property>
+                        <property stdset="1">
+                            <name>spacing</name>
+                            <number>6</number>
+                        </property>
+                        <widget>
+                            <class>LengthCombo</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>topUnit</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>enabled</name>
+                                <bool>false</bool>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>LengthCombo</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>bottomUnit</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>enabled</name>
+                                <bool>false</bool>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>LengthCombo</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>innerUnit</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>enabled</name>
+                                <bool>false</bool>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>LengthCombo</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>outerUnit</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>enabled</name>
+                                <bool>false</bool>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>LengthCombo</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>headsepUnit</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>enabled</name>
+                                <bool>false</bool>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>LengthCombo</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>headheightUnit</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>enabled</name>
+                                <bool>false</bool>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>LengthCombo</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>footskipUnit</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>enabled</name>
+                                <bool>false</bool>
+                            </property>
+                        </widget>
+                    </vbox>
+                </widget>
+            </hbox>
         </widget>
     </grid>
 </widget>
@@ -418,7 +472,6 @@
     </image>
 </images>
 <tabstops>
-    <tabstop>marginCO</tabstop>
     <tabstop>topLE</tabstop>
     <tabstop>bottomLE</tabstop>
     <tabstop>innerLE</tabstop>
Index: xforms/FormDocument.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/FormDocument.C,v
retrieving revision 1.178
diff -p -u -r1.178 FormDocument.C
--- xforms/FormDocument.C	17 Jul 2005 11:17:13 -0000	1.178
+++ xforms/FormDocument.C	19 Jul 2005 14:47:29 -0000
@@ -209,7 +209,6 @@ void FormDocument::build()
 	paper_.reset(build_document_paper(this));
 
 	// disable for read-only documents
-	bcview().addReadOnly(paper_->choice_paperpackage);
 	bcview().addReadOnly(paper_->radio_portrait);
 	bcview().addReadOnly(paper_->radio_landscape);
 	bcview().addReadOnly(paper_->choice_papersize);
@@ -260,11 +259,6 @@ void FormDocument::build()
 			_(" Default | Custom | US letter | US legal "
 			  "| US executive | A3 | A4 | A5 "
 			  "| B3 | B4 | B5 ").c_str());
-	fl_addto_choice(paper_->choice_paperpackage,
-			_(" None "
-			  "| Small Margins "
-			  "| Very small Margins "
-			  "| Very wide Margins ").c_str());
 
 	fl_addto_choice(paper_->choice_custom_width_units,  units.c_str());
 	fl_addto_choice(paper_->choice_custom_height_units, units.c_str());
@@ -547,10 +541,6 @@ ButtonPolicy::SMInput FormDocument::inpu
 		params.useClassDefaults();
 		UpdateLayoutDocument(params);
 
-	} else if (ob == paper_->radio_landscape) {
-		fl_set_choice(paper_->choice_paperpackage,
-			      PACKAGE_NONE + 1);
-
 	} else if (ob == paper_->choice_papersize) {
 		int const paperchoice = fl_get_choice(paper_->choice_papersize);
 		bool const defsize = paperchoice == 1;
@@ -623,25 +613,6 @@ ButtonPolicy::SMInput FormDocument::inpu
 			fl_set_choice_text(paper_->choice_foot_skip_units,
 					   default_unit.c_str());
 
-	} else if (ob == paper_->choice_paperpackage &&
-		   fl_get_choice(paper_->choice_paperpackage) != 1) {
-
-		fl_set_button(paper_->check_use_geometry, 0);
-		setEnabled(paper_->input_top_margin,    false);
-		setEnabled(paper_->input_bottom_margin, false);
-		setEnabled(paper_->input_inner_margin,  false);
-		setEnabled(paper_->input_outer_margin,  false);
-		setEnabled(paper_->input_head_height,   false);
-		setEnabled(paper_->input_head_sep,      false);
-		setEnabled(paper_->input_foot_skip,     false);
-		setEnabled(paper_->choice_top_margin_units,    false);
-		setEnabled(paper_->choice_bottom_margin_units, false);
-		setEnabled(paper_->choice_inner_margin_units,  false);
-		setEnabled(paper_->choice_outer_margin_units,  false);
-		setEnabled(paper_->choice_head_height_units,   false);
-		setEnabled(paper_->choice_head_sep_units,      false);
-		setEnabled(paper_->choice_foot_skip_units,     false);
-
 	} else if (ob == paper_->check_use_geometry) {
 		// don't allow switching geometry off in custom papersize
 		// mode nor in A3, B3, and B4
@@ -649,9 +620,6 @@ ButtonPolicy::SMInput FormDocument::inpu
 		if (choice == 2 || choice == 6 || choice == 9 || choice == 10)
 			fl_set_button(paper_->check_use_geometry, 1);
 
-		fl_set_choice(paper_->choice_paperpackage,
-			      PACKAGE_NONE + 1);
-
 		bool const use_geom = fl_get_button(paper_->check_use_geometry);
 		setEnabled(paper_->input_top_margin,    use_geom);
 		setEnabled(paper_->input_bottom_margin, use_geom);
@@ -669,20 +637,6 @@ ButtonPolicy::SMInput FormDocument::inpu
 		setEnabled(paper_->choice_foot_skip_units,     use_geom);
 	}
 
-	if (ob == paper_->choice_papersize || ob == paper_->radio_portrait
-	    || ob == paper_->radio_landscape) {
-		// either default papersize (preferences) or document
-		// papersize has to be A4
-		bool const enable = ( fl_get_choice(paper_->choice_papersize) == 1
-				      && lyxrc.default_papersize == PAPER_A4)
-			|| fl_get_choice(paper_->choice_papersize) == 7;
-		if (!enable)
-			fl_set_choice(paper_->choice_paperpackage,
-				      PACKAGE_NONE + 1);
-		setEnabled(paper_->choice_paperpackage,
-			   enable && fl_get_button(paper_->radio_portrait));
-	}
-
 	return ButtonPolicy::SMI_VALID;
 }
 
@@ -1243,12 +1197,6 @@ void FormDocument::paper_update(BufferPa
 		fl_set_button(paper_->radio_landscape, 1);
 	else
 		fl_set_button(paper_->radio_portrait, 1);
-	setEnabled(paper_->choice_paperpackage,
-		   //either default papersize (preferences)
-		   //or document papersize has to be A4
-		   (paperchoice == 7
-		    || paperchoice == 1 && lyxrc.default_papersize == PAPER_A4)
-		   && fl_get_button(paper_->radio_portrait));
 
 	// Default unit choice is cm if metric, inches if US paper.
 	bool const metric = (paperchoice == 1 && lyxrc.default_papersize > PAPER_USEXECUTIVE)
Index: xforms/forms/form_document.fd
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/forms/form_document.fd,v
retrieving revision 1.41
diff -p -u -r1.41 form_document.fd
--- xforms/forms/form_document.fd	13 May 2004 20:44:34 -0000	1.41
+++ xforms/forms/form_document.fd	19 Jul 2005 14:47:32 -0000
@@ -179,7 +179,7 @@ argument: 0
 Name: form_document_paper
 Width: 395
 Height: 320
-Number of Objects: 29
+Number of Objects: 28
 
 --------------------
 class: FL_BOX
@@ -434,24 +434,6 @@ callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 210 175 160 25
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_TOP
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Special (A4 portrait only):|#S
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: choice_paperpackage
-callback: C_FormDialogView_InputCB
-argument: 0
-
---------------------
 class: FL_INPUT
 type: NORMAL_INPUT
 box: 75 180 50 25
@@ -598,7 +580,7 @@ argument: 0
 --------------------
 class: FL_INPUT
 type: NORMAL_INPUT
-box: 280 210 50 25
+box: 280 180 50 25
 boxtype: FL_DOWN_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_LEFT
@@ -616,7 +598,7 @@ argument: 0
 --------------------
 class: FL_CHOICE
 type: NORMAL_CHOICE
-box: 330 210 50 25
+box: 330 180 50 25
 boxtype: FL_FRAME_BOX
 colors: FL_COL1 FL_BLACK
 alignment: FL_ALIGN_LEFT
@@ -634,7 +616,7 @@ argument: 0
 --------------------
 class: FL_INPUT
 type: NORMAL_INPUT
-box: 280 240 50 25
+box: 280 210 50 25
 boxtype: FL_DOWN_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_LEFT
@@ -652,7 +634,7 @@ argument: 0
 --------------------
 class: FL_CHOICE
 type: NORMAL_CHOICE
-box: 330 240 50 25
+box: 330 210 50 25
 boxtype: FL_FRAME_BOX
 colors: FL_COL1 FL_BLACK
 alignment: FL_ALIGN_LEFT
@@ -670,7 +652,7 @@ argument: 0
 --------------------
 class: FL_INPUT
 type: NORMAL_INPUT
-box: 280 270 50 25
+box: 280 250 50 25
 boxtype: FL_DOWN_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_LEFT
@@ -688,7 +670,7 @@ argument: 0
 --------------------
 class: FL_CHOICE
 type: NORMAL_CHOICE
-box: 330 270 50 25
+box: 330 250 50 25
 boxtype: FL_FRAME_BOX
 colors: FL_COL1 FL_BLACK
 alignment: FL_ALIGN_LEFT

Reply via email to