Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
frmPreferences: Clarified suffix as .CalDAV not .caldav
[xestiacalendar/.git] / source / forms / preferences / frmPreferences.cpp
index 07a4715..c1cd4fd 100644 (file)
@@ -23,13 +23,19 @@ frmPreferences::frmPreferences( wxWindow* parent )
 frmPreferencesADT( parent )
 {
 
-       wxMemoryInputStream bstream(icons_acclocal_png, sizeof(icons_acclocal_png));
+       wxMemoryInputStream astream(icons_acclocal_png, sizeof(icons_acclocal_png));
+       wxMemoryInputStream bstream(icons_accinet_png, sizeof(icons_accinet_png));
        wxMemoryInputStream cstream(icons_accunsupported_png, sizeof(icons_accunsupported_png));
 
-       wxImage icons_acclocal_png(bstream, wxBITMAP_TYPE_PNG);
+       wxImage icons_acclocal_png(astream, wxBITMAP_TYPE_PNG);
        wxBitmap accNIcon(icons_acclocal_png, -1);
        wxIcon wxIAccNIcon;
        wxIAccNIcon.CopyFromBitmap(accNIcon);
+
+       wxImage icons_accinet_png(bstream, wxBITMAP_TYPE_PNG);
+       wxBitmap accIIcon(icons_accinet_png, -1);
+       wxIcon wxIAccIIcon;
+       wxIAccIIcon.CopyFromBitmap(accIIcon);
        
        wxImage icons_accunsupported_png(cstream, wxBITMAP_TYPE_PNG);
        wxBitmap accUIcon(icons_accunsupported_png, -1);
@@ -37,6 +43,7 @@ frmPreferencesADT( parent )
        wxIAccUIcon.CopyFromBitmap(accUIcon);
        
        accountID = accImgList->Add(wxIAccNIcon);
+       accountNetID = accImgList->Add(wxIAccIIcon);
        accountUnsupportedID = accImgList->Add(wxIAccUIcon);
 
        NbtPreferences->RemovePage(1);
@@ -144,6 +151,10 @@ void frmPreferences::ReloadAccounts(){
        
                        col0.SetImage(accountID);
        
+               } else if (preferences->accounts.GetAccountType(i) == wxT("CalDAV")){
+               
+                       col0.SetImage(accountNetID);
+               
                } else {
 
                        col0.SetImage(accountUnsupportedID);
@@ -209,7 +220,7 @@ void frmPreferences::ModifyAccount( wxCommandEvent& event )
        
        accType = preferences->accounts.GetAccountType((int)lstAccountsIndex);
        
-       if (accType != "CardDAV" && accType != "carddav" &&
+       if (accType != "CalDAV" && accType != "caldav" &&
                accType != "Local" && accType != "local"){
        
                wxMessageBox(_("Cannot modify the selected account settings as the account type is unsupported."), _("Unsupported account type"), wxICON_ERROR);
@@ -302,21 +313,15 @@ void frmPreferences::DeleteAccount( wxCommandEvent& event )
                accountDirFull.Append(accountDir);
                accountDirFull.Append(wxT("."));
        
-               /*if (AccountType == wxT("CalDAV")){
+               if (accountType == wxT("CalDAV")){
        
-                       AccountDirFull.Append(wxT("local"));
+                       accountDirFull.Append(wxT("CalDAV"));
        
-               } else */
-               
-               if (accountType == wxT("Local")){
+               } else if (accountType == wxT("Local")){
        
                        accountDirFull.Append(wxT("Local"));
        
-               }/*else {
-                       
-                       AccountDirFull.Append(AccountType.Lower());
-                       
-               }*/
+               }
        
                lstAccounts->DeleteItem(lstAccountsIndex);
        
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