Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
frmMain: Close all windows on preferences, edit & delete calendar
[xestiacalendar/.git] / source / forms / main / frmMain-Window.cpp
index 401eead..ab1c7cb 100644 (file)
@@ -98,4 +98,28 @@ void frmMain::ShowEventWindow( wxCommandEvent &event ){
        frmEventEditorPtr->Raise();
     
 }
+
+bool frmMain::CloseAllWindows()
+{
+       // Attempt to close all windows.
+       
+       if (WindowListPointersMenu.size() == 0)
+       {
+               return true;
+       }
+       
+       if (wxMessageBox(_("Before preforming the action, all windows that are open will need to close. Do you wish to continue?"), _("Close All Windowss"), wxYES_NO) == wxYES)
+       {
+               for(std::map<int, void*>::iterator windowIter = WindowListPointers.begin();
+                       windowIter != WindowListPointers.end(); windowIter++)
+               {
+                       wxWindow *windowPointer = static_cast<wxWindow*>(windowIter->second);
+                       windowPointer->Close();
+               }
+               return true;
+       }
+       else
+       {
+               return false;
+       }
 }
\ No newline at end of file
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy