[gnome-builder] gui: only update title if unset
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] gui: only update title if unset
- Date: Tue, 26 Feb 2019 01:54:03 +0000 (UTC)
commit 7d734d4867cd62af2a1d47dac1330186cb555a24
Author: Christian Hergert <chergert redhat com>
Date: Mon Feb 25 17:51:37 2019 -0800
gui: only update title if unset
This only updates the title when adding a workspace if it has
not already been set. This is useful when adding greeter
workspace windows as they can have their own titles.
src/libide/gui/ide-workbench.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/src/libide/gui/ide-workbench.c b/src/libide/gui/ide-workbench.c
index b3e7887ca..a5704a41f 100644
--- a/src/libide/gui/ide-workbench.c
+++ b/src/libide/gui/ide-workbench.c
@@ -739,8 +739,6 @@ ide_workbench_add_workspace (IdeWorkbench *self,
IdeWorkspace *workspace)
{
g_autoptr(GPtrArray) addins = NULL;
- g_autofree gchar *title = NULL;
- g_autofree gchar *formatted = NULL;
GList *mru_link;
g_return_if_fail (IDE_IS_MAIN_THREAD ());
@@ -800,9 +798,15 @@ ide_workbench_add_workspace (IdeWorkbench *self,
}
}
- title = ide_context_dup_title (self->context);
- formatted = g_strdup_printf (_("Builder — %s"), title);
- gtk_window_set_title (GTK_WINDOW (workspace), formatted);
+ if (!gtk_window_get_title (GTK_WINDOW (workspace)))
+ {
+ g_autofree gchar *title = NULL;
+ g_autofree gchar *formatted = NULL;
+
+ title = ide_context_dup_title (self->context);
+ formatted = g_strdup_printf (_("Builder — %s"), title);
+ gtk_window_set_title (GTK_WINDOW (workspace), formatted);
+ }
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]