X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cca410b336cd5628a944ede9e9944fdbb04552d4..9d5507f7a2701395e1d5c121bd877bb9066ee6ea:/src/gtk/tbargtk.cpp?ds=inline diff --git a/src/gtk/tbargtk.cpp b/src/gtk/tbargtk.cpp index b403ca69d6..a4aa985348 100644 --- a/src/gtk/tbargtk.cpp +++ b/src/gtk/tbargtk.cpp @@ -278,7 +278,7 @@ static gboolean gtk_toolbar_dropdown_lclick_callback(GtkWidget *widget, if (!tool->IsEnabled()) return FALSE; wxCommandEvent evt(wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED, tool->GetId() ); - if ( tbar->GetEventHandler()->ProcessEvent(evt) ) + if ( tbar->HandleWindowEvent(evt) ) { return TRUE; } @@ -629,6 +629,7 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase) return true; case wxTOOL_STYLE_CONTROL: +#if 1 GtkWidget* align = gtk_alignment_new(0.5, 0.5, 0, 0); gtk_widget_show(align); gtk_container_add((GtkContainer*)align, tool->GetControl()->m_widget); @@ -639,6 +640,15 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase) (const char *) NULL, posGtk ); +#else + gtk_toolbar_insert_widget( + m_toolbar, + tool->GetControl()->m_widget, + (const char *) NULL, + (const char *) NULL, + posGtk + ); +#endif // release reference obtained by wxInsertChildInToolBar g_object_unref(tool->GetControl()->m_widget); break;