Branch: master

cc12a51c 2014-10-09 22:07:33 Timothy Pearson
Link tabs to handbook sections in Style and Panels tdecontrol modules
This relates to Bug 1850
M doc/kcontrol/kcmstyle/index.docbook
M kcontrol/kcontrol/helpwidget.cpp
M kcontrol/kicker/hidingconfig.cpp
M kcontrol/kicker/hidingconfig.h
M kcontrol/kicker/lookandfeelconfig.cpp
M kcontrol/kicker/lookandfeelconfig.h
M kcontrol/kicker/lookandfeeltab_kcm.cpp
M kcontrol/kicker/lookandfeeltab_kcm.h
M kcontrol/kicker/main.cpp
M kcontrol/kicker/menuconfig.cpp
M kcontrol/kicker/menuconfig.h
M kcontrol/kicker/positionconfig.cpp
M kcontrol/kicker/positionconfig.h
M kcontrol/style/kcmstyle.cpp
M kcontrol/style/kcmstyle.h
diff --git a/doc/kcontrol/kcmstyle/index.docbook b/doc/kcontrol/kcmstyle/index.docbook
index 7bd7973..f71599c 100644
--- a/doc/kcontrol/kcmstyle/index.docbook
+++ b/doc/kcontrol/kcmstyle/index.docbook
@@ -45,7 +45,9 @@
 <para>This panel is divided into three tabs:  <guilabel>Style</guilabel>, 
 <guilabel>Effects</guilabel>, <guilabel>Toolbar</guilabel>.</para>
 
-<sect3 id="style-style">
+</sect2>
+
+<sect2 id="style-style">
 <title><guilabel>Style</guilabel> tab</title>
 
 <para>The top list box, labeled <guilabel>Widget Style</guilabel> 
@@ -87,9 +89,9 @@
 </varlistentry> 
 </variablelist>
 -->
-</sect3>
+</sect2>
 
-<sect3 id="style-effects">
+<sect2 id="style-effects">
 <title><guilabel>Effects</guilabel> tab</title>
 
 <para>If you click on the <guilabel>Effects</guilabel> tab, you will see the panel is divided 
@@ -145,9 +147,9 @@
 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.</para>
 
-</sect3>
+</sect2>
 
-<sect3 id="style-misc">
+<sect2 id="style-misc">
 <title><guilabel>Toolbar</guilabel> tab</title>
 
 <variablelist> 
@@ -179,8 +181,6 @@
 </varlistentry> 
 
 </variablelist>
-
-</sect3>
 
 </sect2>
 
diff --git a/kcontrol/kcontrol/helpwidget.cpp b/kcontrol/kcontrol/helpwidget.cpp
index 5407f80..0bcf827 100644
--- a/kcontrol/kcontrol/helpwidget.cpp
+++ b/kcontrol/kcontrol/helpwidget.cpp
@@ -65,6 +65,11 @@
 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();
@@ -72,9 +77,6 @@
             textUrl = TQString( "%1#%2" ).arg( textUrl ).arg( section );
         }
     }
-
-    if ( textUrl.isNull() )
-        return true;
 
     if ( textUrl.find('@') > -1 ) {
         kapp->invokeMailer(textUrl);
diff --git a/kcontrol/kicker/hidingconfig.cpp b/kcontrol/kicker/hidingconfig.cpp
index e1e71dc..506eebd 100644
--- a/kcontrol/kicker/hidingconfig.cpp
+++ b/kcontrol/kicker/hidingconfig.cpp
@@ -92,3 +92,8 @@
     // 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 8aee0fb..1a6e224 100644
--- a/kcontrol/kicker/hidingconfig.h
+++ b/kcontrol/kicker/hidingconfig.h
@@ -33,6 +33,8 @@
     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 af45142..d7cbadf 100644
--- a/kcontrol/kicker/lookandfeelconfig.cpp
+++ b/kcontrol/kicker/lookandfeelconfig.cpp
@@ -92,3 +92,8 @@
     // 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 cd368ce..ff8a55b 100644
--- a/kcontrol/kicker/lookandfeelconfig.h
+++ b/kcontrol/kicker/lookandfeelconfig.h
@@ -33,6 +33,8 @@
     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 b3c657c..5695e38 100644
--- a/kcontrol/kicker/lookandfeeltab_kcm.cpp
+++ b/kcontrol/kicker/lookandfeeltab_kcm.cpp
@@ -92,3 +92,7 @@
                 " 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 d4d1136..32a89b4 100644
--- a/kcontrol/kicker/lookandfeeltab_kcm.h
+++ b/kcontrol/kicker/lookandfeeltab_kcm.h
@@ -34,6 +34,8 @@
     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 c8de607..da73da7 100644
--- a/kcontrol/kicker/main.cpp
+++ b/kcontrol/kicker/main.cpp
@@ -358,7 +358,7 @@
           = 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 26624ff..4f8a686 100644
--- a/kcontrol/kicker/menuconfig.cpp
+++ b/kcontrol/kicker/menuconfig.cpp
@@ -92,3 +92,8 @@
     // 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 e6e548f..a5fa29d 100644
--- a/kcontrol/kicker/menuconfig.h
+++ b/kcontrol/kicker/menuconfig.h
@@ -33,6 +33,8 @@
     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 a65a323..00b571d 100644
--- a/kcontrol/kicker/positionconfig.cpp
+++ b/kcontrol/kicker/positionconfig.cpp
@@ -92,3 +92,8 @@
     // 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 6c4ec36..93d7cb5 100644
--- a/kcontrol/kicker/positionconfig.h
+++ b/kcontrol/kicker/positionconfig.h
@@ -33,6 +33,8 @@
     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 e6f4264..d6a7ae6 100644
--- a/kcontrol/style/kcmstyle.cpp
+++ b/kcontrol/style/kcmstyle.cpp
@@ -1142,9 +1142,15 @@
 {
 	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 ad9fec4..4fb1065 100644
--- a/kcontrol/style/kcmstyle.h
+++ b/kcontrol/style/kcmstyle.h
@@ -127,7 +127,7 @@
 	TQCheckBox* cbAutoHideAccelerators;
 	TQCheckBox* cbMenuAltKeyNavigation;
 	TQCheckBox* cbEnableTooltips;
-  KIntNumInput *m_popupMenuDelay;
+	KIntNumInput *m_popupMenuDelay;
 
 ** Diff limit reached (max: 250 lines) **