diff --git a/thunar/thunar-device.c b/thunar/thunar-device.c index a3109123..f8edd2f4 100644 --- a/thunar/thunar-device.c +++ b/thunar/thunar-device.c @@ -253,7 +253,10 @@ thunar_device_operation_finish (GObject *object, _thunar_return_if_fail (G_IS_ASYNC_RESULT (result)); /* remove notification */ - thunar_notify_finish (op->device); + thunar_notify_finish (op->device, + _("Device Removed"), + _("The device has been safely removed."), + "drive-removable-media"); /* finish the operation */ if (!(op->callback_finish) (object, result, &error)) diff --git a/thunar/thunar-notify.c b/thunar/thunar-notify.c index 0f4f832f..431f7eb2 100644 --- a/thunar/thunar-notify.c +++ b/thunar/thunar-notify.c @@ -228,7 +228,10 @@ thunar_notify_eject (ThunarDevice *device) void -thunar_notify_finish (ThunarDevice *device) +thunar_notify_finish (ThunarDevice *device, + const gchar *summary, + const gchar *body, + const gchar *icon) { #ifdef HAVE_LIBNOTIFY NotifyNotification *notification; @@ -236,9 +239,21 @@ thunar_notify_finish (ThunarDevice *device) _thunar_return_if_fail (THUNAR_IS_DEVICE (device)); notification = g_object_get_data (G_OBJECT (device), I_("thunar-notification")); + if (notification != NULL) { - notify_notification_close (notification, NULL); + if (summary == NULL) + { + notify_notification_close (notification, NULL); + } + else + { + notify_notification_set_urgency (notification, NOTIFY_URGENCY_NORMAL); + notify_notification_set_timeout (notification, 5000); + notify_notification_update (notification, summary, body, icon); + notify_notification_show (notification, NULL); + } + g_object_set_data (G_OBJECT (device), I_("thunar-notification"), NULL); } #endif diff --git a/thunar/thunar-notify.h b/thunar/thunar-notify.h index af17c87b..760603fd 100644 --- a/thunar/thunar-notify.h +++ b/thunar/thunar-notify.h @@ -30,7 +30,10 @@ void thunar_notify_unmount (ThunarDevice *device); void thunar_notify_eject (ThunarDevice *device); -void thunar_notify_finish (ThunarDevice *device); +void thunar_notify_finish (ThunarDevice *device, + const gchar *summary, + const gchar *body, + const gchar *icon); void thunar_notify_uninit (void);