summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrell Anderson <humanreadable@yahoo.com>2013-03-02 21:18:59 -0600
committerDarrell Anderson <humanreadable@yahoo.com>2013-03-02 21:18:59 -0600
commit37c081e3b1c227ee6071991ccdae3e4a2b1b91c1 (patch)
tree14bfbda4b19b75fc7613833ce3177b9349583fb6
parent882522b23ab809294c32b0ea4da628c80100c3da (diff)
downloadtdebase-37c081e3b1c227ee6071991ccdae3e4a2b1b91c1.tar.gz
tdebase-37c081e3b1c227ee6071991ccdae3e4a2b1b91c1.zip
Add check box to control behavior of the Alt key in menu navigation.
This partially resolves bug report 1317.
-rw-r--r--kcontrol/style/kcmstyle.cpp23
-rw-r--r--kcontrol/style/kcmstyle.h11
2 files changed, 27 insertions, 7 deletions
diff --git a/kcontrol/style/kcmstyle.cpp b/kcontrol/style/kcmstyle.cpp
index f6925a0ba..ee5582928 100644
--- a/kcontrol/style/kcmstyle.cpp
+++ b/kcontrol/style/kcmstyle.cpp
@@ -183,8 +183,10 @@ KCMStyle::KCMStyle( TQWidget* parent, const char* name )
gbWidgetStyleLayout->addWidget( cbIconsOnButtons );
cbScrollablePopupMenus = new TQCheckBox( i18n("Enable &scrolling in popup menus"), gbWidgetStyle );
gbWidgetStyleLayout->addWidget( cbScrollablePopupMenus );
- cbAutoHideAccelerators = new TQCheckBox( i18n("Hide &accelerators when not in use"), gbWidgetStyle );
+ cbAutoHideAccelerators = new TQCheckBox( i18n("Hide &underlined characters in the menu bar when not in use"), gbWidgetStyle );
gbWidgetStyleLayout->addWidget( cbAutoHideAccelerators );
+ cbMenuAltKeyNavigation = new TQCheckBox( i18n("&Pressing only the menu bar activator key selects the menu bar"), gbWidgetStyle );
+ gbWidgetStyleLayout->addWidget( cbMenuAltKeyNavigation );
cbEnableTooltips = new TQCheckBox( i18n("E&nable tooltips"), gbWidgetStyle );
gbWidgetStyleLayout->addWidget( cbEnableTooltips );
cbTearOffHandles = new TQCheckBox( i18n("Show tear-off handles in &popup menus"), gbWidgetStyle );
@@ -385,6 +387,7 @@ KCMStyle::KCMStyle( TQWidget* parent, const char* name )
connect( cbIconsOnButtons, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setEffectsDirty()));
connect( cbScrollablePopupMenus,TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setEffectsDirty()));
connect( cbAutoHideAccelerators,TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setEffectsDirty()));
+ connect( cbMenuAltKeyNavigation,TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setEffectsDirty()));
connect( cbTearOffHandles, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setEffectsDirty()));
connect( comboToolbarIcons, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setToolbarsDirty()));
@@ -607,6 +610,7 @@ void KCMStyle::save()
TQSettings settings; // Only for TDEStyle stuff
settings.writeEntry("/TDEStyle/Settings/ScrollablePopupMenus", cbScrollablePopupMenus->isChecked() );
settings.writeEntry("/TDEStyle/Settings/AutoHideAccelerators", cbAutoHideAccelerators->isChecked() );
+ settings.writeEntry("/TDEStyle/Settings/MenuAltKeyNavigation", cbMenuAltKeyNavigation->isChecked() );
}
config.writeEntry( "EffectNoTooltip", !cbEnableTooltips->isChecked(), true, true );
@@ -1036,6 +1040,7 @@ void KCMStyle::loadMisc( TDEConfig& config )
TQSettings settings;
cbScrollablePopupMenus->setChecked(settings.readBoolEntry("/TDEStyle/Settings/ScrollablePopupMenus", false));
cbAutoHideAccelerators->setChecked(settings.readBoolEntry("/TDEStyle/Settings/AutoHideAccelerators", false));
+ cbMenuAltKeyNavigation->setChecked(settings.readBoolEntry("/TDEStyle/Settings/MenuAltKeyNavigation", true));
m_bToolbarsDirty = false;
}
@@ -1095,7 +1100,21 @@ void KCMStyle::addWhatsThis()
TQWhatsThis::add( cbIconsOnButtons, i18n( "If you enable this option, TDE Applications will "
"show small icons alongside some important buttons.") );
TQWhatsThis::add( cbScrollablePopupMenus, i18n( "If you enable this option, pop-up menus will scroll if vertical space is exhausted." ) );
- TQWhatsThis::add( cbAutoHideAccelerators, i18n( "If you enable this option, keyboard accelerator hints will be hidden unless the first accelerator key in the sequence (normally Alt) is depressed." ) );
+ TQWhatsThis::add( cbAutoHideAccelerators, i18n( "Program drop-down menus can be used with either the mouse or "
+ "keyboard. Each menu item on the menu bar that can be activated from the keyboard contains one "
+ "character that is underlined. When the underlined character key is pressed concurrently with the "
+ "activator key (usually Alt), the keyboard combination opens the menu or selects that menu item. The "
+ "underlines can remain hidden until the activator key is pressed or remain visible at all times. "
+ "Enabling this option hides the underlines until pressing the activator key. Note: some widget styles "
+ "do not support this feature." ) );
+ TQWhatsThis::add( cbMenuAltKeyNavigation, i18n( "When using the keyboard, program drop-down menus can be "
+ "activated in one of two ways. Concurrently press the activator key (usually Alt) and the underlined "
+ "character that is part of the menu name, or sequentially press and release the activator key and then "
+ "press the underlined character. Enabling this option selects the latter method. The method of "
+ "concurrently pressing both keys is supported in both Trinity and non Trinity programs. The choice "
+ "of using either method applies to Trinity Programs only and not to non Trinity programs. Regardless "
+ "of which option is preferred, after a desired menu opens, pressing only the respective underlined "
+ "key of any menu item is required to select that menu item.") );
TQWhatsThis::add( cbTearOffHandles, i18n( "If you enable this option some pop-up menus will "
"show so called tear-off handles. If you click them, you get the menu "
"inside a widget. This can be very helpful when performing "
diff --git a/kcontrol/style/kcmstyle.h b/kcontrol/style/kcmstyle.h
index 81bddf550..65f13992b 100644
--- a/kcontrol/style/kcmstyle.h
+++ b/kcontrol/style/kcmstyle.h
@@ -119,6 +119,11 @@ private:
StylePreview* stylePreview;
TQStyle* appliedStyle;
TQPalette palette;
+ TQCheckBox* cbIconsOnButtons;
+ TQCheckBox* cbScrollablePopupMenus;
+ TQCheckBox* cbAutoHideAccelerators;
+ TQCheckBox* cbMenuAltKeyNavigation;
+ TQCheckBox* cbEnableTooltips;
// Page2 widgets
TQCheckBox* cbEnableEffects;
@@ -147,19 +152,15 @@ private:
TQLabel* lblMenuEffectType;
TQLabel* lblMenuOpacity;
TQCheckBox* cbMenuShadow;
+ TQCheckBox* cbTearOffHandles;
// Page3 widgets
TQGroupBox* gbVisualAppearance;
TQCheckBox* cbHoverButtons;
TQCheckBox* cbTransparentToolbars;
- TQCheckBox* cbEnableTooltips;
TQComboBox* comboToolbarIcons;
- TQCheckBox* cbIconsOnButtons;
- TQCheckBox* cbScrollablePopupMenus;
- TQCheckBox* cbAutoHideAccelerators;
- TQCheckBox* cbTearOffHandles;
};
#endif // __KCMSTYLE_H