mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
fix bug 844, and more
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6129 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
bfa935070c
commit
bd4302e068
@ -1,3 +1,13 @@
|
|||||||
|
2003-02-10 Juergen Spitzmueller <j.spitzmueller@gmx.de>
|
||||||
|
|
||||||
|
* QDocument.C: Allow qt users actually to use another
|
||||||
|
papersize than default (set params.paperpackage).
|
||||||
|
|
||||||
|
2003-02-09 Juergen Spitzmueller <j.spitzmueller@gmx.de>
|
||||||
|
|
||||||
|
* QDocumentDialog.[Ch]: Show A4 packages also when default
|
||||||
|
papersize is A4 (and default chosen) and only in portrait mode.
|
||||||
|
|
||||||
2003-02-12 Dekel Tsur <dekelts@tau.ac.il>
|
2003-02-12 Dekel Tsur <dekelts@tau.ac.il>
|
||||||
|
|
||||||
* qfont_metrics.C: Add checks for lyxrc.use_gui.
|
* qfont_metrics.C: Add checks for lyxrc.use_gui.
|
||||||
|
@ -332,6 +332,10 @@ void QDocument::apply()
|
|||||||
}
|
}
|
||||||
params.paperpackage = char(margin);
|
params.paperpackage = char(margin);
|
||||||
|
|
||||||
|
// set params.papersize from params.papersize2
|
||||||
|
// and params.paperpackage
|
||||||
|
params.setPaperStuff();
|
||||||
|
|
||||||
MarginsModuleBase const * m(dialog_->marginsModule);
|
MarginsModuleBase const * m(dialog_->marginsModule);
|
||||||
|
|
||||||
params.leftmargin = widgetsToLength(m->innerLE, m->innerUnit);
|
params.leftmargin = widgetsToLength(m->innerLE, m->innerUnit);
|
||||||
|
@ -218,6 +218,8 @@ QDocumentDialog::QDocumentDialog(QDocument * form)
|
|||||||
this , SLOT(setCustomPapersize(int)));
|
this , SLOT(setCustomPapersize(int)));
|
||||||
connect(paperModule->papersizeCO, SIGNAL(activated(int)),
|
connect(paperModule->papersizeCO, SIGNAL(activated(int)),
|
||||||
this , SLOT(setCustomPapersize(int)));
|
this , SLOT(setCustomPapersize(int)));
|
||||||
|
connect(paperModule->portraitRB, SIGNAL(toggled(bool)),
|
||||||
|
this , SLOT(portraitChanged()));
|
||||||
|
|
||||||
connect(paperModule->papersizeCO, SIGNAL(activated(int)),
|
connect(paperModule->papersizeCO, SIGNAL(activated(int)),
|
||||||
this , SLOT(change_adaptor()));
|
this , SLOT(change_adaptor()));
|
||||||
@ -333,6 +335,10 @@ void QDocumentDialog::enableSkip(bool skip)
|
|||||||
setSkip(layoutModule->skipCO->currentItem());
|
setSkip(layoutModule->skipCO->currentItem());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QDocumentDialog::portraitChanged()
|
||||||
|
{
|
||||||
|
setMargins(paperModule->papersizeCO->currentItem());
|
||||||
|
}
|
||||||
|
|
||||||
void QDocumentDialog::setMargins(int papersize)
|
void QDocumentDialog::setMargins(int papersize)
|
||||||
{
|
{
|
||||||
@ -340,7 +346,9 @@ void QDocumentDialog::setMargins(int papersize)
|
|||||||
marginsModule->marginCO->clear();
|
marginsModule->marginCO->clear();
|
||||||
marginsModule->marginCO->insertItem(qt_("Default"));
|
marginsModule->marginCO->insertItem(qt_("Default"));
|
||||||
marginsModule->marginCO->insertItem(qt_("Custom"));
|
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_("Small margins"));
|
||||||
marginsModule->marginCO->insertItem(qt_("Very small margins"));
|
marginsModule->marginCO->insertItem(qt_("Very small margins"));
|
||||||
marginsModule->marginCO->insertItem(qt_("Very wide margins"));
|
marginsModule->marginCO->insertItem(qt_("Very wide margins"));
|
||||||
|
@ -57,6 +57,7 @@ protected slots:
|
|||||||
void setCustomMargins(int);
|
void setCustomMargins(int);
|
||||||
void setSkip(int);
|
void setSkip(int);
|
||||||
void enableSkip(bool);
|
void enableSkip(bool);
|
||||||
|
void portraitChanged();
|
||||||
void classChanged();
|
void classChanged();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2003-02-10 Juergen Spitzmueller <j.spitzmueller@gmx.de>
|
||||||
|
|
||||||
|
* FormDocument.C: Reset paperpackage to NONE when
|
||||||
|
papersize != A4 (bug 844)
|
||||||
|
|
||||||
2003-02-11 Angus Leeming <leeming@lyx.org>
|
2003-02-11 Angus Leeming <leeming@lyx.org>
|
||||||
|
|
||||||
* xforms_helpers.[Ch] (fl_getmcolor): new function; a wrapper for the
|
* xforms_helpers.[Ch] (fl_getmcolor): new function; a wrapper for the
|
||||||
|
@ -584,7 +584,11 @@ ButtonPolicy::SMInput FormDocument::input(FL_OBJECT * ob, long)
|
|||||||
bool const enable = ( fl_get_choice(paper_->choice_papersize) == 1
|
bool const enable = ( fl_get_choice(paper_->choice_papersize) == 1
|
||||||
&& lyxrc.default_papersize == BufferParams::PAPER_A4PAPER )
|
&& lyxrc.default_papersize == BufferParams::PAPER_A4PAPER )
|
||||||
|| fl_get_choice(paper_->choice_papersize) == 7;
|
|| fl_get_choice(paper_->choice_papersize) == 7;
|
||||||
setEnabled(paper_->choice_paperpackage, enable && fl_get_button(paper_->radio_portrait));
|
if (!enable)
|
||||||
|
fl_set_choice(paper_->choice_paperpackage,
|
||||||
|
BufferParams::PACKAGE_NONE + 1);
|
||||||
|
setEnabled(paper_->choice_paperpackage,
|
||||||
|
enable && fl_get_button(paper_->radio_portrait));
|
||||||
}
|
}
|
||||||
|
|
||||||
return ButtonPolicy::SMI_VALID;
|
return ButtonPolicy::SMI_VALID;
|
||||||
|
Loading…
Reference in New Issue
Block a user