summaryrefslogtreecommitdiffstats
path: root/kcontrol
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-30 22:37:48 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-30 22:37:48 +0000
commit629f3ca50a803e5a614a41f2c334fb12331dae45 (patch)
treeeabba6d816c923c550dfaf13a2387dc1a75e62d3 /kcontrol
parent1a308b9fda185e0ea35b276da5814710935b0578 (diff)
downloadtdebase-629f3ca50a803e5a614a41f2c334fb12331dae45.tar.gz
tdebase-629f3ca50a803e5a614a41f2c334fb12331dae45.zip
Add option in kcontrol->styles to enable scrolling in popup menus
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1244135 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol')
-rw-r--r--kcontrol/style/kcmstyle.cpp11
-rw-r--r--kcontrol/style/kcmstyle.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/kcontrol/style/kcmstyle.cpp b/kcontrol/style/kcmstyle.cpp
index 41d775ba5..5caef15d3 100644
--- a/kcontrol/style/kcmstyle.cpp
+++ b/kcontrol/style/kcmstyle.cpp
@@ -181,6 +181,8 @@ KCMStyle::KCMStyle( TQWidget* parent, const char* name )
cbIconsOnButtons = new TQCheckBox( i18n("Sho&w icons on buttons"), gbWidgetStyle );
gbWidgetStyleLayout->addWidget( cbIconsOnButtons );
+ cbScrollablePopupMenus = new TQCheckBox( i18n("Enable &scrolling in popup menus"), gbWidgetStyle );
+ gbWidgetStyleLayout->addWidget( cbScrollablePopupMenus );
cbEnableTooltips = new TQCheckBox( i18n("E&nable tooltips"), gbWidgetStyle );
gbWidgetStyleLayout->addWidget( cbEnableTooltips );
cbTearOffHandles = new TQCheckBox( i18n("Show tear-off handles in &popup menus"), gbWidgetStyle );
@@ -379,6 +381,7 @@ KCMStyle::KCMStyle( TQWidget* parent, const char* name )
connect( cbTransparentToolbars, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setToolbarsDirty()));
connect( cbEnableTooltips, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setEffectsDirty()));
connect( cbIconsOnButtons, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setEffectsDirty()));
+ connect( cbScrollablePopupMenus,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()));
@@ -597,6 +600,10 @@ void KCMStyle::save()
// Misc page
config.writeEntry( "ShowIconsOnPushButtons", cbIconsOnButtons->isChecked(), true, true );
+ { // Braces force a TQSettings::sync()
+ TQSettings settings; // Only for KStyle stuff
+ settings.writeEntry("/KStyle/Settings/ScrollablePopupMenus", cbScrollablePopupMenus->isChecked() );
+ }
config.writeEntry( "EffectNoTooltip", !cbEnableTooltips->isChecked(), true, true );
config.setGroup("General");
@@ -1022,6 +1029,9 @@ void KCMStyle::loadMisc( KConfig& config )
cbEnableTooltips->setChecked(!config.readBoolEntry("EffectNoTooltip", false));
cbTearOffHandles->setChecked(config.readBoolEntry("InsertTearOffHandle", false));
+ TQSettings settings;
+ cbScrollablePopupMenus->setChecked(settings.readBoolEntry("/KStyle/Settings/ScrollablePopupMenus", false));
+
m_bToolbarsDirty = false;
}
@@ -1079,6 +1089,7 @@ void KCMStyle::addWhatsThis()
"Text is aligned below the icon.") );
TQWhatsThis::add( cbIconsOnButtons, i18n( "If you enable this option, KDE 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( 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 35fccf773..a0e04e134 100644
--- a/kcontrol/style/kcmstyle.h
+++ b/kcontrol/style/kcmstyle.h
@@ -157,6 +157,7 @@ private:
TQComboBox* comboToolbarIcons;
TQCheckBox* cbIconsOnButtons;
+ TQCheckBox* cbScrollablePopupMenus;
TQCheckBox* cbTearOffHandles;
};