]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/notebook.cpp
Simplify wxFileNameFromPath() implementation to avoid redundancy.
[wxWidgets.git] / src / gtk1 / notebook.cpp
index 5b2099a4e643879c3da745b82334d15855d98576..780ef4d3db75371b4897f2bf08665904e2ab351f 100644 (file)
@@ -107,7 +107,7 @@ static void gtk_notebook_page_change_callback(GtkNotebook *WXUNUSED(widget),
         // make wxNotebook::GetSelection() return the correct (i.e. consistent
         // with wxBookCtrlEvent::GetSelection()) value even though the page is
         // not really changed in GTK+
         // make wxNotebook::GetSelection() return the correct (i.e. consistent
         // with wxBookCtrlEvent::GetSelection()) value even though the page is
         // not really changed in GTK+
-        notebook->m_selection = page;
+        notebook->SetSelection(page);
     }
     else
     {
     }
     else
     {
@@ -121,7 +121,7 @@ static void gtk_notebook_page_change_callback(GtkNotebook *WXUNUSED(widget),
             // make wxNotebook::GetSelection() return the correct (i.e. consistent
             // with wxBookCtrlEvent::GetSelection()) value even though the page is
             // not really changed in GTK+
             // make wxNotebook::GetSelection() return the correct (i.e. consistent
             // with wxBookCtrlEvent::GetSelection()) value even though the page is
             // not really changed in GTK+
-            notebook->m_selection = page;
+            notebook->SetSelection(page);
 
             notebook->SendPageChangedEvent(old);
         }
 
             notebook->SendPageChangedEvent(old);
         }
@@ -292,7 +292,6 @@ void wxNotebook::Init()
     m_inSwitchPage = false;
 
     m_imageList = NULL;
     m_inSwitchPage = false;
 
     m_imageList = NULL;
-    m_selection = -1;
     m_themeEnabled = true;
 }
 
     m_themeEnabled = true;
 }
 
@@ -375,8 +374,8 @@ int wxNotebook::GetSelection() const
             gpointer cur = notebook->cur_page;
             if ( cur != NULL )
             {
             gpointer cur = notebook->cur_page;
             if ( cur != NULL )
             {
-                wxConstCast(this, wxNotebook)->m_selection =
-                    g_list_index( nb_pages, cur );
+                const_cast<wxNotebook *>(this)->
+                    SetSelection(g_list_index( nb_pages, cur ));
             }
         }
     }
             }
         }
     }