Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
frmPreferences: Implemented Win32 support
[xestiacalendar/.git] / source / forms / preferences / frmPreferences.cpp
index a49ed41..77abeae 100644 (file)
@@ -313,32 +313,36 @@ 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);
        
                // Delete the directory that contains the account information.
        
                if (!accountDirFull.IsEmpty()){
-       
+
+#if defined(__WIN32__)
+
+                       accountDirDelFull.Append(GetUserDir());
+                       accountDirDelFull.Append(wxT("\\accounts\\"));
+                       accountDirDelFull.Append(accountDirFull);
+
+#else
+
                        accountDirDelFull.Append(wxString::FromUTF8(getenv("HOME")));
                        accountDirDelFull.Append(wxT("/.xestiacal/accounts/"));
                        accountDirDelFull.Append(accountDirFull);
        
+#endif
+
                        wxRmDir(accountDirDelFull);
        
                }
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