Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
frmPreferences: Double clicking an account opens the account settings
[xestiaab/.git] / source / AppXestiaAddrBk.cpp
index ba93145..8ffcff5 100644 (file)
@@ -547,20 +547,35 @@ frmPreferencesADT::frmPreferencesADT( wxWindow* parent, wxWindowID id, const wxS
        
        NbtPreferences = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
        tabGeneral = new wxPanel( NbtPreferences, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
-       wxBoxSizer* szrChecks;
-       szrChecks = new wxBoxSizer( wxVERTICAL );
+       wxFlexGridSizer* szrGeneral;
+       szrGeneral = new wxFlexGridSizer( 2, 2, 0, 0 );
+       szrGeneral->AddGrowableCol( 1 );
+       szrGeneral->SetFlexibleDirection( wxBOTH );
+       szrGeneral->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+       
+       bmpWindowPosition = new wxStaticBitmap( tabGeneral, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 32,32 ), 0 );
+       bmpWindowPosition->SetMinSize( wxSize( 32,32 ) );
+       bmpWindowPosition->SetMaxSize( wxSize( 32,32 ) );
+       
+       szrGeneral->Add( bmpWindowPosition, 0, wxALL, 5 );
        
        chkSaveWindowPosition = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Save window position on exit"), wxDefaultPosition, wxDefaultSize, 0 );
-       szrChecks->Add( chkSaveWindowPosition, 0, wxALL, 5 );
+       szrGeneral->Add( chkSaveWindowPosition, 0, wxALL, 5 );
+       
+       bmpLocalAddressBooks = new wxStaticBitmap( tabGeneral, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 32,32 ), 0 );
+       bmpLocalAddressBooks->SetMinSize( wxSize( 32,32 ) );
+       bmpLocalAddressBooks->SetMaxSize( wxSize( 32,32 ) );
+       
+       szrGeneral->Add( bmpLocalAddressBooks, 0, wxALL, 5 );
        
        chkHideLocal = new wxCheckBox( tabGeneral, wxID_ANY, wxT("Hide local address books"), wxDefaultPosition, wxDefaultSize, 0 );
-       szrChecks->Add( chkHideLocal, 0, wxALL, 5 );
+       szrGeneral->Add( chkHideLocal, 0, wxALL, 5 );
        
        
-       tabGeneral->SetSizer( szrChecks );
+       tabGeneral->SetSizer( szrGeneral );
        tabGeneral->Layout();
-       szrChecks->Fit( tabGeneral );
-       NbtPreferences->AddPage( tabGeneral, wxT("General"), true );
+       szrGeneral->Fit( tabGeneral );
+       NbtPreferences->AddPage( tabGeneral, wxT("General"), false );
        tabTheme = new wxPanel( NbtPreferences, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
        tabTheme->Hide();
        
@@ -636,7 +651,7 @@ frmPreferencesADT::frmPreferencesADT( wxWindow* parent, wxWindowID id, const wxS
        tabAccounts->SetSizer( szrAccounts );
        tabAccounts->Layout();
        szrAccounts->Fit( tabAccounts );
-       NbtPreferences->AddPage( tabAccounts, wxT("Accounts"), false );
+       NbtPreferences->AddPage( tabAccounts, wxT("Accounts"), true );
        
        szrTabs->Add( NbtPreferences, 1, wxALL|wxEXPAND, 5 );
        
@@ -678,6 +693,7 @@ frmPreferencesADT::frmPreferencesADT( wxWindow* parent, wxWindowID id, const wxS
        btnThemeAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddABAccount ), NULL, this );
        btnThemeModify->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::ModifyABAccount ), NULL, this );
        btnThemeDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::DeleteABAccount ), NULL, this );
+       lstAccounts->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( frmPreferencesADT::ModifyABAccount ), NULL, this );
        lstAccounts->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( frmPreferencesADT::DisableABButtons ), NULL, this );
        lstAccounts->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmPreferencesADT::EnableABButtons ), NULL, this );
        btnAccountAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddABAccount ), NULL, this );
@@ -696,6 +712,7 @@ frmPreferencesADT::~frmPreferencesADT()
        btnThemeAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddABAccount ), NULL, this );
        btnThemeModify->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::ModifyABAccount ), NULL, this );
        btnThemeDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::DeleteABAccount ), NULL, this );
+       lstAccounts->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( frmPreferencesADT::ModifyABAccount ), NULL, this );
        lstAccounts->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( frmPreferencesADT::DisableABButtons ), NULL, this );
        lstAccounts->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmPreferencesADT::EnableABButtons ), NULL, this );
        btnAccountAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddABAccount ), 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