From 8858fc1159edf35efa400315c11c095008536802 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Fri, 14 Nov 2014 22:29:12 +0900 Subject: [PATCH] Fixed help handbook sections for Regional & Accessibility. This relates to bug 1850. --- doc/kcontrol/kcmaccess/index.docbook | 33 ++++++++++++++++------------ doc/kcontrol/keys/index.docbook | 5 +++++ kcontrol/access/kcmaccess.cpp | 28 ++++++++++++++++++----- kcontrol/access/kcmaccess.h | 2 ++ kcontrol/keys/main.cpp | 6 ++--- kcontrol/locale/toplevel.cpp | 17 ++++++++++++++ kcontrol/locale/toplevel.h | 5 +++-- kxkb/kcmlayout.cpp | 14 ++++++++++++ kxkb/kcmlayout.h | 3 ++- 9 files changed, 86 insertions(+), 27 deletions(-) diff --git a/doc/kcontrol/kcmaccess/index.docbook b/doc/kcontrol/kcmaccess/index.docbook index bb5d93cab..1a24daf17 100644 --- a/doc/kcontrol/kcmaccess/index.docbook +++ b/doc/kcontrol/kcmaccess/index.docbook @@ -33,9 +33,11 @@ audible cues, or who have difficulty using a keyboard. -The module is divided into two tabs: Bell and Keyboard. +The module is divided into four tabs tabs: +Bell, +Modifier Keys, +Keyboard Filters +and Action Gestures. @@ -89,16 +91,12 @@ bell. The default value is 500ms, or half a second. + - -<guilabel>Keyboard</guilabel> - -There are three sections to this panel. + +Modifier Keys - - -Use Sticky Keys - +Use Sticky Keys If this option is enabled, you can press and release the &Shift;, &Alt; or &Ctrl; keys, and then press another key to get a key combo @@ -144,9 +142,13 @@ de-select the &Shift; key, press it again. - - + + + +Keyboard Filters + + Slow keys @@ -170,8 +172,11 @@ accepted. This prevents accidental multiple key strokes. - + + +Action Gestures +We apologize. This section has not been written yet. diff --git a/doc/kcontrol/keys/index.docbook b/doc/kcontrol/keys/index.docbook index 3aa32d659..4548adbf5 100644 --- a/doc/kcontrol/keys/index.docbook +++ b/doc/kcontrol/keys/index.docbook @@ -160,6 +160,11 @@ scheme, discarding your changes. + +Command shortcuts +We apologize. This section has not been written yet. + + Modifier Keys diff --git a/kcontrol/access/kcmaccess.cpp b/kcontrol/access/kcmaccess.cpp index 534dc692c..485c7b80a 100644 --- a/kcontrol/access/kcmaccess.cpp +++ b/kcontrol/access/kcmaccess.cpp @@ -235,8 +235,8 @@ KAccessConfig::KAccessConfig(TQWidget *parent, const char *) setAboutData( about ); TQVBoxLayout *main = new TQVBoxLayout(this, 0, KDialogBase::spacingHint()); - TQTabWidget *tab = new TQTabWidget(this); - main->addWidget(tab); + tabWidget = new TQTabWidget(this); + main->addWidget(tabWidget); // bell settings --------------------------------------- TQWidget *bell = new TQWidget(this); @@ -341,7 +341,7 @@ KAccessConfig::KAccessConfig(TQWidget *parent, const char *) // ----------------------------------------------------- - tab->addTab(bell, i18n("&Bell")); + tabWidget->addTab(bell, i18n("&Bell")); // modifier key settings ------------------------------- @@ -404,7 +404,7 @@ KAccessConfig::KAccessConfig(TQWidget *parent, const char *) vbox->addStretch(); - tab->addTab(modifiers, i18n("&Modifier Keys")); + tabWidget->addTab(modifiers, i18n("&Modifier Keys")); // key filter settings --------------------------------- TQWidget *filters = new TQWidget(this); @@ -480,7 +480,7 @@ KAccessConfig::KAccessConfig(TQWidget *parent, const char *) vbox->addStretch(); - tab->addTab(filters, i18n("&Keyboard Filters")); + tabWidget->addTab(filters, i18n("&Keyboard Filters")); // gestures -------------------------------------------- TQWidget *features = new TQWidget(this); @@ -551,7 +551,7 @@ KAccessConfig::KAccessConfig(TQWidget *parent, const char *) vbox->addStretch(); - tab->addTab(features, i18n("Activation Gestures")); + tabWidget->addTab(features, i18n("Activation Gestures")); load(); } @@ -731,6 +731,22 @@ void KAccessConfig::save() } +TQString KAccessConfig::handbookSection() const +{ + int index = tabWidget->currentPageIndex(); + if (index == 0) + return "accessibility-intro"; + else if (index == 1) + return "modifier-keys"; + else if (index == 2) + return "keyboard-filters"; + else if (index == 3) + return "action-gestures"; + else + return TQString::null; +} + + void KAccessConfig::defaults() { load( true ); diff --git a/kcontrol/access/kcmaccess.h b/kcontrol/access/kcmaccess.h index 14a441a59..4eb8af45d 100644 --- a/kcontrol/access/kcmaccess.h +++ b/kcontrol/access/kcmaccess.h @@ -70,6 +70,7 @@ public: void load(bool useDefaults); void save(); void defaults(); + virtual TQString handbookSection() const; protected slots: @@ -83,6 +84,7 @@ protected slots: private: + TQTabWidget* tabWidget; TQCheckBox *systemBell, *customBell, *visibleBell; TQRadioButton *invertScreen, *flashScreen; TQLabel *soundLabel, *colorLabel; diff --git a/kcontrol/keys/main.cpp b/kcontrol/keys/main.cpp index 5fda60ca3..d002b667f 100644 --- a/kcontrol/keys/main.cpp +++ b/kcontrol/keys/main.cpp @@ -129,12 +129,10 @@ TQString KeyModule::handbookSection() const { int index = m_pTab->currentPageIndex(); if (index == 0) { - //return "key-bindings-intro"; - return TQString::null; + return "key-bindings-intro"; } else if (index == 1) { - //return "key-bindings-use"; - return TQString::null; + return "key-bindings-shortcuts"; } else if (index == 2) { return "key-bindings-modifiers"; diff --git a/kcontrol/locale/toplevel.cpp b/kcontrol/locale/toplevel.cpp index a7a85e72f..d2a17ca74 100644 --- a/kcontrol/locale/toplevel.cpp +++ b/kcontrol/locale/toplevel.cpp @@ -206,6 +206,23 @@ void TDELocaleApplication::save() emit changed(false); } +TQString TDELocaleApplication::handbookSection() const +{ + int index = m_tab->currentPageIndex(); + if (index == 0) + return "locale-locale"; + else if (index == 1) + return "locale-numbers"; + else if (index == 2) + return "locale-money"; + else if (index == 3) + return "locale-datetime"; + else if (index == 4) + return "locale-other"; + else + return TQString::null; +} + void TDELocaleApplication::defaults() { load( true ); diff --git a/kcontrol/locale/toplevel.h b/kcontrol/locale/toplevel.h index e381d6749..abc1a47f9 100644 --- a/kcontrol/locale/toplevel.h +++ b/kcontrol/locale/toplevel.h @@ -53,6 +53,7 @@ public: virtual void save(); virtual void defaults(); virtual TQString quickHelp() const; + virtual TQString handbookSection() const; signals: void languageChanged(); @@ -68,14 +69,14 @@ public slots: private: TDELocale *m_locale; - TQTabWidget *m_tab; + TQTabWidget *m_tab; TDELocaleConfig *m_localemain; TDELocaleConfigNumber *m_localenum; TDELocaleConfigMoney *m_localemon; TDELocaleConfigTime *m_localetime; TDELocaleConfigOther *m_localeother; - TQGroupBox *m_gbox; + TQGroupBox *m_gbox; TDELocaleSample *m_sample; TDEConfig * m_globalConfig; diff --git a/kxkb/kcmlayout.cpp b/kxkb/kcmlayout.cpp index 2c601856f..1cb011270 100644 --- a/kxkb/kcmlayout.cpp +++ b/kxkb/kcmlayout.cpp @@ -329,6 +329,20 @@ void LayoutConfig::save() } +TQString LayoutConfig::handbookSection() const +{ + int index = widget->tabWidget->currentPageIndex(); + if (index == 0) + return "layout-config"; + else if (index == 1) + return "switching-config"; + else if (index == 2) + return "xkboptions-config"; + else + return TQString::null; +} + + void LayoutConfig::updateStickyLimit() { int layoutsCnt = widget->listLayoutsDst->childCount(); diff --git a/kxkb/kcmlayout.h b/kxkb/kcmlayout.h index 769b08048..a9b375db6 100644 --- a/kxkb/kcmlayout.h +++ b/kxkb/kcmlayout.h @@ -26,7 +26,8 @@ public: void save(); void defaults(); void initUI(); - + virtual TQString handbookSection() const; + protected: TQString createOptionString(); void updateIndicator(TQListViewItem* selLayout);