Not Logged In
|
Login
|
Register
Home
|
News
|
Projects
|
Releases
Bugs
|
RFE
|
Repositories
|
Help
projects
/
xestiaab
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
frmPreferences: Double clicking an account opens the account settings
[xestiaab/.git]
/
source
/
frmPreferences.cpp
diff --git
a/source/frmPreferences.cpp
b/source/frmPreferences.cpp
index
2b2f481
..
03bcd5e
100644
(file)
--- a/
source/frmPreferences.cpp
+++ b/
source/frmPreferences.cpp
@@
-145,14
+145,22
@@
void frmPreferences::ModifyABAccount( wxCommandEvent& event )
wxString AccName;
wxString AccType;
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);
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);
// 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;
}
return;
}
+
+ // Get the account name.
AccName = preferences->accounts.GetAccountName((int)lstAccountsIndex);
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.
void frmPreferences::DeleteABAccount( wxCommandEvent& event )
{
// Display a confirmation dialog to confirm deletion.
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software
Xestia Address Book
Xestia Calendar
Development
Xestia Gelforn
Everything else
About
News
Privacy Policy