Hi,

Yesterday, I tried to replace the wxNotebook of frmMain with a
wxAuiNotebook. It was really easy to do so, but it doesn't really add
something to the notebook. Maybe better native control? Does someone see
this as something really important to have? or should I throw my patch?


-- 
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com
Index: pgadmin/include/frm/frmMain.h
===================================================================
--- pgadmin/include/frm/frmMain.h	(révision 8258)
+++ pgadmin/include/frm/frmMain.h	(copie de travail)
@@ -122,7 +122,7 @@
     ctlListView *properties;
     ctlListView *statistics;
     ctlListView *dependents, *dependencies;
-    wxNotebook *listViews;
+    wxAuiNotebook *listViews;
     ctlSQLBox *sqlPane;
     wxMenu *newMenu, *debuggingMenu, *reportMenu, *toolsMenu, *pluginsMenu, *viewMenu, 
           *treeContextMenu, *newContextMenu, *slonyMenu, *scriptingMenu, *viewDataMenu;
@@ -161,7 +161,7 @@
     void OnAuiUpdate(wxAuiManagerEvent& event);
     void OnContextMenu(wxCommandEvent& event);
 
-    void OnPageChange(wxNotebookEvent& event);
+    void OnPageChange(wxAuiNotebookEvent& event);
     void OnPropSelChanged(wxListEvent& event);
     void OnPropSelActivated(wxListEvent& event);
     void OnPropRightClick(wxListEvent& event);
Index: pgadmin/frm/events.cpp
===================================================================
--- pgadmin/frm/events.cpp	(révision 8258)
+++ pgadmin/frm/events.cpp	(copie de travail)
@@ -54,7 +54,7 @@
     EVT_MENU(MNU_CHECKALIVE,                frmMain::OnCheckAlive)
     EVT_MENU(MNU_CONTEXTMENU,               frmMain::OnContextMenu) 
 
-    EVT_NOTEBOOK_PAGE_CHANGED(CTL_NOTEBOOK, frmMain::OnPageChange)
+    EVT_AUINOTEBOOK_PAGE_CHANGED(CTL_NOTEBOOK, frmMain::OnPageChange)
     EVT_LIST_ITEM_SELECTED(CTL_PROPVIEW,    frmMain::OnPropSelChanged)
     EVT_LIST_ITEM_ACTIVATED(CTL_PROPVIEW,   frmMain::OnPropSelActivated)
     EVT_LIST_ITEM_RIGHT_CLICK(CTL_PROPVIEW, frmMain::OnPropRightClick)
Index: pgadmin/frm/frmMain.cpp
===================================================================
--- pgadmin/frm/frmMain.cpp	(révision 8258)
+++ pgadmin/frm/frmMain.cpp	(copie de travail)
@@ -134,7 +134,7 @@
     browser->SetImageList(imageList);
 
     // Setup the listview
-    listViews = new wxNotebook(this, CTL_NOTEBOOK, wxDefaultPosition, wxDefaultSize);
+    listViews = new wxAuiNotebook(this, CTL_NOTEBOOK, wxDefaultPosition, wxDefaultSize, wxAUI_NB_TOP);
 
     // Switch to the generic list control. Native doesn't play well with
     // multi-row select on Mac.
@@ -733,7 +733,7 @@
 }
 
 
-void frmMain::OnPageChange(wxNotebookEvent& event)
+void frmMain::OnPageChange(wxAuiNotebookEvent& event)
 {
     pgObject *data = browser->GetObject(browser->GetSelection());
 
-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Reply via email to