[glade] GladePreviewer: Update window title with (unnamed) if need be
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] GladePreviewer: Update window title with (unnamed) if need be
- Date: Fri, 29 Jan 2016 14:11:41 +0000 (UTC)
commit 81920d56168a8148b74905f2e8e323922148c6e8
Author: Tristan Van Berkom <tristan vanberkom codethink co uk>
Date: Fri Jan 29 15:10:47 2016 +0100
GladePreviewer: Update window title with (unnamed) if need be
gladeui/glade-previewer.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gladeui/glade-previewer.c b/gladeui/glade-previewer.c
index 4fad19b..44a2357 100644
--- a/gladeui/glade-previewer.c
+++ b/gladeui/glade-previewer.c
@@ -214,6 +214,9 @@ glade_previewer_window_set_title (GtkWindow *window,
gchar *toplevel)
{
gchar *title, *pretty_path = NULL;
+ const gchar *widget_name = toplevel;
+ if (widget_name && g_str_has_prefix (widget_name, GLADE_UNNAMED_PREFIX))
+ widget_name = _("(unnamed)");
if (filename && g_path_is_absolute (filename))
{
@@ -225,13 +228,13 @@ glade_previewer_window_set_title (GtkWindow *window,
if (filename)
{
if (toplevel)
- title = g_strdup_printf (_("Previewing %s (%s)"), filename, toplevel);
+ title = g_strdup_printf (_("Previewing %s - %s"), filename, widget_name);
else
title = g_strdup_printf (_("Previewing %s"), filename);
}
else if (toplevel)
{
- title = g_strdup_printf (_("Previewing %s"), toplevel);
+ title = g_strdup_printf (_("Previewing %s"), widget_name);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]