Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
frmPreferences: Double clicking an account opens the account settings
[xestiaab/.git] / source / frmPreferences.cpp
index 2b2f481..03bcd5e 100644 (file)
@@ -145,14 +145,22 @@ void frmPreferences::ModifyABAccount( wxCommandEvent& event )
        wxString AccName;
        wxString AccType;
     
-       wxFileConfig *cfgfile = new wxFileConfig("", "", AccFilename);
+       // Check if an account has been selected before continuing.
        
-       // Get the account name.
-    
        lstAccountsIndex = lstAccounts->GetNextItem(lstAccountsIndex,
                wxLIST_NEXT_ALL,
                wxLIST_STATE_SELECTED);
        
+       if (lstAccountsIndex == -1){
+               
+               // No account has been selected so exit this subroutine.
+               
+               return;
+               
+       }
+       
+       wxFileConfig *cfgfile = new wxFileConfig("", "", AccFilename);
+       
        // Check that the account type is a supported account type.
        
        AccType = preferences->accounts.GetAccountType((int)lstAccountsIndex);
@@ -164,6 +172,8 @@ void frmPreferences::ModifyABAccount( wxCommandEvent& event )
                return;
                        
        }
+       
+       // Get the account name.
     
        AccName = preferences->accounts.GetAccountName((int)lstAccountsIndex);
     
@@ -192,6 +202,14 @@ void frmPreferences::ModifyABAccount( wxCommandEvent& event )
     
 }
 
+void frmPreferences::ModifyABAccount( wxMouseEvent& event )
+{
+       
+       wxCommandEvent NullEvent;
+       ModifyABAccount(NullEvent);
+       
+}
+
 void frmPreferences::DeleteABAccount( wxCommandEvent& event )
 {
        // Display a confirmation dialog to confirm deletion.
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