Add check box to control behavior of the Alt key in menu navigation.

This partially resolves bug report 1317.
pull/2/head
Darrell Anderson 11 years ago
parent 882522b23a
commit 37c081e3b1

@ -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 "

@ -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

Loading…
Cancel
Save