void frmMain::OpenPreferences( wxCommandEvent& event)
{
+ // Close all windows first.
+
+ if (CloseAllWindows() == false)
+ {
+ return;
+ }
+
// Open the preferences window.
ReloadAccounts = FALSE;
htmContactData->SetPage(EmptyPage);
AccCtrl->SetValue("");
+}
+
+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
#else
void UpdateSSLAccountStatus(int AccountID, int SSLStatus, SSLCertCollectionString SSLCertInc);
#endif
+ bool CloseAllWindows();
DECLARE_EVENT_TABLE()
//// end generated class members