]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/tbargtk.cpp
typo
[wxWidgets.git] / src / gtk / tbargtk.cpp
index d767b494aeb18ba3015c30b98969540445e77116..ee9725a088ebc706e6ff932f5675cf4c54f29039 100644 (file)
 
 #include "wx/frame.h"
 
-#include <glib.h>
+// FIXME: Use GtkImage instead of GtkPixmap. Use the new toolbar API for when gtk runtime is new enough?
+// Beware that the new and old toolbar API may not be mixed in usage.
+#include <gtk/gtkversion.h>
+#ifdef GTK_DISABLE_DEPRECATED
+#undef GTK_DISABLE_DEPRECATED
+#endif
+
 #include "wx/gtk/private.h"
 
 // ----------------------------------------------------------------------------
 // globals
 // ----------------------------------------------------------------------------
 
-// idle system
-extern void wxapp_install_idle_handler();
-extern bool g_isIdle;
-
 // data
 extern bool       g_blockEventsOnDrag;
 extern wxCursor   g_globalCursor;
@@ -456,14 +458,12 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
                     return false;
                 }
 
-                gtk_signal_connect( GTK_OBJECT(tool->m_item),
-                                    "enter_notify_event",
-                                    GTK_SIGNAL_FUNC(gtk_toolbar_tool_callback),
-                                    (gpointer)tool );
-                gtk_signal_connect( GTK_OBJECT(tool->m_item),
-                                    "leave_notify_event",
-                                    GTK_SIGNAL_FUNC(gtk_toolbar_tool_callback),
-                                    (gpointer)tool );
+                g_signal_connect (tool->m_item, "enter_notify_event",
+                                  G_CALLBACK (gtk_toolbar_tool_callback),
+                                  tool);
+                g_signal_connect (tool->m_item, "leave_notify_event",
+                                  G_CALLBACK (gtk_toolbar_tool_callback),
+                                  tool);
             }
             break;
 
@@ -542,7 +542,7 @@ void wxToolBar::DoToggleTool( wxToolBarToolBase *toolBase, bool toggle )
 
         m_blockEvent = true;
 
-        gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(item), toggle );
+        gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(item), toggle );
 
         m_blockEvent = false;
     }