From af806b13aad04bb865fd9b2b62277f5ffc6ca089 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Sun, 19 Jun 2011 20:52:26 +0000 Subject: [PATCH] fix GTKGetLabel() and DoApplyWidgetStyle(): children are GtkWidget, not GtkBoxChild git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/button.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/gtk/button.cpp b/src/gtk/button.cpp index 28366f0219..28379ea998 100644 --- a/src/gtk/button.cpp +++ b/src/gtk/button.cpp @@ -244,7 +244,6 @@ bool wxButton::DoSetLabelMarkup(const wxString& markup) return true; } -#endif // wxUSE_MARKUP GtkLabel *wxButton::GTKGetLabel() const { @@ -256,9 +255,8 @@ GtkLabel *wxButton::GTKGetLabel() const GList* list = gtk_container_get_children(GTK_CONTAINER(box)); for (GList* item = list; item; item = item->next) { - GtkBoxChild* boxChild = static_cast(item->data); - if ( GTK_IS_LABEL(boxChild->widget) ) - label = GTK_LABEL(boxChild->widget); + if (GTK_IS_LABEL(item->data)) + label = GTK_LABEL(item->data); } g_list_free(list); @@ -267,6 +265,7 @@ GtkLabel *wxButton::GTKGetLabel() const return GTK_LABEL(child); } +#endif // wxUSE_MARKUP void wxButton::DoApplyWidgetStyle(GtkRcStyle *style) { @@ -284,8 +283,7 @@ void wxButton::DoApplyWidgetStyle(GtkRcStyle *style) GList* list = gtk_container_get_children(GTK_CONTAINER(box)); for (GList* item = list; item; item = item->next) { - GtkBoxChild* boxChild = static_cast(item->data); - gtk_widget_modify_style(boxChild->widget, style); + gtk_widget_modify_style(GTK_WIDGET(item->data), style); } g_list_free(list); } -- 2.45.2