summaryrefslogtreecommitdiffstats
path: root/kmenuedit/kmenuedit.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-07 19:42:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-07 19:42:15 +0000
commit9cc1e2c1aa2629d499e7555acd4906d6cc989cf9 (patch)
tree2a737f47bb029688c2f5ebef76869903cf4b4eec /kmenuedit/kmenuedit.cpp
parenteaa51fec106463800192924168eaf9f03f188655 (diff)
downloadtdebase-9cc1e2c1aa2629d499e7555acd4906d6cc989cf9.tar.gz
tdebase-9cc1e2c1aa2629d499e7555acd4906d6cc989cf9.zip
Merged in remaining kdebase bugfixes from the Chakra project
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1172677 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmenuedit/kmenuedit.cpp')
-rw-r--r--kmenuedit/kmenuedit.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/kmenuedit/kmenuedit.cpp b/kmenuedit/kmenuedit.cpp
index 9474d85eb..37ab13676 100644
--- a/kmenuedit/kmenuedit.cpp
+++ b/kmenuedit/kmenuedit.cpp
@@ -67,6 +67,8 @@ void KMenuEdit::setupActions()
if (!m_controlCenter)
(void)new KAction(i18n("New S&eparator"), "menu_new_sep", 0, actionCollection(), "newsep");
+ (void)new KAction(i18n("Save && Quit"), "filesave_and_close", 0, this, TQT_SLOT( slotSave_and_close()), actionCollection(), "file_save_and_quit");
+
m_actionDelete = 0;
KStdAction::save(this, TQT_SLOT( slotSave() ), actionCollection());
@@ -141,6 +143,12 @@ void KMenuEdit::slotSave()
m_tree->save();
}
+void KMenuEdit::slotSave_and_close()
+{
+ if (m_tree->save())
+ close();
+}
+
bool KMenuEdit::queryClose()
{
if (!m_tree->dirty()) return true;