diff options
Diffstat (limited to 'kmenuedit/kmenuedit.cpp')
-rw-r--r-- | kmenuedit/kmenuedit.cpp | 8 |
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; |