diff options
author | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2016-01-28 10:07:42 -0300 |
---|---|---|
committer | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2016-01-28 10:48:59 -0300 |
commit | 1522c95d5d032d86aca0eebbc1f7603b8b70db9d (patch) | |
tree | 75a168a8c896327ce33324953897209ccf1501da /gladeui/glade-design-layout.c | |
parent | f4454400f4161f98ec7dc3659e88453cc09a1b5b (diff) | |
download | glade-1522c95d5d032d86aca0eebbc1f7603b8b70db9d.tar.gz |
GladeDesignLayout: use new api to check if a widget has a name
Diffstat (limited to 'gladeui/glade-design-layout.c')
-rw-r--r-- | gladeui/glade-design-layout.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gladeui/glade-design-layout.c b/gladeui/glade-design-layout.c index 733ef462..500720f5 100644 --- a/gladeui/glade-design-layout.c +++ b/gladeui/glade-design-layout.c @@ -948,15 +948,15 @@ update_widget_name (GladeDesignLayout *layout, GladeWidget *gwidget) if (priv->widget_name && gwidget) { - gchar *name = glade_widget_get_name (gwidget); - - if (g_str_has_prefix (name, GLADE_UNNAMED_PREFIX)) + if (glade_widget_has_name (gwidget)) + { + pango_layout_set_text (priv->widget_name, glade_widget_get_display_name (gwidget), -1); + } + else { 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)); } |