diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-07 19:42:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-07 19:42:15 +0000 |
commit | 9cc1e2c1aa2629d499e7555acd4906d6cc989cf9 (patch) | |
tree | 2a737f47bb029688c2f5ebef76869903cf4b4eec /kmenuedit | |
parent | eaa51fec106463800192924168eaf9f03f188655 (diff) | |
download | tdebase-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')
-rw-r--r-- | kmenuedit/kcontroleditui.rc | 1 | ||||
-rw-r--r-- | kmenuedit/kmenuedit.cpp | 8 | ||||
-rw-r--r-- | kmenuedit/kmenuedit.h | 1 | ||||
-rw-r--r-- | kmenuedit/kmenueditui.rc | 1 | ||||
-rw-r--r-- | kmenuedit/pixmaps/cr22-action-filesave_and_close.png | bin | 0 -> 3263 bytes |
5 files changed, 11 insertions, 0 deletions
diff --git a/kmenuedit/kcontroleditui.rc b/kmenuedit/kcontroleditui.rc index 18bc04fcb..8e621a98a 100644 --- a/kmenuedit/kcontroleditui.rc +++ b/kmenuedit/kcontroleditui.rc @@ -8,6 +8,7 @@ <Action name="newsubmenu" /> <Separator/> <Action name="file_save"/> + <Action name="file_save_and_quit"/> <Separator/> <Action name="file_quit"/> </Menu> 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; diff --git a/kmenuedit/kmenuedit.h b/kmenuedit/kmenuedit.h index 08c89a6be..bc9bd13c1 100644 --- a/kmenuedit/kmenuedit.h +++ b/kmenuedit/kmenuedit.h @@ -46,6 +46,7 @@ protected: protected slots: void slotSave(); + void slotSave_and_close(); void slotChangeView(); void slotConfigureToolbars(); protected: diff --git a/kmenuedit/kmenueditui.rc b/kmenuedit/kmenueditui.rc index 66330e740..eb8c3ae00 100644 --- a/kmenuedit/kmenueditui.rc +++ b/kmenuedit/kmenueditui.rc @@ -9,6 +9,7 @@ <Action name="newsep" /> <Separator/> <Action name="file_save"/> + <Action name="file_save_and_quit"/> <Separator/> <Action name="file_quit"/> </Menu> diff --git a/kmenuedit/pixmaps/cr22-action-filesave_and_close.png b/kmenuedit/pixmaps/cr22-action-filesave_and_close.png Binary files differnew file mode 100644 index 000000000..7d4b6f365 --- /dev/null +++ b/kmenuedit/pixmaps/cr22-action-filesave_and_close.png |