sysprof: Set document title based on file basename during save

Signed-off-by: varun-r-mallya <varunrmallya@gmail.com>
This commit is contained in:
2025-04-07 00:39:12 +05:30
parent 2b972a3ac6
commit 5c78124c67
2 changed files with 4 additions and 1 deletions

View File

@ -2755,6 +2755,7 @@ sysprof_document_save_async (SysprofDocument *self,
{
g_autoptr(GTask) task = NULL;
g_autoptr(GBytes) bytes = NULL;
g_autofree char *basename = NULL;
g_return_if_fail (SYSPROF_IS_DOCUMENT (self));
g_return_if_fail (G_IS_FILE (file));
@ -2764,6 +2765,9 @@ sysprof_document_save_async (SysprofDocument *self,
g_task_set_source_tag (task, sysprof_document_save_async);
sysprof_document_mark_busy_for_task (self, task);
basename = g_file_get_basename (file);
_sysprof_document_set_title (self, basename);
bytes = g_mapped_file_get_bytes (self->mapped_file);
g_file_replace_contents_bytes_async (file,

View File

@ -128,7 +128,6 @@ sysprof_new_window (GSimpleAction *action,
{
const GList *windows;
GApplication *app = user_data;
GtkWindow *window;
GtkWidget *greeter;
g_assert (G_IS_APPLICATION (app));