X-Git-Url: http://Server1/repobrowser/?p=xestiaab%2F.git;a=blobdiff_plain;f=source%2FfrmMain.cpp;h=bcbad5c1f484ad2a196b66fb4b5bf4dd2978b7e2;hp=03f8cd97f2b67d80a4f972393828efe74e472f24;hb=d71757f322746223ba535a9b04239541c81e3da3;hpb=245ade988ed226ea8d86254c59f823626d32c77d diff --git a/source/frmMain.cpp b/source/frmMain.cpp index 03f8cd9..bcbad5c 100644 --- a/source/frmMain.cpp +++ b/source/frmMain.cpp @@ -65,7 +65,6 @@ // Define the event types. DEFINE_EVENT_TYPE(CE_UPDATECONTACTLIST); -DEFINE_EVENT_TYPE(CE_UPDATEACCOUNTLIST); DEFINE_EVENT_TYPE(SE_UPDATECONTACTNOTIF); DEFINE_EVENT_TYPE(CE_OPENCONTACT); DEFINE_EVENT_TYPE(CE_OPENCONTACTLIST); @@ -99,7 +98,6 @@ DEFINE_EVENT_TYPE(INVALIDSSLTRUST); BEGIN_EVENT_TABLE(frmMain, wxFrame) EVT_COMMAND(wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, frmMain::ConflictResolution) EVT_COMMAND(wxID_ANY, CE_UPDATECONTACTLIST, frmMain::UpdateContactList) -EVT_COMMAND(wxID_ANY, CE_UPDATEACCOUNTLIST, frmMain::UpdateAccountList) EVT_COMMAND(wxID_ANY, SE_UPDATECONTACTNOTIF, frmMain::UpdateSearchContactLists) EVT_COMMAND(wxID_ANY, CE_OPENCONTACT, frmMain::OpenContactInfo) EVT_COMMAND(wxID_ANY, CE_OPENCONTACTLIST, frmMain::OpenContactInfoList) @@ -430,7 +428,7 @@ void frmMain::QuitApp() if (SaveWindowPos == TRUE){ - wxRect frmMainPos = this->GetRect(); + wxRect frmMainPos = GetRect(); cfgfile->Write(wxT("WindowPositionX"), frmMainPos.GetX()); cfgfile->Write(wxT("WindowPositionY"), frmMainPos.GetY()); @@ -442,7 +440,7 @@ void frmMain::QuitApp() delete cfgfile; cfgfile = NULL; - //Everything closed... exit. + // Everything closed... exit. std::exit(0); @@ -499,7 +497,7 @@ void frmMain::OpenPreferences( wxCommandEvent& event) // 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(); } @@ -524,7 +522,7 @@ void frmMain::OpenNewABDialog( wxCommandEvent& event) // Reload the accounts as a change has been made within // the application. - this->LoadPreferences(); + this->LoadPreferences(true); } @@ -1428,11 +1426,11 @@ void frmMain::LoadPreferences( wxActivateEvent& event) // Load the preferences. - this->LoadPreferences(); + this->LoadPreferences(true); } -void frmMain::LoadPreferences(){ +void frmMain::LoadPreferences(bool skipWindowSizeReload){ // Load the preferences. @@ -1446,7 +1444,7 @@ void frmMain::LoadPreferences(){ bool HideLocalABs = preferences.GetBoolData(wxT("HideLocalAddressBooks")); bool UseBackgroundContactColour = preferences.GetBoolData(wxT("UseBackgroundContactColour")); - if (SaveWindowPos == true){ + if (SaveWindowPos == true && skipWindowSizeReload == false){ this->SetSize(preferences.GetMainWindowData()); @@ -1789,12 +1787,6 @@ void frmMain::UpdateContactList(wxCommandEvent& event){ } -void frmMain::UpdateAccountList(wxCommandEvent& event){ - - // Update the account list (currently unimplemented). - -} - void frmMain::SetupPointers(void *ActMgrPtrInc){ // Setup the pointers for the main window. @@ -1838,7 +1830,7 @@ void frmMain::SetupForm(){ ciicon_png.LoadFile(ciextstream, wxBITMAP_TYPE_PNG); wxMemoryFSHandler::AddFile(wxT("ciext.png"), ciicon_png, wxBITMAP_TYPE_PNG); - LoadPreferences(); + LoadPreferences(false); } @@ -1963,8 +1955,8 @@ void frmMain::RevealContact(wxCommandEvent& event){ if (uc->ContactAccount == AccountAccDirList[i]){ - treAccounts->SelectItem(nextChild, TRUE); - AccCtrl->SetText(treAccounts->GetItemText(nextChild)); + treAccounts->SelectItem(nextChild, TRUE); + AccCtrl->SetText(treAccounts->GetItemText(nextChild)); }