diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-08-22 03:37:49 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-08-22 03:37:49 +0000 |
commit | 669a3642fe3c59aae0474e67e0b8de3e076e0cd8 (patch) | |
tree | be239d5f7637c368987185373ea8551840f52e90 | |
parent | bcc78125bd52406adb0198f172ad2ef0dda6cd4b (diff) | |
download | tdebase-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
-rw-r--r-- | kcontrol/kicker/menutab.ui | 51 | ||||
-rw-r--r-- | kicker/kicker/ui/k_mnu.cpp | 24 | ||||
-rw-r--r-- | kicker/libkicker/kickerSettings.kcfg | 5 |
3 files changed, 67 insertions, 13 deletions
diff --git a/kcontrol/kicker/menutab.ui b/kcontrol/kicker/menutab.ui index e64285767..d29c41e16 100644 --- a/kcontrol/kicker/menutab.ui +++ b/kcontrol/kicker/menutab.ui @@ -185,7 +185,7 @@ </sizepolicy> </property> <property name="text"> - <string>Custom K Menu button icon:</string> + <string>K Menu button icon:</string> </property> </widget> <widget class="KPushButton" row="3" column="3" colspan="2"> @@ -506,7 +506,7 @@ </spacer> </grid> </widget> - <widget class="QButtonGroup" row="0" column="1" rowspan="2"> + <widget class="QButtonGroup" row="0" column="1" rowspan="1"> <property name="name"> <cstring>m_pRecentOrderGroup</cstring> </property> @@ -602,6 +602,53 @@ </spacer> </grid> </widget> + <widget class="QButtonGroup" row="1" column="1" rowspan="1"> + <property name="name"> + <cstring>m_pSearchGroup</cstring> + </property> + <property name="title"> + <string>K Menu Search</string> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QCheckBox"> + <property name="name"> + <cstring>kcfg_UseSearchBar</cstring> + </property> + <property name="text"> + <string>Show search field in K Menu</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="whatsThis" stdset="0"> + <string><qt>When this option is selected a text-based search field will appear in the K Menu.</qt></string> + </property> + </widget> + <spacer row="0" column="1" rowspan="3" colspan="1"> + <property name="name"> + <cstring>Spacer8</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + </spacer> + </grid> + </widget> </grid> </vbox> </widget> 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> |