mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
sysprof: Set document title based on file basename during save
Signed-off-by: varun-r-mallya <varunrmallya@gmail.com>
This commit is contained in:
@ -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,
|
||||
|
||||
@ -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));
|
||||
|
||||
Reference in New Issue
Block a user