diff options
| author | David Zeuthen <davidz@redhat.com> | 2009-04-15 14:20:49 -0400 |
|---|---|---|
| committer | David Zeuthen <davidz@redhat.com> | 2009-04-15 14:20:49 -0400 |
| commit | 07cde4c831da944fe018cf21cf8ca70b6488251a (patch) | |
| tree | e322febcaf9c5c1b46da83e7498efa8d9bf10e34 | |
| parent | 122c651f99ee1ad730a35925db520d8fb90bd4f4 (diff) | |
| download | gnome-disk-utility-07cde4c831da944fe018cf21cf8ca70b6488251a.tar.gz gnome-disk-utility-07cde4c831da944fe018cf21cf8ca70b6488251a.tar.xz gnome-disk-utility-07cde4c831da944fe018cf21cf8ca70b6488251a.zip | |
nuke the "It's now safe to remove" dialog after four seconds
| -rw-r--r-- | src/notification/gdu-slow-unmount-dialog.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/notification/gdu-slow-unmount-dialog.c b/src/notification/gdu-slow-unmount-dialog.c index dc95be6..02dea3c 100644 --- a/src/notification/gdu-slow-unmount-dialog.c +++ b/src/notification/gdu-slow-unmount-dialog.c @@ -126,6 +126,17 @@ on_pulse_timeout (gpointer user_data) return TRUE; } +static gboolean +nuke_dialog_cb (gpointer user_data) +{ + GduSlowUnmountDialog *dialog = GDU_SLOW_UNMOUNT_DIALOG (user_data); + + gtk_widget_destroy (GTK_WIDGET (dialog)); + g_object_unref (dialog); + + return FALSE; +} + static void check_still_unmounting (GduSlowUnmountDialog *dialog) { @@ -152,6 +163,11 @@ check_still_unmounting (GduSlowUnmountDialog *dialog) dialog->priv->device_name); gtk_label_set_markup (GTK_LABEL (dialog->priv->label), s); + /* nuke this dialog after four seconds */ + g_timeout_add (4 * 1000, + nuke_dialog_cb, + g_object_ref (dialog)); + out: ; } |
