diff options
Diffstat (limited to 'kcontrol')
-rw-r--r-- | kcontrol/icons/main.cpp | 15 | ||||
-rw-r--r-- | kcontrol/icons/main.h | 1 | ||||
-rw-r--r-- | kcontrol/input/mouse.cpp | 24 | ||||
-rw-r--r-- | kcontrol/input/mouse.h | 2 | ||||
-rw-r--r-- | kcontrol/kcontrol/helpwidget.cpp | 23 | ||||
-rw-r--r-- | kcontrol/kcontrol/helpwidget.h | 4 | ||||
-rw-r--r-- | kcontrol/kcontrol/proxywidget.cpp | 8 | ||||
-rw-r--r-- | kcontrol/kcontrol/proxywidget.h | 1 | ||||
-rw-r--r-- | kcontrol/keys/main.cpp | 19 | ||||
-rw-r--r-- | kcontrol/keys/main.h | 2 | ||||
-rw-r--r-- | kcontrol/konq/desktopbehavior_impl.cpp | 18 | ||||
-rw-r--r-- | kcontrol/konq/desktopbehavior_impl.h | 4 | ||||
-rw-r--r-- | kcontrol/performance/kcmperformance.cpp | 17 | ||||
-rw-r--r-- | kcontrol/performance/kcmperformance.h | 2 | ||||
-rw-r--r-- | kcontrol/style/kcmstyle.cpp | 12 | ||||
-rw-r--r-- | kcontrol/style/kcmstyle.h | 2 |
16 files changed, 146 insertions, 8 deletions
diff --git a/kcontrol/icons/main.cpp b/kcontrol/icons/main.cpp index 7afaf7df7..359bfec91 100644 --- a/kcontrol/icons/main.cpp +++ b/kcontrol/icons/main.cpp @@ -100,6 +100,21 @@ TQString IconModule::quickHelp() const "<p>You can also specify effects that should be applied to the icons.</p>"); } +TQString IconModule::handbookSection() const +{ + int index = tab->currentPageIndex(); + if (index == 0) { + //return "icon-theme"; + return TQString::null; + } + else if (index == 1) { + return "icons-use"; + } + else { + return TQString::null; + } +} + #include "main.moc" diff --git a/kcontrol/icons/main.h b/kcontrol/icons/main.h index 515cc47e9..840704351 100644 --- a/kcontrol/icons/main.h +++ b/kcontrol/icons/main.h @@ -40,6 +40,7 @@ public: void save(); void defaults(); TQString quickHelp() const; + virtual TQString handbookSection() const; protected slots: void moduleChanged(bool state); diff --git a/kcontrol/input/mouse.cpp b/kcontrol/input/mouse.cpp index 4ec79c24c..0d07e782e 100644 --- a/kcontrol/input/mouse.cpp +++ b/kcontrol/input/mouse.cpp @@ -890,4 +890,28 @@ void MouseConfig::slotScrollPolarityChanged() settings->m_handedNeedsApply = true; } +TQString MouseConfig::handbookSection() const +{ + int index = tabwidget->currentPageIndex(); + if (index == 0) { + //return "mouse-general"; + return TQString::null; + } + else if (index == 1) { + return "cursor-theme"; + } + else if (index == 2) { + return "mouse-advanced"; + } + else if (index == 3) { + return "mouse-navigation"; + } + else if (index >= 4) { + return "logitech-mouse"; + } + else { + return TQString::null; + } +} + #include "mouse.moc" diff --git a/kcontrol/input/mouse.h b/kcontrol/input/mouse.h index 487ceb2db..6d035b8d1 100644 --- a/kcontrol/input/mouse.h +++ b/kcontrol/input/mouse.h @@ -102,6 +102,8 @@ public: void load( bool useDefaults ); void defaults(); + virtual TQString handbookSection() const; + private slots: void slotClick(); diff --git a/kcontrol/kcontrol/helpwidget.cpp b/kcontrol/kcontrol/helpwidget.cpp index 3e4fe717f..5407f8027 100644 --- a/kcontrol/kcontrol/helpwidget.cpp +++ b/kcontrol/kcontrol/helpwidget.cpp @@ -26,9 +26,13 @@ #include <krun.h> #include "global.h" +#include "dockcontainer.h" +#include "proxywidget.h" +#include "modules.h" + #include "helpwidget.h" -HelpWidget::HelpWidget(TQWidget *parent) : TQWhatsThis(parent) +HelpWidget::HelpWidget(DockContainer *parent) : TQWhatsThis(parent), _dock(parent) { setBaseText(); } @@ -60,16 +64,25 @@ TQString HelpWidget::text() const bool HelpWidget::clicked(const TQString & _url) { - if ( _url.isNull() ) + TQString textUrl = _url; + ConfigModule* dockModule = _dock->module(); + if ( dockModule) { + TQString section = dockModule->module()->handbookSection(); + if (section != "") { + textUrl = TQString( "%1#%2" ).arg( textUrl ).arg( section ); + } + } + + if ( textUrl.isNull() ) return true; - if ( _url.find('@') > -1 ) { - kapp->invokeMailer(_url); + if ( textUrl.find('@') > -1 ) { + kapp->invokeMailer(textUrl); return true; } TDEProcess process; - KURL url(KURL("help:/"), _url); + KURL url(KURL("help:/"), textUrl); if (url.protocol() == "help" || url.protocol() == "man" || url.protocol() == "info") { process << "khelpcenter" diff --git a/kcontrol/kcontrol/helpwidget.h b/kcontrol/kcontrol/helpwidget.h index 1a01cc860..680184df5 100644 --- a/kcontrol/kcontrol/helpwidget.h +++ b/kcontrol/kcontrol/helpwidget.h @@ -22,11 +22,12 @@ class TQWidget; class TQWhatsThis; +class DockContainer; class HelpWidget : public TQWhatsThis { public: - HelpWidget(TQWidget *parent); + HelpWidget(DockContainer *parent); void setText( const TQString& docPath, const TQString& text); void setBaseText(); @@ -38,6 +39,7 @@ public: private: TQString docpath; TQString helptext; + DockContainer* _dock; }; #endif diff --git a/kcontrol/kcontrol/proxywidget.cpp b/kcontrol/kcontrol/proxywidget.cpp index 7aa2383b1..f937493fa 100644 --- a/kcontrol/kcontrol/proxywidget.cpp +++ b/kcontrol/kcontrol/proxywidget.cpp @@ -320,6 +320,14 @@ void ProxyWidget::clientChanged(bool state) emit changed(state); } +TQString ProxyWidget::handbookSection() const +{ + if (_client) + return _client->handbookSection(); + else + return TQString::null; +} + const TDEAboutData *ProxyWidget::aboutData() const { return _client->aboutData(); diff --git a/kcontrol/kcontrol/proxywidget.h b/kcontrol/kcontrol/proxywidget.h index bb951ccdf..874d30d4f 100644 --- a/kcontrol/kcontrol/proxywidget.h +++ b/kcontrol/kcontrol/proxywidget.h @@ -46,6 +46,7 @@ public: ~ProxyWidget(); TQString quickHelp() const; + TQString handbookSection() const; const TDEAboutData *aboutData() const; public slots: diff --git a/kcontrol/keys/main.cpp b/kcontrol/keys/main.cpp index 7e158b677..5fda60ca3 100644 --- a/kcontrol/keys/main.cpp +++ b/kcontrol/keys/main.cpp @@ -125,6 +125,25 @@ void KeyModule::resizeEvent( TQResizeEvent * ) m_pTab->setGeometry( 0, 0, width(), height() ); } +TQString KeyModule::handbookSection() const +{ + int index = m_pTab->currentPageIndex(); + if (index == 0) { + //return "key-bindings-intro"; + return TQString::null; + } + else if (index == 1) { + //return "key-bindings-use"; + return TQString::null; + } + else if (index == 2) { + return "key-bindings-modifiers"; + } + else { + return TQString::null; + } +} + //---------------------------------------------------- extern "C" diff --git a/kcontrol/keys/main.h b/kcontrol/keys/main.h index 5299e3884..281b2d37a 100644 --- a/kcontrol/keys/main.h +++ b/kcontrol/keys/main.h @@ -43,6 +43,8 @@ class KeyModule : public TDECModule void save(); void defaults(); + virtual TQString handbookSection() const; + protected: void initGUI(); void resizeEvent( TQResizeEvent* ); 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(); diff --git a/kcontrol/performance/kcmperformance.cpp b/kcontrol/performance/kcmperformance.cpp index 93c5019a6..84959e34d 100644 --- a/kcontrol/performance/kcmperformance.cpp +++ b/kcontrol/performance/kcmperformance.cpp @@ -49,7 +49,7 @@ Config::Config( TQWidget* parent_P, const char* ) " You can configure settings that improve TDE performance here." )); TQVBoxLayout *topLayout = new TQVBoxLayout( this ); - TQTabWidget* tabs = new TQTabWidget( this ); + tabs = new TQTabWidget( this ); konqueror_widget = new Konqueror( tabs ); konqueror_widget->layout()->setMargin( KDialog::marginHint() ); connect( konqueror_widget, TQT_SIGNAL( changed()), TQT_SLOT( changed())); @@ -85,6 +85,21 @@ void Config::defaults() load( true ); } +TQString Config::handbookSection() const + { + int index = tabs->currentPageIndex(); + if (index == 0) { + //return "konqueror-performance"; + return TQString::null; + } + else if (index == 1) { + return "system-performance"; + } + else { + return TQString::null; + } + } + KonquerorConfig::KonquerorConfig( TQWidget* parent_P, const char* ) : TDECModule( parent_P, "kcmperformance" ) { diff --git a/kcontrol/performance/kcmperformance.h b/kcontrol/performance/kcmperformance.h index a9963e18a..7e0660c60 100644 --- a/kcontrol/performance/kcmperformance.h +++ b/kcontrol/performance/kcmperformance.h @@ -37,9 +37,11 @@ class Config virtual void load( bool useDefaults ); virtual void save(); virtual void defaults(); + virtual TQString handbookSection() const; private: Konqueror* konqueror_widget; SystemWidget* system_widget; + TQTabWidget* tabs; }; class KonquerorConfig diff --git a/kcontrol/style/kcmstyle.cpp b/kcontrol/style/kcmstyle.cpp index 2ca50631d..e6f426423 100644 --- a/kcontrol/style/kcmstyle.cpp +++ b/kcontrol/style/kcmstyle.cpp @@ -1138,6 +1138,18 @@ void KCMStyle::addWhatsThis() "or submenu appears.") ); } +TQString KCMStyle::handbookSection() const +{ + int index = tabWidget->currentPageIndex(); + if (index == 0) { + //return "style-intro"; + return TQString::null; + } + else { + return TQString::null; + } +} + #include "kcmstyle.moc" // vim: set noet ts=4: diff --git a/kcontrol/style/kcmstyle.h b/kcontrol/style/kcmstyle.h index aa00b9695..ad9fec498 100644 --- a/kcontrol/style/kcmstyle.h +++ b/kcontrol/style/kcmstyle.h @@ -73,6 +73,8 @@ public: virtual void save(); virtual void defaults(); + virtual TQString handbookSection() const; + protected: bool findStyle( const TQString& str, int& combobox_item ); void switchStyle(const TQString& styleName, bool force = false); |