summaryrefslogtreecommitdiffstats
path: root/kate/app/katesessionpanel.h
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2016-04-21 14:45:42 +1000
committerMichele Calgaro <[email protected]>2016-04-21 14:45:42 +1000
commit074f8c7ccb685fb9fa2a51dec5049637e727a9c2 (patch)
tree31d9573f8c8bac4fbb0da6b9410a94ca47d62c42 /kate/app/katesessionpanel.h
parent749b05ce92c640ae42548a8929c2eb163d56d6f7 (diff)
downloadtdebase-074f8c7ccb685fb9fa2a51dec5049637e727a9c2.tar.gz
tdebase-074f8c7ccb685fb9fa2a51dec5049637e727a9c2.zip
Kate session panel: fixed handling of volatile sessions. Also bug fixes and improved model-view code separation
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'kate/app/katesessionpanel.h')
-rw-r--r--kate/app/katesessionpanel.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/kate/app/katesessionpanel.h b/kate/app/katesessionpanel.h
index 2dd7347a7..6899d68e9 100644
--- a/kate/app/katesessionpanel.h
+++ b/kate/app/katesessionpanel.h
@@ -41,6 +41,7 @@ class TDEActionCollection;
//BEGIN KateSessionNameChooser
+//FIXME create one single KateSessionNameChooser and reuse it all the time
class KateSessionNameChooser : public KDialogBase
{
Q_OBJECT
@@ -137,8 +138,19 @@ class KateSessionPanel : public TQVBox
void slotSessionRenamed(int sessionId);
void slotLVSessionRenamed(TQListViewItem *item);
- private:
+ protected:
void setup_toolbar();
+
+ /* In case the current session is still volatile, asks the user whether
+ he wants to save or discard the session.
+ Returns one of the following:
+ - KMessageBox::Cancel : the user wants to abort the current operation
+ - KMessageBox::No : the user wants to discard the session and continue
+ - KMessageBox::Yes : the user wants to save the session and continue
+ In case the user decides to save the session, the function also sets
+ the new session name provided in the dialog box.
+ */
+ int handleVolatileSession();
KateMainWindow *m_mainWin;
KateViewManager *m_viewManager;