From 9e87206c37ce50b68ac0c05277f643766dd02f1c Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Tue, 15 Aug 2023 13:44:46 -0700 Subject: [PATCH] sysprof: set window title to include document That way we can differentiate multiple windows. --- src/sysprof/sysprof-window.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sysprof/sysprof-window.c b/src/sysprof/sysprof-window.c index 7c1ea8ca..d6a5fb4e 100644 --- a/src/sysprof/sysprof-window.c +++ b/src/sysprof/sysprof-window.c @@ -225,6 +225,8 @@ sysprof_window_set_document (SysprofWindow *self, "ignore-process-0", "include-threads", }; + g_autofree char *title = NULL; + g_autofree char *full_title = NULL; g_assert (SYSPROF_IS_WINDOW (self)); g_assert (!document || SYSPROF_IS_DOCUMENT (document)); @@ -234,6 +236,10 @@ sysprof_window_set_document (SysprofWindow *self, if (document == NULL) return; + title = sysprof_document_dup_title (document); + full_title = g_strdup_printf ("%s — %s", _("Sysprof"), title); + gtk_window_set_title (GTK_WINDOW (self), full_title); + g_set_object (&self->document, document); self->session = sysprof_session_new (document);