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
v3.5.13-sru
tpearson 14 years ago
parent bcc78125bd
commit 669a3642fe

@ -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>&lt;qt&gt;When this option is selected a text-based search field will appear in the K Menu.&lt;/qt&gt;</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>

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

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

Loading…
Cancel
Save