]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/notebook.cpp
added semicolons after wxCHECK()s (part of patch 1450705)
[wxWidgets.git] / src / gtk / notebook.cpp
index 35137877b36f57767394716dde60212ccbedcc17..25785835a24a3ee5fc35f370813b952a00a1f7c5 100644 (file)
 #include "wx/bitmap.h"
 #include "wx/fontutil.h"
 
+// FIXME: Use GtkImage instead of GtkPixmap. Don't use gtk_container_border_width
+#include <gtk/gtkversion.h>
+#ifdef GTK_DISABLE_DEPRECATED
+#undef GTK_DISABLE_DEPRECATED
+#endif
+
 #include "wx/gtk/private.h"
 #include "wx/gtk/win_gtk.h"
 
 DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED)
 DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING)
 
-//-----------------------------------------------------------------------------
-// idle system
-//-----------------------------------------------------------------------------
-
-extern void wxapp_install_idle_handler();
-extern bool g_isIdle;
-
 //-----------------------------------------------------------------------------
 // data
 //-----------------------------------------------------------------------------
@@ -89,7 +88,7 @@ WX_DEFINE_LIST(wxGtkNotebookPagesList)
 extern "C" {
 static void gtk_notebook_page_change_callback(GtkNotebook *WXUNUSED(widget),
                                               GtkNotebookPage *WXUNUSED(page),
-                                              gint page,
+                                              guint page,
                                               wxNotebook *notebook )
 {
     // are you trying to call SetSelection() from a notebook event handler?
@@ -169,7 +168,7 @@ static void gtk_page_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation*
 //-----------------------------------------------------------------------------
 
 extern "C" {
-static gint
+static void
 gtk_notebook_realized_callback( GtkWidget * WXUNUSED(widget), wxWindow *win )
 {
     if (g_isIdle)
@@ -178,8 +177,6 @@ gtk_notebook_realized_callback( GtkWidget * WXUNUSED(widget), wxWindow *win )
     /* GTK 1.2 up to version 1.2.5 is broken so that we have to call a queue_resize
        here in order to make repositioning before showing to take effect. */
     gtk_widget_queue_resize( win->m_widget );
-
-    return FALSE;
 }
 }
 
@@ -188,7 +185,10 @@ gtk_notebook_realized_callback( GtkWidget * WXUNUSED(widget), wxWindow *win )
 //-----------------------------------------------------------------------------
 
 extern "C" {
-static gint gtk_notebook_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxNotebook *notebook )
+static gboolean
+gtk_notebook_key_press_callback( GtkWidget   *widget,
+                                 GdkEventKey *gdk_event,
+                                 wxNotebook  *notebook )
 {
     if (g_isIdle)
         wxapp_install_idle_handler();
@@ -475,7 +475,7 @@ bool wxNotebook::SetPageImage( size_t page, int image )
     {
         /* Case 2) or 4). There is already an image in the gtkhbox. Let's find it */
 
-        GList *child = gtk_container_children(GTK_CONTAINER(nb_page->m_box));
+        GList *child = gtk_container_get_children(GTK_CONTAINER(nb_page->m_box));
         while (child)
         {
             if (GTK_IS_PIXMAP(child->data))
@@ -741,7 +741,7 @@ int wxNotebook::HitTest(const wxPoint& pt, long *flags) const
     size_t i = 0;
 
     GtkNotebook * notebook = GTK_NOTEBOOK(m_widget);
-    if (gtk_notebook_get_scrollable(notebook));
+    if (gtk_notebook_get_scrollable(notebook))
         i = g_list_position( notebook->children, notebook->first_tab );
 
     for ( ; i < count; i++ )
@@ -758,7 +758,7 @@ int wxNotebook::HitTest(const wxPoint& pt, long *flags) const
             {
                 GtkWidget *pixmap = NULL;
 
-                GList *children = gtk_container_children(GTK_CONTAINER(box));
+                GList *children = gtk_container_get_children(GTK_CONTAINER(box));
                 for ( GList *child = children; child; child = child->next )
                 {
                     if ( GTK_IS_PIXMAP(child->data) )