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 --- kcontrol/konq/desktopbehavior_impl.cpp | 18 ++++++++++++++++++ kcontrol/konq/desktopbehavior_impl.h | 4 +++- 2 files changed, 21 insertions(+), 1 deletion(-) (limited to 'kcontrol/konq') diff --git a/kcontrol/konq/desktopbehavior_impl.cpp b/kcontrol/konq/desktopbehavior_impl.cpp index 68bbb160c..17fc2f364 100644 --- a/kcontrol/konq/desktopbehavior_impl.cpp +++ b/kcontrol/konq/desktopbehavior_impl.cpp @@ -485,4 +485,22 @@ TQString DesktopBehavior::quickHelp() const "Use the \"What's This?\" (Shift+F1) to get help on specific options."); } +TQString DesktopBehavior::handbookSection() const +{ + int index = behaviorTab->currentPageIndex(); + if (index == 0) { + //return "desktop-desktop"; + return TQString::null; + } + else if (index == 1) { + return "desktop-behavior-file-icons"; + } + else if (index == 2) { + return "desktop-behavior-device-icons"; + } + else { + return TQString::null; + } +} + #include "desktopbehavior_impl.moc" diff --git a/kcontrol/konq/desktopbehavior_impl.h b/kcontrol/konq/desktopbehavior_impl.h index d04d82136..bc5965750 100644 --- a/kcontrol/konq/desktopbehavior_impl.h +++ b/kcontrol/konq/desktopbehavior_impl.h @@ -36,8 +36,9 @@ public: virtual void save(); virtual void defaults(); virtual TQString quickHelp() const; + virtual TQString handbookSection() const; friend class DesktopBehaviorPreviewItem; - friend class DesktopBehaviorMediaItem; + friend class DesktopBehaviorMediaItem; signals: void changed(); @@ -71,6 +72,7 @@ public: virtual void load() { m_behavior->load(); emit TDECModule::changed( false ); } virtual void save() { m_behavior->save(); emit TDECModule::changed( false ); } virtual void defaults() { m_behavior->defaults(); emit TDECModule::changed( true ); } + virtual TQString handbookSection() const { return m_behavior->handbookSection(); }; private slots: void changed(); -- cgit v1.2.1