if (SaveWindowPos == TRUE){
- wxRect frmMainPos = this->GetRect();
+ wxRect frmMainPos = GetRect();
cfgfile->Write(wxT("WindowPositionX"), frmMainPos.GetX());
cfgfile->Write(wxT("WindowPositionY"), frmMainPos.GetY());
delete cfgfile;
cfgfile = NULL;
- //Everything closed... exit.
+ // Everything closed... exit.
std::exit(0);
// Reload the accounts as a change has been made within
// the application and clear the current contact information.
- this->LoadPreferences();
+ this->LoadPreferences(true);
this->ResetContactInfo();
}
// Reload the accounts as a change has been made within
// the application.
- this->LoadPreferences();
+ this->LoadPreferences(true);
}
// Load the preferences.
- this->LoadPreferences();
+ this->LoadPreferences(true);
}
-void frmMain::LoadPreferences(){
+void frmMain::LoadPreferences(bool skipWindowSizeReload){
// Load the preferences.
bool HideLocalABs = preferences.GetBoolData(wxT("HideLocalAddressBooks"));
bool UseBackgroundContactColour = preferences.GetBoolData(wxT("UseBackgroundContactColour"));
- if (SaveWindowPos == true){
+ if (SaveWindowPos == true && skipWindowSizeReload == false){
this->SetSize(preferences.GetMainWindowData());
ciicon_png.LoadFile(ciextstream, wxBITMAP_TYPE_PNG);
wxMemoryFSHandler::AddFile(wxT("ciext.png"), ciicon_png, wxBITMAP_TYPE_PNG);
- LoadPreferences();
+ LoadPreferences(false);
}
if (uc->ContactAccount == AccountAccDirList[i]){
- treAccounts->SelectItem(nextChild, TRUE);
- AccCtrl->SetText(treAccounts->GetItemText(nextChild));
+ treAccounts->SelectItem(nextChild, TRUE);
+ AccCtrl->SetText(treAccounts->GetItemText(nextChild));
}
void OpenPreferences( wxCommandEvent& event );
void OpenNewABDialog( wxCommandEvent& event );
void LoadPreferences( wxActivateEvent& event );
- void LoadPreferences();
+ void LoadPreferences(bool skipWindowSizeReload);
void ShowContactInfo( wxListEvent& event );
void OpenContactInfoList( wxListEvent& event );
void OpenContactInfoList( wxCommandEvent& event );