Branch: master

f059b01e 2014-11-19 22:38:16 Michele Calgaro
Fixed help handbook sections for Sound & Multimedia -> AudioCDs / CDDB Retrieval. This relates to bug 1850.
M libkcddb/kcmcddb/kcmcddb.cpp
M libkcddb/kcmcddb/kcmcddb.h
M tdeioslave/audiocd/kcmaudiocd/kcmaudiocd.cpp
M tdeioslave/audiocd/kcmaudiocd/kcmaudiocd.h
diff --git a/libkcddb/kcmcddb/kcmcddb.cpp b/libkcddb/kcmcddb/kcmcddb.cpp
index 8dc35a3..62e043b 100644
--- a/libkcddb/kcmcddb/kcmcddb.cpp
+++ b/libkcddb/kcmcddb/kcmcddb.cpp
@@ -27,6 +27,7 @@
 #include <tqlistbox.h>
 #include <tqlabel.h>
 #include <tqbuttongroup.h>
+#include <tqtabwidget.h>
 
 #include <tdeconfig.h>
 #include <tdelocale.h>
@@ -127,6 +128,18 @@
   updateWidgetsFromConfig(config);
 }
 
+TQString CDDBModule::handbookSection() const
+{
+ 	int index = widget_->tabWidget2->currentPageIndex();
+ 	if (index == 0)
+		return "cddb-lookup";
+	else if (index == 1)
+		return "cddb-submit";
+ 	else
+ 		return TQString::null;
+}
+
+
 // vim:tabstop=2:shiftwidth=2:expandtab:cinoptions=(s,U1,m1
 
 #include "kcmcddb.moc"
diff --git a/libkcddb/kcmcddb/kcmcddb.h b/libkcddb/kcmcddb/kcmcddb.h
index 3bdb98c..3f983d8 100644
--- a/libkcddb/kcmcddb/kcmcddb.h
+++ b/libkcddb/kcmcddb/kcmcddb.h
@@ -41,7 +41,8 @@
     void defaults();
     void save();
     void load();
-
+    virtual TQString handbookSection() const;
+  
   protected:
 
     void            checkSettings() const;
diff --git a/tdeioslave/audiocd/kcmaudiocd/kcmaudiocd.cpp b/tdeioslave/audiocd/kcmaudiocd/kcmaudiocd.cpp
index 8e73ce2..1954422 100644
--- a/tdeioslave/audiocd/kcmaudiocd/kcmaudiocd.cpp
+++ b/tdeioslave/audiocd/kcmaudiocd/kcmaudiocd.cpp
@@ -216,6 +216,17 @@
   emit changed( useDefaults );
 }
 
+TQString KAudiocdModule::handbookSection() const
+{
+ 	int index = tabWidget->currentPageIndex();
+ 	if (index == 0)
+		return "audiocd-general";
+	else if (index == 1)
+		return "audiocd-names";
+ 	else
+ 		return TQString::null;
+}
+
 void KAudiocdModule::slotModuleChanged() {
 	TDEConfigDialogManager *widget;
 	for ( widget = encoderSettings.first(); widget; widget = encoderSettings.next() ){
diff --git a/tdeioslave/audiocd/kcmaudiocd/kcmaudiocd.h b/tdeioslave/audiocd/kcmaudiocd/kcmaudiocd.h
index c9ec1bc..f89ef32 100644
--- a/tdeioslave/audiocd/kcmaudiocd/kcmaudiocd.h
+++ b/tdeioslave/audiocd/kcmaudiocd/kcmaudiocd.h
@@ -46,7 +46,8 @@
   void save();
   void load();
   void load(bool useDefaults);
-
+  virtual TQString handbookSection() const;
+  
 private slots:
   void updateExample();
   void slotConfigChanged();