Commit bad737b3 authored by Damjan Jovanovic's avatar Damjan Jovanovic
Browse files

gvfsjobunmount: always send unmount notification

Currently unmount notifications ("show-unmount-progress")
are only sent if the unmount is asynchronous and lasts longer
than 1500 ms.

Send unmount notification even for shorter, synchronous unmounts.
parent 3a1428a4
Pipeline #269739 passed with stage
in 1 minute and 12 seconds
......@@ -115,9 +115,6 @@ unmount_progress_clear (GVfsJobUnmount *op_job)
op_job->unmount_progress_id = 0;
}
if (!op_job->unmount_progress_fired)
return;
g_debug ("gvfsjobunmount progress clear\n");
message = g_strdup_printf (_("%s has been unmounted\n"),
......@@ -134,7 +131,6 @@ unmount_progress_timeout (gpointer user_data)
gchar *message;
op_job->unmount_progress_id = 0;
op_job->unmount_progress_fired = TRUE;
g_debug ("gvfsjobunmount progress timeout reached\n");
......@@ -271,12 +267,20 @@ try (GVfsJob *job)
}
if (job_finish_immediately_if_possible (op_job))
return TRUE;
{
unmount_progress_clear(op_job);
return TRUE;
}
else if (class->try_unmount != NULL)
return class->try_unmount (op_job->backend,
op_job,
op_job->flags,
op_job->mount_source);
{
gboolean done = class->try_unmount (op_job->backend,
op_job,
op_job->flags,
op_job->mount_source);
if (done)
unmount_progress_clear (op_job);
return done;
}
else
{
/* We're going to run the backend's unmount method on a thread, block
......
......@@ -48,7 +48,6 @@ struct _GVfsJobUnmount
GMountSource *mount_source;
guint unmount_progress_id;
gboolean unmount_progress_fired;
};
struct _GVfsJobUnmountClass
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment