Branch: master

48fe5507 2014-11-26 20:57:00 Michele Calgaro
Fixed help handbook sections for TDE Components. This relates to bug 1850.
M doc/kcontrol/filemanager/index.docbook
M kcontrol/kcontrol/helpwidget.cpp
M kcontrol/kcontrol/proxywidget.cpp
M kcontrol/kcontrol/proxywidget.h
M kcontrol/konq/behaviour.cpp
M kcontrol/konq/behaviour.h
M kcontrol/konq/browser.cpp
M kcontrol/konq/browser.h
M kcontrol/konq/fontopts.cpp
M kcontrol/konq/fontopts.h
M kcontrol/konq/previews.cpp
M kcontrol/konq/previews.h
diff --git a/doc/kcontrol/filemanager/index.docbook b/doc/kcontrol/filemanager/index.docbook
index 110f317..6c26340 100644
--- a/doc/kcontrol/filemanager/index.docbook
+++ b/doc/kcontrol/filemanager/index.docbook
@@ -32,9 +32,6 @@
 url="help:/kcontrol/tdehtml/index.html">own configuration
 modules</ulink>.</para></note>
 
-<sect2 id="fileman-use">
-<title>Use</title>
-
 <para> The configuration options for the file manager are
 organized under tabs as follows:</para>
 
@@ -61,7 +58,7 @@
 </varlistentry>
 </variablelist>
 
-<sect3 id="fileman-appearance">
+<sect2 id="fileman-appearance">
 <title>Appearance</title>
 
 <para>The following settings determine how text and colors are displayed in
@@ -129,9 +126,9 @@
 </listitem>
 </varlistentry>
 </variablelist>
-</sect3>
+</sect2>
 
-<sect3 id="fileman-behav">
+<sect2 id="fileman-behav">
 <title>Behavior</title>
 
 <variablelist>
@@ -232,9 +229,9 @@
 window.  If any box is checked, &konqueror; asks for confirmation before
 performing the corresponding action.</para>
 
-</sect3>
+</sect2>
 
-<sect3>
+<sect2 id="fileman-previews">
 <title>Previews</title>
 
 <para>&konqueror; has a
@@ -287,8 +284,6 @@
 of these. This will save time waiting for thumbnails to be created
 when viewing a folder full of images you have not previously seen in
 &konqueror;.</para>
-
-</sect3>
 
 </sect2>
 
diff --git a/kcontrol/kcontrol/helpwidget.cpp b/kcontrol/kcontrol/helpwidget.cpp
index 0bcf827..f21c03c 100644
--- a/kcontrol/kcontrol/helpwidget.cpp
+++ b/kcontrol/kcontrol/helpwidget.cpp
@@ -65,13 +65,14 @@
 bool HelpWidget::clicked(const TQString & _url)
 {
     TQString textUrl = _url;
-
-    if ( textUrl.isNull() ) {
-        return true;
-    }
-
     ConfigModule* dockModule = _dock->module();
-    if ( dockModule) {
+    if (dockModule) {
+        TQString localDocPath = dockModule->module()->handbookDocPath();        
+        if (localDocPath != "")
+          textUrl = localDocPath;       
+        if (textUrl.isNull())
+          return true;
+        
         TQString section = dockModule->module()->handbookSection();
         if (section != "") {
             textUrl = TQString( "%1#%2" ).arg( textUrl ).arg( section );
diff --git a/kcontrol/kcontrol/proxywidget.cpp b/kcontrol/kcontrol/proxywidget.cpp
index 94c1b5d..b007417 100644
--- a/kcontrol/kcontrol/proxywidget.cpp
+++ b/kcontrol/kcontrol/proxywidget.cpp
@@ -320,6 +320,14 @@
   emit changed(state);
 }
 
+TQString ProxyWidget::handbookDocPath() const
+{
+  if (_client)
+    return _client->handbookDocPath();
+  else
+    return TQString::null;
+}
+
 TQString ProxyWidget::handbookSection() const
 {
   if (_client)
diff --git a/kcontrol/kcontrol/proxywidget.h b/kcontrol/kcontrol/proxywidget.h
index 874d30d..804803c 100644
--- a/kcontrol/kcontrol/proxywidget.h
+++ b/kcontrol/kcontrol/proxywidget.h
@@ -46,6 +46,7 @@
   ~ProxyWidget();
 
   TQString quickHelp() const;
+  TQString handbookDocPath() const;
   TQString handbookSection() const;
   const TDEAboutData *aboutData() const;
 
diff --git a/kcontrol/konq/behaviour.cpp b/kcontrol/konq/behaviour.cpp
index 4f256b7..d662d6a 100644
--- a/kcontrol/konq/behaviour.cpp
+++ b/kcontrol/konq/behaviour.cpp
@@ -291,6 +291,11 @@
     kapp->dcopClient()->send( "kdesktop", "KDesktopIface", "configure()", data );
 }
 
+TQString KBehaviourOptions::handbookSection() const
+{
+  return "fileman-behav";
+}
+
 void KBehaviourOptions::updateWinPixmap(bool b)
 {
   if (b)
diff --git a/kcontrol/konq/behaviour.h b/kcontrol/konq/behaviour.h
index 2e011f2..bb6421b 100644
--- a/kcontrol/konq/behaviour.h
+++ b/kcontrol/konq/behaviour.h
@@ -43,6 +43,7 @@
   virtual void load( bool useDefaults );
   virtual void save();
   virtual void defaults();
+  virtual TQString handbookSection() const;
 
 protected slots:
 
diff --git a/kcontrol/konq/browser.cpp b/kcontrol/konq/browser.cpp
index dc6c20b..49587f2 100644
--- a/kcontrol/konq/browser.cpp
+++ b/kcontrol/konq/browser.cpp
@@ -95,6 +95,28 @@
      kuick->save();
 }
 
+TQString KBrowserOptions::handbookDocPath() const
+{
+ 	int index = m_tab->currentPageIndex();
+	if (kuick && index == 3)
+		return "konq-plugins/kuick/index.html";
+ 	else
+ 		return TQString::null;
+}
+
+TQString KBrowserOptions::handbookSection() const
+{
+ 	int index = m_tab->currentPageIndex();
+ 	if (index == 0)
+		return "fileman-appearance";
+	else if (index == 1)
+		return "fileman-behav";
+	else if (index == 2)
+		return "fileman-previews";
+ 	else
+ 		return TQString::null;
+}
+
 TQString KBrowserOptions::quickHelp() const
 {
   TQWidget *w = m_tab->currentPage();
diff --git a/kcontrol/konq/browser.h b/kcontrol/konq/browser.h
index 928fc6e..0e0cee3 100644
--- a/kcontrol/konq/browser.h
+++ b/kcontrol/konq/browser.h
@@ -37,6 +37,8 @@
   virtual void save();
   virtual void defaults();
   virtual TQString quickHelp() const;
+  virtual TQString handbookDocPath() const;
+  virtual TQString handbookSection() const;
 
 private:
    
diff --git a/kcontrol/konq/fontopts.cpp b/kcontrol/konq/fontopts.cpp
index 9a32596..a12b020 100644
--- a/kcontrol/konq/fontopts.cpp
+++ b/kcontrol/konq/fontopts.cpp
@@ -344,6 +344,11 @@
     kapp->dcopClient()->send( appname, "KDesktopIface", "configure()", data );
 }
 
+TQString KonqFontOptions::handbookSection() const
+{
+  return "fileman-appearance";
+}
+
 void KonqFontOptions::slotTextBackgroundClicked()
 {
     m_pTextBackground->setEnabled( m_cbTextBackground->isChecked() );
diff --git a/kcontrol/konq/fontopts.h b/kcontrol/konq/fontopts.h
index c163deb..69ffa4a 100644
--- a/kcontrol/konq/fontopts.h
+++ b/kcontrol/konq/fontopts.h
@@ -60,6 +60,7 @@
   virtual void load( bool readDefaults );
   virtual void save();
   virtual void defaults();
+  virtual TQString handbookSection() const;
 
 public slots:
   void slotFontSize(int i);
diff --git a/kcontrol/konq/previews.cpp b/kcontrol/konq/previews.cpp
index 107270e..1f7bf85 100644
--- a/kcontrol/konq/previews.cpp
+++ b/kcontrol/konq/previews.cpp
@@ -211,6 +211,11 @@
     kapp->dcopClient()->send( "konqueror*", "KonquerorIface", "reparseConfiguration()", data );
 }
 
+TQString KPreviewOptions::handbookSection() const
+{
+  return "fileman-previews";
+}
+
 void KPreviewOptions::changed()
 {
     emit TDECModule::changed(true);
diff --git a/kcontrol/konq/previews.h b/kcontrol/konq/previews.h
index a1b4772..d76b285 100644
--- a/kcontrol/konq/previews.h
+++ b/kcontrol/konq/previews.h
@@ -48,6 +48,7 @@
     virtual void load();
     virtual void save();
     virtual void defaults();
+    virtual TQString handbookSection() const;
 
 protected:
     void load(bool useDefaults);
df0af3a4 2014-11-26 20:57:26 Michele Calgaro
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tdebase
M ksmserver/shutdowndlg.cpp
M migratekde3
M r14-xdg-update
M twin/compton-tde/common.h
M twin/compton-tde/compton.c
M twin/compton-tde/opengl.c
M twin/kcmtwin/twinoptions/windows.cpp
M twin/kcmtwin/twinoptions/windows.h
M twin/workspace.cpp
diff --git a/ksmserver/shutdowndlg.cpp b/ksmserver/shutdowndlg.cpp
index 5c50602..6573f8b 100644
--- a/ksmserver/shutdowndlg.cpp
+++ b/ksmserver/shutdowndlg.cpp
@@ -87,6 +87,11 @@
 		m_grayImage.setAlphaBuffer(false);
 		m_grayImage.fill(0);	// Set the alpha buffer to 0 (fully transparent)
 		m_grayImage.setAlphaBuffer(true);
 ** Diff limit reached (max: 250 lines) **