]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/tbargtk.cpp
Reverted last two changes
[wxWidgets.git] / src / gtk / tbargtk.cpp
index f7f791c65e551733642bccce43d752eee4ebee24..c62103dc535ea70a41f0f107a7f8ee0a58e215cd 100644 (file)
@@ -164,6 +164,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxControl)
 // "clicked" (internal from gtk_toolbar)
 //-----------------------------------------------------------------------------
 
+extern "C" {
 static void gtk_toolbar_callback( GtkWidget *WXUNUSED(widget),
                                   wxToolBarTool *tool )
 {
@@ -198,11 +199,13 @@ static void gtk_toolbar_callback( GtkWidget *WXUNUSED(widget),
         tool->SetPixmap(tool->GetBitmap());
     }
 }
+}
 
 //-----------------------------------------------------------------------------
 // "enter_notify_event" / "leave_notify_event"
 //-----------------------------------------------------------------------------
 
+extern "C" {
 static gint gtk_toolbar_tool_callback( GtkWidget *WXUNUSED(widget),
                                        GdkEventCrossing *gdk_event,
                                        wxToolBarTool *tool )
@@ -221,6 +224,7 @@ static gint gtk_toolbar_tool_callback( GtkWidget *WXUNUSED(widget),
 
     return FALSE;
 }
+}
 
 //-----------------------------------------------------------------------------
 // InsertChild callback for wxToolBar
@@ -515,7 +519,7 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
     return TRUE;
 }
 
-bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
+bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *toolBase)
 {
     wxToolBarTool *tool = (wxToolBarTool *)toolBase;
 
@@ -529,7 +533,11 @@ bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
             gtk_widget_destroy( tool->m_item );
             break;
 
-        //case wxTOOL_STYLE_SEPARATOR: -- nothing to do
+#ifdef __WXGTK20__
+        case wxTOOL_STYLE_SEPARATOR:
+            gtk_toolbar_remove_space( m_toolbar, pos );
+            break;
+#endif
     }
 
     InvalidateBestSize();