if (!xfdesktop_notify_initted
&& notify_init (PACKAGE_NAME))
{ /* we do this to work around bugs in libnotify < 0.6.0. Older *versionscrashinnotify_uninit()whennonotificationsare *displayedbefore.Theseversionsalsosegfaultwhenthe *ret_spec_versionparameterofnotify_get_server_infois
* NULL... */
notify_get_server_info (NULL, NULL, NULL, &spec_version);
g_free (spec_version);
info = g_file_query_info (mount_point, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE,
G_FILE_QUERY_INFO_NONE, NULL, NULL);
if (info != NULL)
{
read_only = !g_file_info_get_attribute_boolean (info,
G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE);
g_object_unref (info);
}
g_object_unref (mount_point);
name = g_mount_get_name (mount);
icon = g_mount_get_icon (mount);
if (read_only)
{ /* TRANSLATORS: Please use the same translation here as in Thunar */
summary = _("Unmounting device");
/* TRANSLATORS: Please use the same translation here as in Thunar */
message = g_strdup_printf (_("The device \"%s\" is being unmounted by the system. " "Please do not remove the media or disconnect the " "drive"), name);
} else
{ /* TRANSLATORS: Please use the same translation here as in Thunar */
summary = _("Writing data to device");
/* TRANSLATORS: Please use the same translation here as in Thunar */
message = g_strdup_printf (_("There is data that needs to be written to the " "device \"%s\" before it can be removed. Please " "do not remove the media or disconnect the drive"),
name);
}
name = g_mount_get_name (mount);
icon = g_mount_get_icon (mount);
/* close any open notifications since the operation finished */
notification = g_object_get_data (G_OBJECT (mount), "xfdesktop-notification"); if (notification != NULL)
{
notify_notification_close (notification, NULL);
g_object_set_data (G_OBJECT (mount), "xfdesktop-notification", NULL);
}
/* if the unmount operation was successful then display a message letting
* the user know it has been removed */ if (unmount_successful)
{
summary = _("Unmount Finished");
message = g_strdup_printf (_("The device \"%s\" has been safely removed from the system. "), name);
g_free (name); if (icon != NULL) {
g_object_unref(icon);
}
}
staticvoid
do_notify_eject(GObject *volume_or_mount, const gchar *name, GIcon *icon, gboolean read_only) { const gchar *summary;
gchar *message; if (read_only) { /* TRANSLATORS: Please use the same translation here as in Thunar */
summary = _("Ejecting device");
/* TRANSLATORS: Please use the same translation here as in Thunar */
message = g_strdup_printf(_("The device \"%s\" is being ejected. " "This may take some time"), name);
} else { /* TRANSLATORS: Please use the same translation here as in Thunar */
summary = _("Writing data to device");
/* TRANSLATORS: Please use the same translation here as in Thunar */
message = g_strdup_printf(_("There is data that needs to be written to the " "device \"%s\" before it can be removed. Please " "do not remove the media or disconnect the drive"),
name);
}
/* close any open notifications since the operation finished */
NotifyNotification *notification = g_object_get_data(volume_or_mount, "xfdesktop-notification"); if (notification != NULL) {
notify_notification_close(notification, NULL);
g_object_set_data(volume_or_mount, "xfdesktop-notification", NULL);
}
/* if the eject operation was successful then display a message letting the
* user know it has been removed */ if (eject_successful) { const gchar *summary = _("Eject Finished");
gchar *message = g_strdup_printf (_("The device \"%s\" has been safely removed from the system. "), name);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.