Juergen Spitzmueller wrote:
> Yes, you're right. Try this.

Arghh, I have accidentally snipped the changes in *.h.

Thanks,
Jürgen.
Index: src/frontends/qt2/ChangeLog
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/qt2/ChangeLog,v
retrieving revision 1.389.2.3
diff -u -r1.389.2.3 ChangeLog
--- src/frontends/qt2/ChangeLog	2003/02/07 16:49:19	1.389.2.3
+++ src/frontends/qt2/ChangeLog	2003/02/09 09:25:58
@@ -1,3 +1,8 @@
+2003-02-09  Juergen Spitzmueller  <[EMAIL PROTECTED]>
+
+	* QDocumentDialog.[Ch]: Show A4 packages also when default papersize
+	is A4 (and default chosen) and only in portrait mode.
+
 2003-02-07  John Levon  <[EMAIL PROTECTED]>
 
 	* lyx_gui.C: delete lyxserver pipes (bug 865)
Index: src/frontends/qt2/QDocumentDialog.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/qt2/QDocumentDialog.C,v
retrieving revision 1.20
diff -u -r1.20 QDocumentDialog.C
--- src/frontends/qt2/QDocumentDialog.C	2003/01/16 10:56:48	1.20
+++ src/frontends/qt2/QDocumentDialog.C	2003/02/09 09:26:00
@@ -218,6 +218,8 @@
 		 this , SLOT(setCustomPapersize(int)));
 	connect(paperModule->papersizeCO, SIGNAL(activated(int)),
 		 this , SLOT(setCustomPapersize(int)));
+	connect(paperModule->portraitRB, SIGNAL(toggled(bool)),
+		 this , SLOT(portraitChanged()));
 
 	connect(paperModule->papersizeCO, SIGNAL(activated(int)),
 		 this , SLOT(change_adaptor()));
@@ -333,6 +335,10 @@
 		setSkip(layoutModule->skipCO->currentItem());
 }
 
+void QDocumentDialog::portraitChanged()
+{
+	setMargins(paperModule->papersizeCO->currentItem());
+}
 
 void QDocumentDialog::setMargins(int papersize)
 {
@@ -340,7 +346,9 @@
 	marginsModule->marginCO->clear();
 	marginsModule->marginCO->insertItem(qt_("Default"));
 	marginsModule->marginCO->insertItem(qt_("Custom"));
-	if (papersize == 6) {
+	bool a4size = (papersize == 6 || papersize == 0
+			&& lyxrc.default_papersize == BufferParams::PAPER_A4PAPER);
+	if (a4size && paperModule->portraitRB->isChecked()) {
 		marginsModule->marginCO->insertItem(qt_("Small margins"));
 		marginsModule->marginCO->insertItem(qt_("Very small margins"));
 		marginsModule->marginCO->insertItem(qt_("Very wide margins"));
Index: src/frontends/qt2/QDocumentDialog.h
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/qt2/QDocumentDialog.h,v
retrieving revision 1.10
diff -u -r1.10 QDocumentDialog.h
--- src/frontends/qt2/QDocumentDialog.h	2003/01/16 10:56:49	1.10
+++ src/frontends/qt2/QDocumentDialog.h	2003/02/09 09:26:00
@@ -57,6 +57,7 @@
 	void setCustomMargins(int);
 	void setSkip(int);
 	void enableSkip(bool);
+	void portraitChanged();
 	void classChanged();
 
 protected:
 

Reply via email to