Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added check to see if any accounts are selected.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 24 Feb 2016 13:13:28 +0000 (13:13 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 24 Feb 2016 13:13:28 +0000 (13:13 +0000)
source/search/frmSearch.cpp

index b4b8104..23b32b6 100644 (file)
@@ -133,6 +133,31 @@ void frmSearch::SelectAccounts( wxCommandEvent& event )
 void frmSearch::SearchContacts( wxCommandEvent& event )
 {
 
+       // Check if any accounts has been selected.
+       
+       bool AccountsFound = false;
+       
+       for (std::map<wxString, bool>::iterator saiter = SearchAccounts.begin(); 
+               saiter != SearchAccounts.end(); saiter++){
+               
+               if (saiter->second == true){
+                       
+                       AccountsFound = true;
+                       break;
+                       
+               }
+                       
+       }
+       
+       if (AccountsFound == false){
+       
+               wxMessageBox(_("No accounts have been selected to search contacts for."),
+                       _("No accounts selected"), 
+                       wxOK|wxICON_ERROR);
+               return;
+               
+       }
+       
        // Change the button to stop.
        
        if (StopMode == FALSE){
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