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:
@@ -244,7 +244,6 @@ bool wxButton::DoSetLabelMarkup(const wxString& markup)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif // wxUSE_MARKUP
|
|
||||||
|
|
||||||
GtkLabel *wxButton::GTKGetLabel() const
|
GtkLabel *wxButton::GTKGetLabel() const
|
||||||
{
|
{
|
||||||
@@ -256,9 +255,8 @@ GtkLabel *wxButton::GTKGetLabel() const
|
|||||||
GList* list = gtk_container_get_children(GTK_CONTAINER(box));
|
GList* list = gtk_container_get_children(GTK_CONTAINER(box));
|
||||||
for (GList* item = list; item; item = item->next)
|
for (GList* item = list; item; item = item->next)
|
||||||
{
|
{
|
||||||
GtkBoxChild* boxChild = static_cast<GtkBoxChild*>(item->data);
|
if (GTK_IS_LABEL(item->data))
|
||||||
if ( GTK_IS_LABEL(boxChild->widget) )
|
label = GTK_LABEL(item->data);
|
||||||
label = GTK_LABEL(boxChild->widget);
|
|
||||||
}
|
}
|
||||||
g_list_free(list);
|
g_list_free(list);
|
||||||
|
|
||||||
@@ -267,6 +265,7 @@ GtkLabel *wxButton::GTKGetLabel() const
|
|||||||
|
|
||||||
return GTK_LABEL(child);
|
return GTK_LABEL(child);
|
||||||
}
|
}
|
||||||
|
#endif // wxUSE_MARKUP
|
||||||
|
|
||||||
void wxButton::DoApplyWidgetStyle(GtkRcStyle *style)
|
void wxButton::DoApplyWidgetStyle(GtkRcStyle *style)
|
||||||
{
|
{
|
||||||
@@ -284,8 +283,7 @@ void wxButton::DoApplyWidgetStyle(GtkRcStyle *style)
|
|||||||
GList* list = gtk_container_get_children(GTK_CONTAINER(box));
|
GList* list = gtk_container_get_children(GTK_CONTAINER(box));
|
||||||
for (GList* item = list; item; item = item->next)
|
for (GList* item = list; item; item = item->next)
|
||||||
{
|
{
|
||||||
GtkBoxChild* boxChild = static_cast<GtkBoxChild*>(item->data);
|
gtk_widget_modify_style(GTK_WIDGET(item->data), style);
|
||||||
gtk_widget_modify_style(boxChild->widget, style);
|
|
||||||
}
|
}
|
||||||
g_list_free(list);
|
g_list_free(list);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user