]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/tbargtk.cpp
Version 0.4 of wxPython for MSW.
[wxWidgets.git] / src / gtk1 / tbargtk.cpp
index a4ece1fb60bc7809c76491eee80e8fbe46b92de2..57bd59292ebfd74daad9eb3ca7993587c618aa32 100644 (file)
@@ -54,7 +54,7 @@ wxToolBarTool::~wxToolBarTool()
 }
 
 //-----------------------------------------------------------------------------
-// wxToolBar
+// "clicked" (internal from gtk_toolbar)
 //-----------------------------------------------------------------------------
 
 static void gtk_toolbar_callback( GtkWidget *WXUNUSED(widget), wxToolBarTool *tool )
@@ -67,6 +67,10 @@ static void gtk_toolbar_callback( GtkWidget *WXUNUSED(widget), wxToolBarTool *to
   tool->m_owner->OnLeftClick( tool->m_index, tool->m_toggleState );
 }
 
+//-----------------------------------------------------------------------------
+// "enter_notify_event"
+//-----------------------------------------------------------------------------
+
 static gint gtk_toolbar_enter_callback( GtkWidget *WXUNUSED(widget), 
   GdkEventCrossing *WXUNUSED(gdk_event), wxToolBarTool *tool )
 {
@@ -74,16 +78,15 @@ static gint gtk_toolbar_enter_callback( GtkWidget *WXUNUSED(widget),
   
   tool->m_owner->OnMouseEnter( tool->m_index );
   
-  return TRUE;
+  return FALSE;
 }
 
+//-----------------------------------------------------------------------------
+// wxToolBar
 //-----------------------------------------------------------------------------
 
 IMPLEMENT_DYNAMIC_CLASS(wxToolBar,wxControl)
 
-BEGIN_EVENT_TABLE(wxToolBar, wxControl)
-END_EVENT_TABLE()
-
 wxToolBar::wxToolBar()
 {
 }
@@ -185,8 +188,9 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap,
   GtkToolbarChildType ctype = GTK_TOOLBAR_CHILD_BUTTON;
   if (toggle) ctype = GTK_TOOLBAR_CHILD_TOGGLEBUTTON;
 
-  tool->m_item = gtk_toolbar_append_element( m_toolbar, ctype, (GtkWidget *) NULL, (const char *) NULL, helpString1, "", tool_pixmap, 
-                                             (GtkSignalFunc)gtk_toolbar_callback, (gpointer)tool );
+  tool->m_item = gtk_toolbar_append_element( 
+    m_toolbar, ctype, (GtkWidget *) NULL, (const char *) NULL,  helpString1, "",  
+    tool_pixmap,  (GtkSignalFunc)gtk_toolbar_callback, (gpointer)tool );
 
   gtk_signal_connect( GTK_OBJECT(tool->m_item), "enter_notify_event", 
       GTK_SIGNAL_FUNC(gtk_toolbar_enter_callback), (gpointer)tool );