diff options
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 |