Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
frmMain: Close all windows on preferences, edit & delete calendar
[xestiacalendar/.git] / source / forms / main / frmMain.cpp
index 835118b..8d6a4f8 100644 (file)
@@ -258,6 +258,13 @@ void frmMain::LoadAccountData(){
 void frmMain::ShowPreferencesWindow( wxCommandEvent& event )
 {
 
+       // Close all windows first.
+       
+       if (CloseAllWindows() == false)
+       {
+               return;
+       }
+       
        // Open the preferences window.
     
        reloadAccounts = FALSE;
@@ -378,6 +385,13 @@ void frmMain::CreateNewCalendar( wxCommandEvent& event )
 void frmMain::EditCalendar( wxCommandEvent& event )
 {
        
+       // Close all windows first.
+       
+       if (CloseAllWindows() == false)
+       {
+               return;
+       }
+       
        // Get the calendar data.
        
        CDSGetCalendarInfo calendarInfo = calendarData.GetCalendar(event.GetInt());
@@ -395,6 +409,13 @@ void frmMain::EditCalendar( wxCommandEvent& event )
 void frmMain::DeleteCalendar( wxCommandEvent& event )
 {
 
+       // Close all windows first.
+       
+       if (CloseAllWindows() == false)
+       {
+               return;
+       }
+       
        CalendarProperties *calendarEventInfo = (CalendarProperties*)event.GetClientData();
        
        // Get the calendar data.
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