mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 08:00:53 +00:00
Merge branch 'varun-r-mallya/issue125' into 'master'
sysprof: Set document title based on file basename during save See merge request GNOME/sysprof!137
This commit is contained in:
@ -2755,6 +2755,7 @@ sysprof_document_save_async (SysprofDocument *self,
|
|||||||
{
|
{
|
||||||
g_autoptr(GTask) task = NULL;
|
g_autoptr(GTask) task = NULL;
|
||||||
g_autoptr(GBytes) bytes = NULL;
|
g_autoptr(GBytes) bytes = NULL;
|
||||||
|
g_autofree char *basename = NULL;
|
||||||
|
|
||||||
g_return_if_fail (SYSPROF_IS_DOCUMENT (self));
|
g_return_if_fail (SYSPROF_IS_DOCUMENT (self));
|
||||||
g_return_if_fail (G_IS_FILE (file));
|
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);
|
g_task_set_source_tag (task, sysprof_document_save_async);
|
||||||
sysprof_document_mark_busy_for_task (self, task);
|
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);
|
bytes = g_mapped_file_get_bytes (self->mapped_file);
|
||||||
|
|
||||||
g_file_replace_contents_bytes_async (file,
|
g_file_replace_contents_bytes_async (file,
|
||||||
|
|||||||
Reference in New Issue
Block a user