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
This commit is contained in:
Paul Cornett 2011-06-19 20:52:26 +00:00
parent 21201af6d5
commit af806b13aa

View File

@ -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<GtkBoxChild*>(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<GtkBoxChild*>(item->data);
gtk_widget_modify_style(boxChild->widget, style);
gtk_widget_modify_style(GTK_WIDGET(item->data), style);
}
g_list_free(list);
}