From 88a2e255141f97ac65c65fd89b5ef9a30b9138c4 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 3 Oct 2014 23:13:17 -0500 Subject: Add mechanism by which sections of relevant docbooks may be opened automatically based on active tab in TDECModule Fix up several tabbed TDEControl modules to use this mechanism Fix a couple of docbooks with missing section IDs This relates to Bug 1850 --- twin/kcmtwin/twindecoration/twindecoration.cpp | 14 +++++++++++ twin/kcmtwin/twindecoration/twindecoration.h | 2 ++ twin/kcmtwin/twinoptions/main.cpp | 34 ++++++++++++++++++++++++++ twin/kcmtwin/twinoptions/main.h | 1 + 4 files changed, 51 insertions(+) (limited to 'twin/kcmtwin') diff --git a/twin/kcmtwin/twindecoration/twindecoration.cpp b/twin/kcmtwin/twindecoration/twindecoration.cpp index 8e668e78a..e07329b67 100644 --- a/twin/kcmtwin/twindecoration/twindecoration.cpp +++ b/twin/kcmtwin/twindecoration/twindecoration.cpp @@ -956,6 +956,20 @@ TQString KWinDecorationModule::quickHelp() const " In the \"Buttons\" tab you can change the positions of the buttons to your liking.

" ); } +TQString KWinDecorationModule::handbookSection() const +{ + int index = tabWidget->currentPageIndex(); + if (index == 0) { + //return "window-deco-general"; + return TQString::null; + } + else if (index == 1) { + return "window-deco-buttons"; + } + else { + return TQString::null; + } +} void KWinDecorationModule::resetKWin() { diff --git a/twin/kcmtwin/twindecoration/twindecoration.h b/twin/kcmtwin/twindecoration/twindecoration.h index cf968df1d..459823f08 100644 --- a/twin/kcmtwin/twindecoration/twindecoration.h +++ b/twin/kcmtwin/twindecoration/twindecoration.h @@ -73,6 +73,8 @@ class KWinDecorationModule : public TDECModule, virtual public KWinDecorationIfa TQString quickHelp() const; + virtual TQString handbookSection() const; + virtual void dcopUpdateClientList(); signals: diff --git a/twin/kcmtwin/twinoptions/main.cpp b/twin/kcmtwin/twinoptions/main.cpp index c2a74ebb0..8ed52b067 100644 --- a/twin/kcmtwin/twinoptions/main.cpp +++ b/twin/kcmtwin/twinoptions/main.cpp @@ -200,6 +200,40 @@ void KWinOptions::moduleChanged(bool state) emit TDECModule::changed(state); } +TQString KWinOptions::handbookSection() const +{ + int index = tab->currentPageIndex(); + if (index == 0) + { + //return "focus"; + return TQString::null; + } + else if (index == 1) + { + return "titlebar-actions"; + } + else if (index == 2) + { + return "window-actions"; + } + else if (index == 3) + { + return "moving"; + } + else if (index == 4) + { + return "advanced"; + } + else if (index == 5) + { + return "translucency"; + } + else + { + return TQString::null; + } +} + TDEActionsOptions::TDEActionsOptions(TQWidget *parent, const char *name) : TDECModule(parent, name) diff --git a/twin/kcmtwin/twinoptions/main.h b/twin/kcmtwin/twinoptions/main.h index cb80f7e8d..554b7b761 100644 --- a/twin/kcmtwin/twinoptions/main.h +++ b/twin/kcmtwin/twinoptions/main.h @@ -48,6 +48,7 @@ public: void save(); void defaults(); TQString quickHelp() const; + virtual TQString handbookSection() const; protected slots: -- cgit v1.2.1