Update of /cvsroot/mahogany/M/include/gui
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv20191/include/gui

Modified Files:
        wxMainFrame.h 
Log Message:
close all opened folders when the machine is suspended and reopen them on resume

Index: wxMainFrame.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/gui/wxMainFrame.h,v
retrieving revision 1.44
retrieving revision 1.45
diff -b -u -2 -r1.44 -r1.45
--- wxMainFrame.h       11 Oct 2003 23:13:46 -0000      1.44
+++ wxMainFrame.h       27 May 2006 16:27:12 -0000      1.45
@@ -26,5 +26,10 @@
 #include "MEvent.h"
 
+#if wxCHECK_VERSION(2,7,0)
+   #include <wx/power.h>
+#endif
+
 class MFolder;
+class MFolderList;
 class wxFolderView;
 class wxFolderTree;
@@ -67,4 +72,12 @@
    void OnAbout(wxCommandEvent &) { OnMenuCommand(WXMENU_HELP_ABOUT);}
 
+#ifdef wxHAS_POWER_EVENTS
+   void OnPowerSuspending(wxPowerEvent& event);
+   void OnPowerSuspended(wxPowerEvent& event);
+   void OnPowerSuspendCancel(wxPowerEvent& event) { DoResume(); }
+   void OnPowerResume(wxPowerEvent&) { DoResume(); }
+#endif // wxHAS_POWER_EVENTS
+
+
    /// Mahogany event processing
    virtual bool OnMEvent(MEventData& event);
@@ -118,4 +131,16 @@
    void *m_cookieASMf;
 
+
+#ifdef wxHAS_POWER_EVENTS
+   /// Reopen the folders closed when we suspended
+   void DoResume();
+
+   // the list of folders automatically closed when we suspended or NULL
+   MFolderList *m_foldersToReopen;
+
+   // the name of the folder which was opened in the main frame
+   String m_folderToReopenHere;
+#endif // wxHAS_POWER_EVENTS
+
 private:
    /// create and initialize the modules menu



-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to