Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Preferences: Option to select background colour for contacts
[xestiaab/.git] / source / AppXestiaAddrBk.cpp
index 8ffcff5..3e55af5 100644 (file)
@@ -575,7 +575,7 @@ frmPreferencesADT::frmPreferencesADT( wxWindow* parent, wxWindowID id, const wxS
        tabGeneral->SetSizer( szrGeneral );
        tabGeneral->Layout();
        szrGeneral->Fit( tabGeneral );
-       NbtPreferences->AddPage( tabGeneral, wxT("General"), false );
+       NbtPreferences->AddPage( tabGeneral, wxT("General"), true );
        tabTheme = new wxPanel( NbtPreferences, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
        tabTheme->Hide();
        
@@ -651,7 +651,25 @@ frmPreferencesADT::frmPreferencesADT( wxWindow* parent, wxWindowID id, const wxS
        tabAccounts->SetSizer( szrAccounts );
        tabAccounts->Layout();
        szrAccounts->Fit( tabAccounts );
-       NbtPreferences->AddPage( tabAccounts, wxT("Accounts"), true );
+       NbtPreferences->AddPage( tabAccounts, wxT("Accounts"), false );
+       tabContacts = new wxPanel( NbtPreferences, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+       wxFlexGridSizer* szrContacts;
+       szrContacts = new wxFlexGridSizer( 1, 2, 0, 0 );
+       szrContacts->AddGrowableCol( 0 );
+       szrContacts->SetFlexibleDirection( wxBOTH );
+       szrContacts->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+       
+       chkUseBackgroundColour = new wxCheckBox( tabContacts, wxID_ANY, wxT("Use different background colour"), wxDefaultPosition, wxDefaultSize, 0 );
+       szrContacts->Add( chkUseBackgroundColour, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+       
+       clpContactBackgroundColour = new wxColourPickerCtrl( tabContacts, wxID_ANY, wxColour( 255, 255, 255 ), wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE );
+       szrContacts->Add( clpContactBackgroundColour, 0, wxALL, 5 );
+       
+       
+       tabContacts->SetSizer( szrContacts );
+       tabContacts->Layout();
+       szrContacts->Fit( tabContacts );
+       NbtPreferences->AddPage( tabContacts, wxT("Contacts"), false );
        
        szrTabs->Add( NbtPreferences, 1, wxALL|wxEXPAND, 5 );
        
@@ -699,6 +717,7 @@ frmPreferencesADT::frmPreferencesADT( wxWindow* parent, wxWindowID id, const wxS
        btnAccountAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddABAccount ), NULL, this );
        btnAccountModify->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::ModifyABAccount ), NULL, this );
        btnAccountDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::DeleteABAccount ), NULL, this );
+       chkUseBackgroundColour->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmPreferencesADT::EnableBackgroundColourPicker ), NULL, this );
        btnSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::SavePreferences ), NULL, this );
        btnCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::CloseWindow ), NULL, this );
 }
@@ -718,6 +737,7 @@ frmPreferencesADT::~frmPreferencesADT()
        btnAccountAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddABAccount ), NULL, this );
        btnAccountModify->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::ModifyABAccount ), NULL, this );
        btnAccountDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::DeleteABAccount ), NULL, this );
+       chkUseBackgroundColour->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( frmPreferencesADT::EnableBackgroundColourPicker ), NULL, this );
        btnSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::SavePreferences ), NULL, this );
        btnCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::CloseWindow ), NULL, this );
        
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