From: David Zeuthen Date: Fri, 26 Aug 2011 17:09:40 +0000 (-0400) Subject: Revert "Teach udisks(1) about the new automount hint and spell automount as one word" X-Git-Tag: upstream/2.1.2~532 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=99250cb39cf0e04972610645bad758036015cafd;p=platform%2Fupstream%2Fudisks2.git Revert "Teach udisks(1) about the new automount hint and spell automount as one word" This reverts commit 43392bd4b7c72892b08e49a6c0afaef9f572695a. --- diff --git a/data/org.freedesktop.UDisks.Device.xml b/data/org.freedesktop.UDisks.Device.xml index 53e7e54..cdf6176 100644 --- a/data/org.freedesktop.UDisks.Device.xml +++ b/data/org.freedesktop.UDisks.Device.xml @@ -1691,7 +1691,7 @@ - + A hint to the desktop that indicates if a device should be automounted. Possible values are: diff --git a/src/device-private.c b/src/device-private.c index 45418ce..53196f3 100644 --- a/src/device-private.c +++ b/src/device-private.c @@ -109,14 +109,14 @@ ptr_str_array_from_strv (GStrv s) } void -device_set_device_automount_hint (Device *device, - const gchar *value) +device_set_device_auto_mount_hint (Device *device, + const gchar *value) { - if (G_UNLIKELY (g_strcmp0 (device->priv->device_automount_hint, value) != 0)) + if (G_UNLIKELY (g_strcmp0 (device->priv->device_auto_mount_hint, value) != 0)) { - g_free (device->priv->device_automount_hint); - device->priv->device_automount_hint = g_strdup (value); - emit_changed (device, "device_automount_hint"); + g_free (device->priv->device_auto_mount_hint); + device->priv->device_auto_mount_hint = g_strdup (value); + emit_changed (device, "device_auto_mount_hint"); } } diff --git a/src/device-private.h b/src/device-private.h index 32a9bd0..f331ddc 100644 --- a/src/device-private.h +++ b/src/device-private.h @@ -133,7 +133,7 @@ struct DevicePrivate gboolean device_presentation_nopolicy; char *device_presentation_name; char *device_presentation_icon_name; - char *device_automount_hint; + char *device_auto_mount_hint; char *id_usage; char *id_type; @@ -254,7 +254,7 @@ void device_set_job_initiated_by_uid (Device *device, guint value); void device_set_job_is_cancellable (Device *device, gboolean value); void device_set_job_percentage (Device *device, gdouble value); -void device_set_device_automount_hint (Device *device, const gchar *value); +void device_set_device_auto_mount_hint (Device *device, const gchar *value); void device_set_device_detection_time (Device *device, guint64 value); void device_set_device_media_detection_time (Device *device, guint64 value); void device_set_device_file (Device *device, const gchar *value); diff --git a/src/device.c b/src/device.c index 9e886b3..e39208d 100644 --- a/src/device.c +++ b/src/device.c @@ -383,7 +383,7 @@ get_property (GObject *object, g_value_set_string (value, device->priv->device_file); break; case PROP_DEVICE_AUTOMOUNT_HINT: - g_value_set_string (value, device->priv->device_automount_hint); + g_value_set_string (value, device->priv->device_auto_mount_hint); break; case PROP_DEVICE_FILE_PRESENTATION: if (device->priv->device_file_presentation != NULL) @@ -871,7 +871,7 @@ device_class_init (DeviceClass *klass) g_object_class_install_property (object_class, PROP_DEVICE_AUTOMOUNT_HINT, - g_param_spec_string ("device-automount-hint", + g_param_spec_string ("device-auto-mount-hint", NULL, NULL, NULL, @@ -2291,7 +2291,7 @@ update_info_presentation (Device *device) { gboolean hide; gboolean nopolicy; - const gchar *automount_hint; + const gchar *auto_mount_hint; hide = FALSE; if (g_udev_device_has_property (device->priv->d, "UDISKS_PRESENTATION_HIDE")) @@ -2308,11 +2308,11 @@ update_info_presentation (Device *device) device_set_device_presentation_icon_name (device, g_udev_device_get_property (device->priv->d, "UDISKS_PRESENTATION_ICON_NAME")); - automount_hint = ""; + auto_mount_hint = ""; if (g_udev_device_has_property (device->priv->d, "UDISKS_AUTOMOUNT_HINT")) - automount_hint = g_udev_device_get_property (device->priv->d, "UDISKS_AUTOMOUNT_HINT"); + auto_mount_hint = g_udev_device_get_property (device->priv->d, "UDISKS_AUTOMOUNT_HINT"); - device_set_device_automount_hint (device, automount_hint); + device_set_device_auto_mount_hint (device, auto_mount_hint); return TRUE; } diff --git a/tools/udisks.c b/tools/udisks.c index 97e80d7..6fbd6a6 100644 --- a/tools/udisks.c +++ b/tools/udisks.c @@ -348,7 +348,6 @@ typedef struct gboolean device_presentation_nopolicy; char *device_presentation_name; char *device_presentation_icon_name; - char *device_automount_hint; guint64 device_size; guint64 device_block_size; @@ -546,8 +545,6 @@ collect_props (const char *key, props->device_presentation_name = g_strdup (g_value_get_string (value)); else if (strcmp (key, "DevicePresentationIconName") == 0) props->device_presentation_icon_name = g_strdup (g_value_get_string (value)); - else if (strcmp (key, "DeviceAutomountHint") == 0) - props->device_automount_hint = g_strdup (g_value_get_string (value)); else if (strcmp (key, "DeviceSize") == 0) props->device_size = g_value_get_uint64 (value); else if (strcmp (key, "DeviceBlockSize") == 0) @@ -818,7 +815,6 @@ device_properties_free (DeviceProperties *props) g_strfreev (props->device_mount_paths); g_free (props->device_presentation_name); g_free (props->device_presentation_icon_name); - g_free (props->device_automount_hint); g_free (props->job_id); g_free (props->id_usage); g_free (props->id_type); @@ -1225,7 +1221,6 @@ do_show_info (const char *object_path) g_print (" presentation nopolicy: %d\n", props->device_presentation_nopolicy); g_print (" presentation name: %s\n", props->device_presentation_name); g_print (" presentation icon: %s\n", props->device_presentation_icon_name); - g_print (" automount hint: %s\n", props->device_automount_hint); g_print (" size: %" G_GUINT64_FORMAT "\n", props->device_size); g_print (" block size: %" G_GUINT64_FORMAT "\n", props->device_block_size);