Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Move INSTALL, LICENSE, README, THANKS and TODO into root directory
[xestiaab/.git] / source / frmPreferences.cpp
index 03bcd5e..965bc2b 100644 (file)
@@ -23,7 +23,6 @@
 #include "common/preferences.h"
 #include "common/dirs.h"
 #include "bitmaps.h"
-#include "bitmaps/preferences.h"
 
 #include "import/import.h"
 #include "export/export.h"
@@ -326,19 +325,31 @@ void frmPreferences::LoadPreferences( wxInitDialogEvent& event )
     
        bool SaveWindowPos = preferences->GetBoolData(wxT("SaveWindowPosition"));
        bool HideLocalABs = preferences->GetBoolData(wxT("HideLocalAddressBooks"));
+       bool UseBackgroundContactColour = preferences->GetBoolData(wxT("UseBackgroundContactColour"));
     
-       if (SaveWindowPos == TRUE){
+       if (SaveWindowPos == true){
     
-               chkSaveWindowPosition->SetValue(TRUE);
+               chkSaveWindowPosition->SetValue(true);
     
        }
     
-       if (HideLocalABs == TRUE){
+       if (HideLocalABs == true){
     
-               chkHideLocal->SetValue(TRUE);
+               chkHideLocal->SetValue(true);
     
        }
     
+       if (UseBackgroundContactColour == true){
+               
+               chkUseBackgroundColour->SetValue(true);
+               clpContactBackgroundColour->SetColour(preferences->GetBackgroundContactColourData());
+               
+       } else {
+               
+               clpContactBackgroundColour->Enable(false);
+               
+       }
+       
        // Setup the Themes tab.
 
        wxListItem themecol0;
@@ -475,6 +486,19 @@ void frmPreferences::SavePreferences(wxCommandEvent &event){
                *ReloadAccountConfig = TRUE;
        
        }
+       
+       if (chkUseBackgroundColour->GetValue() == TRUE){
+               
+               cfgfile->Write(wxT("UseBackgroundContactColour"), wxT("true"));
+               cfgfile->Write(wxT("BackgroundContactColour"), clpContactBackgroundColour->GetColour().GetAsString(wxC2S_HTML_SYNTAX));
+               *ReloadAccountConfig = TRUE;
+               
+       } else {
+
+               cfgfile->Write(wxT("UseBackgroundContactColour"), wxT("false"));
+               *ReloadAccountConfig = TRUE;
+               
+       }
 
        delete cfgfile;
        cfgfile = NULL;
@@ -483,6 +507,16 @@ void frmPreferences::SavePreferences(wxCommandEvent &event){
 
 }
 
+void frmPreferences::EnableBackgroundColourPicker(wxCommandEvent &event){
+       
+       if (chkUseBackgroundColour->GetValue() == true){
+               clpContactBackgroundColour->Enable(true);
+       } else {
+               clpContactBackgroundColour->Enable(false);
+       }
+       
+}
+
 void frmPreferences::CloseWindow(wxCommandEvent &event){
 
        // Close the preferences window.
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