Commit eaf80971 authored by Juan Pablo Ugarte's avatar Juan Pablo Ugarte
Browse files

GladeDesignView: show class name if widget is unnamed

parent 779dd7a9
......@@ -948,7 +948,16 @@ update_widget_name (GladeDesignLayout *layout, GladeWidget *gwidget)
if (priv->widget_name && gwidget)
{
pango_layout_set_text (priv->widget_name, glade_widget_get_name (gwidget), -1);
gchar *name = glade_widget_get_name (gwidget);
if (g_str_has_prefix (name, GLADE_UNNAMED_PREFIX))
{
GladeWidgetAdaptor *adaptor = glade_widget_get_adaptor (gwidget);
pango_layout_set_text (priv->widget_name, glade_widget_adaptor_get_name (adaptor), -1);
}
else
pango_layout_set_text (priv->widget_name, name, -1);
gtk_widget_queue_resize (GTK_WIDGET (layout));
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment