Richard Heck wrote: >> Ed wrote: >> ignoring the challenge, i would get rid of those headers all together... > > Yes, well, a different project.
like attached ?
Index: src/frontends/qt4/PanelStack.cpp =================================================================== --- src/frontends/qt4/PanelStack.cpp (revision 19907) +++ src/frontends/qt4/PanelStack.cpp (working copy) @@ -41,6 +41,7 @@ stack_ = new QStackedWidget(this); list_->setColumnCount(1); + list_->setRootIsDecorated(false); // Hide the pointless list header list_->header()->hide(); // QStringList HeaderLabels; Index: src/frontends/qt4/QPrefs.cpp =================================================================== --- src/frontends/qt4/QPrefs.cpp (revision 19907) +++ src/frontends/qt4/QPrefs.cpp (working copy) @@ -71,11 +71,6 @@ // ///////////////////////////////////////////////////////////////////// -string const LookAndFeel = N_("Look and feel"); -string const LanguageSettings = N_("Language settings"); -string const Outputs = N_("Outputs"); - - // FIXME: move to frontend_helpers.h template<class A> @@ -171,7 +166,7 @@ ///////////////////////////////////////////////////////////////////// PrefPlaintext::PrefPlaintext(QWidget * parent) - : PrefModule(_(Outputs), _("Plain text"), 0, parent) + : PrefModule(_("Plain text"), 0, parent) { setupUi(this); connect(plaintextLinelengthSB, SIGNAL(valueChanged(int)), @@ -202,7 +197,7 @@ ///////////////////////////////////////////////////////////////////// PrefDate::PrefDate(QWidget * parent) - : PrefModule(_(Outputs), _("Date format"), 0, parent) + : PrefModule(_("Date format"), 0, parent) { setupUi(this); connect(DateED, SIGNAL(textChanged(const QString &)), @@ -229,7 +224,7 @@ ///////////////////////////////////////////////////////////////////// PrefKeyboard::PrefKeyboard(QPrefs * form, QWidget * parent) - : PrefModule(_(LookAndFeel), _("Keyboard"), form, parent) + : PrefModule(_("Keyboard"), form, parent) { setupUi(this); @@ -300,7 +295,7 @@ ///////////////////////////////////////////////////////////////////// PrefLatex::PrefLatex(QPrefs * form, QWidget * parent) - : PrefModule(_(Outputs), _("LaTeX"), form, parent) + : PrefModule(_("LaTeX"), form, parent) { setupUi(this); connect(latexEncodingED, SIGNAL(textChanged(const QString&)), @@ -353,7 +348,7 @@ ///////////////////////////////////////////////////////////////////// PrefScreenFonts::PrefScreenFonts(QPrefs * form, QWidget * parent) - : PrefModule(_(LookAndFeel), _("Screen fonts"), form, parent) + : PrefModule(_("Screen fonts"), form, parent) { setupUi(this); @@ -511,7 +506,7 @@ ///////////////////////////////////////////////////////////////////// PrefColors::PrefColors(QPrefs * form, QWidget * parent) - : PrefModule(_(LookAndFeel), _("Colors"), form, parent) + : PrefModule( _("Colors"), form, parent) { setupUi(this); @@ -612,7 +607,7 @@ ///////////////////////////////////////////////////////////////////// PrefCygwinPath::PrefCygwinPath(QWidget * parent) - : PrefModule(_(Outputs), _("Paths"), 0, parent) + : PrefModule(_("Paths"), 0, parent) { setupUi(this); connect(pathCB, SIGNAL(clicked()), this, SIGNAL(changed())); @@ -638,7 +633,7 @@ ///////////////////////////////////////////////////////////////////// PrefDisplay::PrefDisplay(QWidget * parent) - : PrefModule(_(LookAndFeel), _("Graphics"), 0, parent) + : PrefModule(_("Graphics"), 0, parent) { setupUi(this); connect(instantPreviewCO, SIGNAL(activated(int)), @@ -709,7 +704,7 @@ ///////////////////////////////////////////////////////////////////// PrefPaths::PrefPaths(QPrefs * form, QWidget * parent) - : PrefModule(docstring(), _("Paths"), form, parent) + : PrefModule(_("Paths"), form, parent) { setupUi(this); connect(templateDirPB, SIGNAL(clicked()), this, SLOT(select_templatedir())); @@ -813,7 +808,7 @@ ///////////////////////////////////////////////////////////////////// PrefSpellchecker::PrefSpellchecker(QPrefs * form, QWidget * parent) - : PrefModule(_(LanguageSettings), _("Spellchecker"), form, parent) + : PrefModule(_("Spellchecker"), form, parent) { setupUi(this); @@ -923,7 +918,7 @@ PrefConverters::PrefConverters(QPrefs * form, QWidget * parent) - : PrefModule(docstring(), _("Converters"), form, parent) + : PrefModule(_("Converters"), form, parent) { setupUi(this); @@ -1121,7 +1116,7 @@ ///////////////////////////////////////////////////////////////////// PrefCopiers::PrefCopiers(QPrefs * form, QWidget * parent) - : PrefModule(docstring(), _("Copiers"), form, parent) + : PrefModule(_("Copiers"), form, parent) { setupUi(this); @@ -1374,7 +1369,7 @@ ///////////////////////////////////////////////////////////////////// PrefFileformats::PrefFileformats(QPrefs * form, QWidget * parent) - : PrefModule(docstring(), _("File formats"), form, parent) + : PrefModule(_("File formats"), form, parent) { setupUi(this); @@ -1588,7 +1583,7 @@ ///////////////////////////////////////////////////////////////////// PrefLanguage::PrefLanguage(QWidget * parent) - : PrefModule(_(LanguageSettings), _("Language"), 0, parent) + : PrefModule(_("Language"), 0, parent) { setupUi(this); @@ -1668,7 +1663,7 @@ ///////////////////////////////////////////////////////////////////// PrefPrinter::PrefPrinter(QWidget * parent) - : PrefModule(_(Outputs), _("Printer"), 0, parent) + : PrefModule(_("Printer"), 0, parent) { setupUi(this); @@ -1766,7 +1761,7 @@ ///////////////////////////////////////////////////////////////////// PrefUserInterface::PrefUserInterface(QPrefs * form, QWidget * parent) - : PrefModule(_(LookAndFeel), _("User interface"), form, parent) + : PrefModule(_("User interface"), form, parent) { setupUi(this); @@ -1884,7 +1879,7 @@ PrefIdentity::PrefIdentity(QWidget * parent) -: PrefModule(docstring(), _("Identity"), 0, parent) +: PrefModule(_("Identity"), 0, parent) { setupUi(this); @@ -1978,10 +1973,7 @@ { BOOST_ASSERT(module); -// if (module->category().empty()) -// prefsPS->addPanel(module, module->title()); -// else - prefsPS->addPanel(module, module->title(), module->category()); + prefsPS->addPanel(module, module->title()); connect(module, SIGNAL(changed()), this, SLOT(change_adaptor())); Index: src/frontends/qt4/QPrefs.h =================================================================== --- src/frontends/qt4/QPrefs.h (revision 19907) +++ src/frontends/qt4/QPrefs.h (working copy) @@ -56,19 +56,17 @@ { Q_OBJECT public: - PrefModule(docstring const & cat, docstring const & t, + PrefModule(docstring const & t, QPrefs * form = 0, QWidget * parent = 0) - : QWidget(parent), category_(cat), title_(t), form_(form) + : QWidget(parent), title_(t), form_(form) {} virtual void apply(LyXRC & rc) const = 0; virtual void update(LyXRC const & rc) = 0; - docstring const & category() const { return category_; } docstring const & title() const { return title_; } protected: - docstring category_; docstring title_; QPrefs * form_;