summaryrefslogtreecommitdiffstats
path: root/kcontrol
diff options
context:
space:
mode:
Diffstat (limited to 'kcontrol')
-rw-r--r--kcontrol/kicker/menutab.ui36
-rw-r--r--kcontrol/kicker/menutab_impl.cpp14
-rw-r--r--kcontrol/kicker/menutab_impl.h3
3 files changed, 51 insertions, 2 deletions
diff --git a/kcontrol/kicker/menutab.ui b/kcontrol/kicker/menutab.ui
index fa3868004..460c82c0d 100644
--- a/kcontrol/kicker/menutab.ui
+++ b/kcontrol/kicker/menutab.ui
@@ -705,7 +705,40 @@
<string>&lt;qt&gt;When this option is selected a text-based search field will appear in the TDE Menu.&lt;/qt&gt;</string>
</property>
</widget>
- <spacer row="0" column="1" rowspan="3" colspan="1">
+
+ <widget class="TQLayoutWidget" row="2" column="0">
+ <property name="name">
+ <cstring>m_searchShortcutLayout</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+
+ <widget class="TQLabel">
+ <property name="name">
+ <cstring>searchShortcutLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Search shortcut:</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>From here you can change the keyboard shortcut which triggers the search line in the TDE Menu.</string>
+ </property>
+ </widget>
+
+ <widget class="KKeyButton">
+ <property name="name">
+ <cstring>m_searchShortcut</cstring>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>From here you can change the keyboard shortcut which triggers the search line in the TDE Menu.</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+
+ <spacer row="0" column="1" rowspan="3" colspan="2">
<property name="name">
<cstring>Spacer8</cstring>
</property>
@@ -749,6 +782,7 @@
<include location="global" impldecl="in implementation">kpushbutton.h</include>
<include location="global" impldecl="in implementation">tdefontrequester.h</include>
<include location="global" impldecl="in implementation">tdelistview.h</include>
+ <include location="global" impldecl="in implementation">kkeybutton.h</include>
</includes>
<layoutdefaults spacing="6" margin="11"/>
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
diff --git a/kcontrol/kicker/menutab_impl.cpp b/kcontrol/kicker/menutab_impl.cpp
index fe20f2302..7a3bc768b 100644
--- a/kcontrol/kicker/menutab_impl.cpp
+++ b/kcontrol/kicker/menutab_impl.cpp
@@ -37,6 +37,7 @@
#include <knuminput.h>
#include <kstandarddirs.h>
#include <tdefontrequester.h>
+#include <kkeybutton.h>
#include <kicondialog.h>
#include <kiconloader.h>
@@ -168,7 +169,12 @@ void MenuTab::load( bool useDefaults )
connect(m_openOnHover, TQT_SIGNAL(clicked()), TQT_SIGNAL(changed()));
m_showFrequent->setChecked(true);
-
+
+ c->setGroup("KMenu");
+ m_searchShortcut->setShortcut(TDEShortcut(c->readEntry("SearchShortcut", "/")));
+ connect(m_searchShortcut, TQT_SIGNAL(capturedShortcut(const TDEShortcut&)), TQT_SIGNAL(changed()));
+ connect(m_searchShortcut, TQT_SIGNAL(capturedShortcut(const TDEShortcut&)), TQT_SLOT(setSearchShortcut(const TDEShortcut&)));
+
if ( useDefaults )
emit changed();
}
@@ -288,6 +294,7 @@ void MenuTab::save()
// Save KMenu settings
c->setGroup("KMenu");
c->writeEntry("CustomIcon", m_kmenu_icon);
+ c->writeEntry("SearchShortcut", (m_searchShortcut->shortcut()).toString());
c->sync();
// Save recent documents
@@ -349,3 +356,8 @@ void MenuTab::kmenuChanged()
//m_kmenu_button_changed = true;
emit changed();
}
+
+void MenuTab::setSearchShortcut(const TDEShortcut &cut)
+{
+ m_searchShortcut->setShortcut(cut, false);
+}
diff --git a/kcontrol/kicker/menutab_impl.h b/kcontrol/kicker/menutab_impl.h
index b143b0072..509623d61 100644
--- a/kcontrol/kicker/menutab_impl.h
+++ b/kcontrol/kicker/menutab_impl.h
@@ -21,6 +21,7 @@
#include <tqlistview.h>
#include <stdlib.h>
+#include <tdeshortcut.h>
#include <kpushbutton.h>
#include "menutab.h"
@@ -68,12 +69,14 @@ public slots:
void menuStyleChanged();
void launchIconEditor();
void kmenuChanged();
+ void setSearchShortcut(const TDEShortcut &cut);
protected:
kSubMenuItem *m_bookmarkMenu;
kSubMenuItem *m_quickBrowserMenu;
TQString m_kmenu_icon;
bool m_kmenu_button_changed;
+
};
#endif