Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
frmPreferences: Implemented support for CalDAV accounts
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 6 Dec 2017 23:27:48 +0000 (23:27 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 6 Dec 2017 23:27:48 +0000 (23:27 +0000)
source/forms/preferences/frmPreferences.cpp

index 07a4715..a49ed41 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);
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