Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Fixed tabs on certain forms so that they show the first tab and added QuitApp to...
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 25 Nov 2015 11:55:13 +0000 (11:55 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 25 Nov 2015 11:55:13 +0000 (11:55 +0000)
source/AppXestiaAddrBk.cpp
source/AppXestiaAddrBk.h

index 63e06ce..e754057 100644 (file)
@@ -183,20 +183,9 @@ frmMainADT::frmMainADT( wxWindow* parent, wxWindowID id, const wxString& title,
        m_splitter13->SetMinimumPaneSize( 1 );\r
        \r
        m_panel19 = new wxPanel( m_splitter13, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );\r
-       szrContactList = new wxFlexGridSizer( 0, 1, 0, 0 );\r
-       szrContactList->AddGrowableCol( 0 );\r
-       szrContactList->AddGrowableRow( 1 );\r
-       szrContactList->SetFlexibleDirection( wxBOTH );\r
-       szrContactList->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );\r
+       szrContactList = new wxBoxSizer( wxVERTICAL );\r
        \r
-       szrAccList = new wxFlexGridSizer( 0, 2, 0, 0 );\r
-       szrAccList->SetFlexibleDirection( wxVERTICAL );\r
-       szrAccList->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );\r
-       \r
-       \r
-       szrContactList->Add( szrAccList, 0, 0, 5 );\r
-       \r
-       lstContacts = new wxListCtrl( m_panel19, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_NO_HEADER|wxLC_REPORT|wxSUNKEN_BORDER );\r
+       lstContacts = new wxListCtrl( m_panel19, wxID_ANY, wxDefaultPosition, wxSize( 50,-1 ), wxLC_NO_HEADER|wxLC_REPORT|wxSUNKEN_BORDER );\r
        szrContactList->Add( lstContacts, 1, wxALL|wxEXPAND, 5 );\r
        \r
        \r
@@ -214,7 +203,7 @@ frmMainADT::frmMainADT( wxWindow* parent, wxWindowID id, const wxString& title,
        m_panel20->SetSizer( bSizer12 );\r
        m_panel20->Layout();\r
        bSizer12->Fit( m_panel20 );\r
-       m_splitter13->SplitVertically( m_panel19, m_panel20, 314 );\r
+       m_splitter13->SplitVertically( m_panel19, m_panel20, 201 );\r
        szrMain->Add( m_splitter13, 1, wxEXPAND, 5 );\r
        \r
        \r
@@ -225,6 +214,7 @@ frmMainADT::frmMainADT( wxWindow* parent, wxWindowID id, const wxString& title,
        this->Centre( wxBOTH );\r
        \r
        // Connect Events\r
+       this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmMainADT::QuitApp ) );\r
        this->Connect( mnuNewAB->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenNewABDialog ) );\r
        this->Connect( mnuRefreshAB->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::RefreshAddressBook ) );\r
        this->Connect( mnuImport->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenImportDialog ) );\r
@@ -259,6 +249,7 @@ frmMainADT::frmMainADT( wxWindow* parent, wxWindowID id, const wxString& title,
 frmMainADT::~frmMainADT()\r
 {\r
        // Disconnect Events\r
+       this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmMainADT::QuitApp ) );\r
        this->Disconnect( ID_MANAGE_NEWAB, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenNewABDialog ) );\r
        this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::RefreshAddressBook ) );\r
        this->Disconnect( ID_IMPORT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenImportDialog ) );\r
@@ -542,7 +533,7 @@ frmPreferencesADT::frmPreferencesADT( wxWindow* parent, wxWindowID id, const wxS
        tabGeneral->SetSizer( szrChecks );\r
        tabGeneral->Layout();\r
        szrChecks->Fit( tabGeneral );\r
-       NbtPreferences->AddPage( tabGeneral, wxT("General"), false );\r
+       NbtPreferences->AddPage( tabGeneral, wxT("General"), true );\r
        tabTheme = new wxPanel( NbtPreferences, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );\r
        tabTheme->Hide();\r
        \r
@@ -581,7 +572,7 @@ frmPreferencesADT::frmPreferencesADT( wxWindow* parent, wxWindowID id, const wxS
        tabTheme->SetSizer( szrTheme );\r
        tabTheme->Layout();\r
        szrTheme->Fit( tabTheme );\r
-       NbtPreferences->AddPage( tabTheme, wxT("Themes"), true );\r
+       NbtPreferences->AddPage( tabTheme, wxT("Themes"), false );\r
        tabAccounts = new wxPanel( NbtPreferences, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );\r
        wxGridSizer* szrAccounts;\r
        szrAccounts = new wxGridSizer( 1, 1, 0, 0 );\r
@@ -3868,7 +3859,7 @@ frmContactEditorAddressADT::frmContactEditorAddressADT( wxWindow* parent, wxWind
        tabGeneral->SetSizer( fgSizer6 );\r
        tabGeneral->Layout();\r
        fgSizer6->Fit( tabGeneral );\r
-       nbkAddress->AddPage( tabGeneral, wxT("General"), false );\r
+       nbkAddress->AddPage( tabGeneral, wxT("General"), true );\r
        tabLabel = new wxPanel( nbkAddress, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );\r
        wxBoxSizer* bSizer253;\r
        bSizer253 = new wxBoxSizer( wxVERTICAL );\r
@@ -3884,7 +3875,7 @@ frmContactEditorAddressADT::frmContactEditorAddressADT( wxWindow* parent, wxWind
        tabLabel->SetSizer( bSizer253 );\r
        tabLabel->Layout();\r
        bSizer253->Fit( tabLabel );\r
-       nbkAddress->AddPage( tabLabel, wxT("Label"), true );\r
+       nbkAddress->AddPage( tabLabel, wxT("Label"), false );\r
        tabOther = new wxPanel( nbkAddress, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );\r
        wxFlexGridSizer* fgSizer61;\r
        fgSizer61 = new wxFlexGridSizer( 0, 2, 0, 0 );\r
@@ -6967,7 +6958,7 @@ frmSSLCertificateADT::frmSSLCertificateADT( wxWindow* parent, wxWindowID id, con
        tabSummary->SetSizer( bSizer386 );\r
        tabSummary->Layout();\r
        bSizer386->Fit( tabSummary );\r
-       m_notebook28->AddPage( tabSummary, wxT("Summary"), false );\r
+       m_notebook28->AddPage( tabSummary, wxT("Summary"), true );\r
        tabDetail = new wxPanel( m_notebook28, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );\r
        wxBoxSizer* bSizer3891;\r
        bSizer3891 = new wxBoxSizer( wxVERTICAL );\r
@@ -7010,7 +7001,7 @@ frmSSLCertificateADT::frmSSLCertificateADT( wxWindow* parent, wxWindowID id, con
        tabHierarchy->SetSizer( bSizer390 );\r
        tabHierarchy->Layout();\r
        bSizer390->Fit( tabHierarchy );\r
-       m_notebook28->AddPage( tabHierarchy, wxT("Hierarchy"), true );\r
+       m_notebook28->AddPage( tabHierarchy, wxT("Hierarchy"), false );\r
        \r
        bSizer384->Add( m_notebook28, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );\r
        \r
index 04e23b7..97dba60 100644 (file)
@@ -96,14 +96,14 @@ class frmMainADT : public wxFrame
                wxComboCtrl* AccCtrl;\r
                wxSplitterWindow* m_splitter13;\r
                wxPanel* m_panel19;\r
-               wxFlexGridSizer* szrContactList;\r
-               wxFlexGridSizer* szrAccList;\r
+               wxBoxSizer* szrContactList;\r
                wxListCtrl* lstContacts;\r
                wxPanel* m_panel20;\r
                wxHtmlWindow* htmContactData;\r
                wxStatusBar* stbBottom;\r
                \r
                // Virtual event handlers, overide them in your derived class\r
+               virtual void QuitApp( wxCloseEvent& event ) { event.Skip(); }\r
                virtual void OpenNewABDialog( wxCommandEvent& event ) { event.Skip(); }\r
                virtual void RefreshAddressBook( wxCommandEvent& event ) { event.Skip(); }\r
                virtual void OpenImportDialog( wxCommandEvent& event ) { event.Skip(); }\r
@@ -136,13 +136,13 @@ class frmMainADT : public wxFrame
        \r
        public:\r
                \r
-               frmMainADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Xestia Address Book"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxDEFAULT_FRAME_STYLE );\r
+               frmMainADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Xestia Address Book"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 745,476 ), long style = wxDEFAULT_FRAME_STYLE );\r
                \r
                ~frmMainADT();\r
                \r
                void m_splitter13OnIdle( wxIdleEvent& )\r
                {\r
-                       m_splitter13->SetSashPosition( 314 );\r
+                       m_splitter13->SetSashPosition( 201 );\r
                        m_splitter13->Disconnect( wxEVT_IDLE, wxIdleEventHandler( frmMainADT::m_splitter13OnIdle ), NULL, this );\r
                }\r
        \r
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