]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinapplication.h
Do not warn the user about closing Dolphin windows with multiple tabs
[dolphin.git] / src / dolphinapplication.h
index af2006e7dc4a59c52874b0f2a3a0e4d2fb8922ed..4c65443612b777643ee7e7b85c507f34cc76da09 100644 (file)
@@ -56,6 +56,20 @@ public:
     /** @see KUniqueApplication::newInstance(). */
     virtual int newInstance();
 
+    /**
+     * Find out if Dolphin is closed directly by the user or
+     * by the session manager because the session is closed
+     */
+    bool closedBySessionManager() const;
+
+    /**
+     * This virtual function is called by the session manager when
+     * it closes Dolphin. It is reimplemented to make the information
+     * if Dolphin is closed by the session manager or not accessible in
+     * DolphinMainWindow (via the function closedBySessionManager()).
+     */
+    virtual void commitData(QSessionManager& sessionManager);
+
 public slots:
     int openWindow(const KUrl& url);
     int openSplitWindow(const KUrl& leftUrl,const KUrl& rightUrl);
@@ -67,6 +81,9 @@ protected:
 private:
     QList<DolphinMainWindow*> m_mainWindows;
     int m_lastId;
+
+    /** Is true if Dolphin is closed by the session manager **/
+    bool m_closedBySessionManager;
 };
 
 #endif