From cc12a51c629cfaec41a6170a480ea0a757b26f54 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 9 Oct 2014 22:07:33 -0500 Subject: Link tabs to handbook sections in Style and Panels tdecontrol modules This relates to Bug 1850 --- doc/kcontrol/kcmstyle/index.docbook | 14 +++++++------- kcontrol/kcontrol/helpwidget.cpp | 8 +++++--- kcontrol/kicker/hidingconfig.cpp | 5 +++++ kcontrol/kicker/hidingconfig.h | 2 ++ kcontrol/kicker/lookandfeelconfig.cpp | 5 +++++ kcontrol/kicker/lookandfeelconfig.h | 2 ++ kcontrol/kicker/lookandfeeltab_kcm.cpp | 4 ++++ kcontrol/kicker/lookandfeeltab_kcm.h | 2 ++ kcontrol/kicker/main.cpp | 2 +- kcontrol/kicker/menuconfig.cpp | 5 +++++ kcontrol/kicker/menuconfig.h | 2 ++ kcontrol/kicker/positionconfig.cpp | 5 +++++ kcontrol/kicker/positionconfig.h | 2 ++ kcontrol/style/kcmstyle.cpp | 8 +++++++- kcontrol/style/kcmstyle.h | 2 +- 15 files changed, 55 insertions(+), 13 deletions(-) diff --git a/doc/kcontrol/kcmstyle/index.docbook b/doc/kcontrol/kcmstyle/index.docbook index 7bd7973c0..f71599c97 100644 --- a/doc/kcontrol/kcmstyle/index.docbook +++ b/doc/kcontrol/kcmstyle/index.docbook @@ -45,7 +45,9 @@ url="help:/kcontrol/color/index.html">Colors. This panel is divided into three tabs: Style, Effects, Toolbar. - + + + <guilabel>Style</guilabel> tab The top list box, labeled Widget Style @@ -87,9 +89,9 @@ application. --> - + - + <guilabel>Effects</guilabel> tab If you click on the Effects tab, you will see the panel is divided @@ -145,9 +147,9 @@ appearance that the menu is lifted off the application, and the menu is creating to select the method &tde; uses to generate the transparency. You can use the slider to determine the level of transparency in menus. A preview is visible on the right side of this section. - + - + <guilabel>Toolbar</guilabel> tab @@ -180,8 +182,6 @@ If Icon Only is selected, then there is no text on the tool - - diff --git a/kcontrol/kcontrol/helpwidget.cpp b/kcontrol/kcontrol/helpwidget.cpp index 5407f8027..0bcf82796 100644 --- a/kcontrol/kcontrol/helpwidget.cpp +++ b/kcontrol/kcontrol/helpwidget.cpp @@ -65,6 +65,11 @@ TQString HelpWidget::text() const bool HelpWidget::clicked(const TQString & _url) { TQString textUrl = _url; + + if ( textUrl.isNull() ) { + return true; + } + ConfigModule* dockModule = _dock->module(); if ( dockModule) { TQString section = dockModule->module()->handbookSection(); @@ -73,9 +78,6 @@ bool HelpWidget::clicked(const TQString & _url) } } - if ( textUrl.isNull() ) - return true; - if ( textUrl.find('@') > -1 ) { kapp->invokeMailer(textUrl); return true; diff --git a/kcontrol/kicker/hidingconfig.cpp b/kcontrol/kicker/hidingconfig.cpp index e1e71dc86..506eebdfb 100644 --- a/kcontrol/kicker/hidingconfig.cpp +++ b/kcontrol/kicker/hidingconfig.cpp @@ -92,3 +92,8 @@ void HidingConfig::defaults() // while we manage some of the widgets ourselves TQTimer::singleShot(0, this, TQT_SLOT(changed())); } + +TQString HidingConfig::handbookSection() const +{ + return "panel-hiding"; +} diff --git a/kcontrol/kicker/hidingconfig.h b/kcontrol/kicker/hidingconfig.h index 8aee0fb51..1a6e22472 100644 --- a/kcontrol/kicker/hidingconfig.h +++ b/kcontrol/kicker/hidingconfig.h @@ -33,6 +33,8 @@ public: void save(); void defaults(); + virtual TQString handbookSection() const; + public slots: void notChanged(); void aboutToNotifyKicker(); diff --git a/kcontrol/kicker/lookandfeelconfig.cpp b/kcontrol/kicker/lookandfeelconfig.cpp index af451421e..d7cbadf28 100644 --- a/kcontrol/kicker/lookandfeelconfig.cpp +++ b/kcontrol/kicker/lookandfeelconfig.cpp @@ -92,3 +92,8 @@ void LookAndFeelConfig::defaults() // while we manage some of the widgets ourselves TQTimer::singleShot(0, this, TQT_SLOT(changed())); } + +TQString LookAndFeelConfig::handbookSection() const +{ + return "panel-appearance"; +} \ No newline at end of file diff --git a/kcontrol/kicker/lookandfeelconfig.h b/kcontrol/kicker/lookandfeelconfig.h index cd368ce36..ff8a55b38 100644 --- a/kcontrol/kicker/lookandfeelconfig.h +++ b/kcontrol/kicker/lookandfeelconfig.h @@ -33,6 +33,8 @@ public: void save(); void defaults(); + virtual TQString handbookSection() const; + public slots: void notChanged(); void aboutToNotifyKicker(); diff --git a/kcontrol/kicker/lookandfeeltab_kcm.cpp b/kcontrol/kicker/lookandfeeltab_kcm.cpp index b3c657c14..5695e3869 100644 --- a/kcontrol/kicker/lookandfeeltab_kcm.cpp +++ b/kcontrol/kicker/lookandfeeltab_kcm.cpp @@ -92,3 +92,7 @@ TQString LookAndFeelConfig::quickHelp() const " manipulation of the panel's buttons and applets."); } +TQString LookAndFeelConfig::handbookSection() const +{ + return "panel-appearance"; +} \ No newline at end of file diff --git a/kcontrol/kicker/lookandfeeltab_kcm.h b/kcontrol/kicker/lookandfeeltab_kcm.h index d4d113687..32a89b4f8 100644 --- a/kcontrol/kicker/lookandfeeltab_kcm.h +++ b/kcontrol/kicker/lookandfeeltab_kcm.h @@ -34,6 +34,8 @@ public: void defaults(); TQString quickHelp() const; + virtual TQString handbookSection() const; + public slots: void configChanged(); diff --git a/kcontrol/kicker/main.cpp b/kcontrol/kicker/main.cpp index c8de607b9..da73da7c3 100644 --- a/kcontrol/kicker/main.cpp +++ b/kcontrol/kicker/main.cpp @@ -358,7 +358,7 @@ TDEAboutData *KickerConfig::aboutData() = new TDEAboutData(I18N_NOOP("kcmkicker"), I18N_NOOP("TDE Panel Control Module"), 0, 0, TDEAboutData::License_GPL, - I18N_NOOP("(c) 2009 - 2010 Timothy Pearson\n" + I18N_NOOP("(c) 2009 - 2014 Timothy Pearson\n" "(c) 1999 - 2001 Matthias Elter\n" "(c) 2002 - 2003 Aaron J. Seigo")); diff --git a/kcontrol/kicker/menuconfig.cpp b/kcontrol/kicker/menuconfig.cpp index 26624ff92..4f8a68605 100644 --- a/kcontrol/kicker/menuconfig.cpp +++ b/kcontrol/kicker/menuconfig.cpp @@ -92,3 +92,8 @@ void MenuConfig::defaults() // while we manage some of the widgets ourselves TQTimer::singleShot(0, this, TQT_SLOT(changed())); } + +TQString MenuConfig::handbookSection() const +{ + return "panel-menus"; +} diff --git a/kcontrol/kicker/menuconfig.h b/kcontrol/kicker/menuconfig.h index e6e548f83..a5fa29daf 100644 --- a/kcontrol/kicker/menuconfig.h +++ b/kcontrol/kicker/menuconfig.h @@ -33,6 +33,8 @@ public: void save(); void defaults(); + virtual TQString handbookSection() const; + public slots: void notChanged(); void aboutToNotifyKicker(); diff --git a/kcontrol/kicker/positionconfig.cpp b/kcontrol/kicker/positionconfig.cpp index a65a32341..00b571d13 100644 --- a/kcontrol/kicker/positionconfig.cpp +++ b/kcontrol/kicker/positionconfig.cpp @@ -92,3 +92,8 @@ void PositionConfig::defaults() // while we manage some of the widgets ourselves TQTimer::singleShot(0, this, TQT_SLOT(changed())); } + +TQString PositionConfig::handbookSection() const +{ + return "panel-arrangement"; +} diff --git a/kcontrol/kicker/positionconfig.h b/kcontrol/kicker/positionconfig.h index 6c4ec3680..93d7cb533 100644 --- a/kcontrol/kicker/positionconfig.h +++ b/kcontrol/kicker/positionconfig.h @@ -33,6 +33,8 @@ public: void save(); void defaults(); + virtual TQString handbookSection() const; + public slots: void notChanged(); void aboutToNotifyKicker(); diff --git a/kcontrol/style/kcmstyle.cpp b/kcontrol/style/kcmstyle.cpp index e6f426423..d6a7ae6ee 100644 --- a/kcontrol/style/kcmstyle.cpp +++ b/kcontrol/style/kcmstyle.cpp @@ -1142,9 +1142,15 @@ TQString KCMStyle::handbookSection() const { int index = tabWidget->currentPageIndex(); if (index == 0) { - //return "style-intro"; + //return "style-style"; return TQString::null; } + else if (index == 1) { + return "style-effects"; + } + else if (index == 2) { + return "style-misc"; + } else { return TQString::null; } diff --git a/kcontrol/style/kcmstyle.h b/kcontrol/style/kcmstyle.h index ad9fec498..4fb1065bf 100644 --- a/kcontrol/style/kcmstyle.h +++ b/kcontrol/style/kcmstyle.h @@ -127,7 +127,7 @@ private: TQCheckBox* cbAutoHideAccelerators; TQCheckBox* cbMenuAltKeyNavigation; TQCheckBox* cbEnableTooltips; - KIntNumInput *m_popupMenuDelay; + KIntNumInput *m_popupMenuDelay; // Page2 widgets TQCheckBox* cbEnableEffects; -- cgit v1.2.3