summaryrefslogtreecommitdiffstats
path: root/kicker
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-22 03:37:49 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-22 03:37:49 +0000
commit669a3642fe3c59aae0474e67e0b8de3e076e0cd8 (patch)
treebe239d5f7637c368987185373ea8551840f52e90 /kicker
parentbcc78125bd52406adb0198f172ad2ef0dda6cd4b (diff)
downloadtdebase-669a3642fe3c59aae0474e67e0b8de3e076e0cd8.tar.gz
tdebase-669a3642fe3c59aae0474e67e0b8de3e076e0cd8.zip
Added configuration option to remove K Menu search field if it is not wanted by the end user
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1166509 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kicker')
-rw-r--r--kicker/kicker/ui/k_mnu.cpp24
-rw-r--r--kicker/libkicker/kickerSettings.kcfg5
2 files changed, 18 insertions, 11 deletions
diff --git a/kicker/kicker/ui/k_mnu.cpp b/kicker/kicker/ui/k_mnu.cpp
index 589ed74e8..ae5076501 100644
--- a/kicker/kicker/ui/k_mnu.cpp
+++ b/kicker/kicker/ui/k_mnu.cpp
@@ -220,17 +220,19 @@ void PanelKMenu::initialize()
PanelServiceMenu::initialize();
// Insert search field
- TQHBox* hbox = new TQHBox( this );
- KToolBarButton *clearButton = new KToolBarButton( "locationbar_erase", 0, hbox );
- searchEdit = new KPIM::ClickLineEdit(hbox, " "+i18n("Press '/' to search..."));
- hbox->setFocusPolicy(TQWidget::StrongFocus);
- hbox->setFocusProxy(searchEdit);
- hbox->setSpacing( 3 );
- connect(clearButton, TQT_SIGNAL(clicked()), searchEdit, TQT_SLOT(clear()));
- connect(this, TQT_SIGNAL(aboutToHide()), this, TQT_SLOT(slotClearSearch()));
- connect(searchEdit, TQT_SIGNAL(textChanged(const TQString&)),
- this, TQT_SLOT( slotUpdateSearch( const TQString&)));
- insertItem(hbox, searchLineID, 0);
+ if (KickerSettings::UseSearchBar())
+ TQHBox* hbox = new TQHBox( this );
+ KToolBarButton *clearButton = new KToolBarButton( "locationbar_erase", 0, hbox );
+ searchEdit = new KPIM::ClickLineEdit(hbox, " "+i18n("Press '/' to search..."));
+ hbox->setFocusPolicy(TQWidget::StrongFocus);
+ hbox->setFocusProxy(searchEdit);
+ hbox->setSpacing( 3 );
+ connect(clearButton, TQT_SIGNAL(clicked()), searchEdit, TQT_SLOT(clear()));
+ connect(this, TQT_SIGNAL(aboutToHide()), this, TQT_SLOT(slotClearSearch()));
+ connect(searchEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT( slotUpdateSearch( const TQString&)));
+ insertItem(hbox, searchLineID, 0);
+ }
//TQToolTip::add(clearButton, i18n("Clear Search"));
//TQToolTip::add(searchEdit, i18n("Enter the name of an application"));
diff --git a/kicker/libkicker/kickerSettings.kcfg b/kicker/libkicker/kickerSettings.kcfg
index 7e6f76366..ff86c8431 100644
--- a/kicker/libkicker/kickerSettings.kcfg
+++ b/kicker/libkicker/kickerSettings.kcfg
@@ -255,6 +255,11 @@
<default>true</default>
</entry>
+<entry name="UseSearchBar" type="Bool" >
+ <label>Show searh field in Kmenu</label>
+ <default>true</default>
+ </entry>
+
<entry name="SidePixmapName" key="SideName" type="String" >
<label>The name of the file to use as the side image in the K Menu</label>
<default>kside.png</default>