]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/notebook.cpp
final (?) changes to the generic tree ctrl -- seems to work ok
[wxWidgets.git] / src / gtk1 / notebook.cpp
index 2794bebe86262040ebd5ab636375a3f50987a124..f006c328a02d1c4d9aa6fd52dfd9ce332e13d3eb 100644 (file)
@@ -2,9 +2,8 @@
 // Name:        notebook.cpp
 // Purpose:
 // Author:      Robert Roebling
-// Created:     01/02/97
-// Id:
-// Copyright:   (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
+// Id:          $id$
+// Copyright:   (c) 1998 Robert Roebling, Vadim Zeitlin
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
@@ -62,12 +61,11 @@ static void gtk_notebook_page_change_callback(GtkNotebook *WXUNUSED(widget),
   int old = notebook->GetSelection();
 
   // TODO: emulate PAGE_CHANGING event
-  wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,
-                        notebook->GetId(),
-                        nPage,
-                        old);
+  
+  wxNotebookEvent event( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,
+                         notebook->GetId(),  nPage, old );
   event.SetEventObject( notebook );
-  notebook->ProcessEvent( event );
+  notebook->GetEventHandler()->ProcessEvent( event );
 }
 
 //-----------------------------------------------------------------------------
@@ -352,10 +350,14 @@ bool wxNotebook::AddPage(wxWindow* win, const wxString& text,
   {
     wxASSERT( m_imageList != NULL );
 
-    wxBitmap *bmp = m_imageList->GetBitmap(imageId);
+    const wxBitmap *bmp = m_imageList->GetBitmap(imageId);
     GdkPixmap *pixmap = bmp->GetPixmap();
     GdkBitmap *mask = (GdkBitmap*) NULL;
-    if (bmp->GetMask()) mask = bmp->GetMask()->GetBitmap();
+    if ( bmp->GetMask() )
+    {
+      mask = bmp->GetMask()->GetBitmap();
+    }
+
     GtkWidget *pixmapwid = gtk_pixmap_new (pixmap, mask );
 
     gtk_box_pack_start(GTK_BOX(page->m_box), pixmapwid, FALSE, FALSE, 3);