}
void
+devkit_disks_device_set_device_presentation_hide (DevkitDisksDevice *device, gboolean value)
+{
+ if (G_UNLIKELY (device->priv->device_presentation_hide != value))
+ {
+ device->priv->device_presentation_hide = value;
+ emit_changed (device, "device_presentation_hide");
+ }
+}
+
+void
devkit_disks_device_set_device_presentation_name (DevkitDisksDevice *device, const gchar *value)
{
if (G_UNLIKELY (g_strcmp0 (device->priv->device_presentation_name, value) != 0))
gboolean device_is_mounted;
GPtrArray *device_mount_paths;
uid_t device_mounted_by_uid;
+ gboolean device_presentation_hide;
char *device_presentation_name;
char *device_presentation_icon_name;
void devkit_disks_device_set_device_is_mounted (DevkitDisksDevice *device, gboolean value);
void devkit_disks_device_set_device_mount_paths (DevkitDisksDevice *device, GStrv value);
void devkit_disks_device_set_device_mounted_by_uid (DevkitDisksDevice *device, guint value);
+void devkit_disks_device_set_device_presentation_hide (DevkitDisksDevice *device, gboolean value);
void devkit_disks_device_set_device_presentation_name (DevkitDisksDevice *device, const gchar *value);
void devkit_disks_device_set_device_presentation_icon_name (DevkitDisksDevice *device, const gchar *value);
PROP_DEVICE_IS_MOUNTED,
PROP_DEVICE_MOUNT_PATHS,
PROP_DEVICE_MOUNTED_BY_UID,
+ PROP_DEVICE_PRESENTATION_HIDE,
PROP_DEVICE_PRESENTATION_NAME,
PROP_DEVICE_PRESENTATION_ICON_NAME,
case PROP_DEVICE_MOUNTED_BY_UID:
g_value_set_uint (value, device->priv->device_mounted_by_uid);
break;
+ case PROP_DEVICE_PRESENTATION_HIDE:
+ g_value_set_boolean (value, device->priv->device_presentation_hide);
+ break;
case PROP_DEVICE_PRESENTATION_NAME:
g_value_set_string (value, device->priv->device_presentation_name);
break;
g_param_spec_uint ("device-mounted-by-uid", NULL, NULL, 0, G_MAXUINT, 0, G_PARAM_READABLE));
g_object_class_install_property (
object_class,
+ PROP_DEVICE_PRESENTATION_HIDE,
+ g_param_spec_boolean ("device-presentation-hide", NULL, NULL, FALSE, G_PARAM_READABLE));
+ g_object_class_install_property (
+ object_class,
PROP_DEVICE_PRESENTATION_NAME,
g_param_spec_string ("device-presentation-name", NULL, NULL, NULL, G_PARAM_READABLE));
g_object_class_install_property (
static gboolean
update_info_presentation (DevkitDisksDevice *device)
{
+ devkit_disks_device_set_device_presentation_hide (device,
+ devkit_device_get_property_as_boolean (device->priv->d, "DKD_PRESENTATION_HIDE"));
+
devkit_disks_device_set_device_presentation_name (device,
devkit_device_get_property (device->priv->d, "DKD_PRESENTATION_NAME"));
*
*/
- /* device_presentation_name and device_presentation_icon_name properties */
+ /* device_presentation_hide, device_presentation_name and device_presentation_icon_name properties */
if (!update_info_presentation (device))
goto out;
The block size of the device in bytes.
</doc:para></doc:description></doc:doc>
</property>
+ <property name="device-presentation-hide" type="b" access="read">
+ <doc:doc><doc:description><doc:para>
+ A hint if the device should be hidden from the user interface.
+ </doc:para></doc:description></doc:doc>
+ </property>
<property name="device-presentation-name" type="s" access="read">
<doc:doc><doc:description><doc:para>
The name to use when presenting the device to an end user.
gboolean device_is_linux_md;
char **device_mount_paths;
uid_t device_mounted_by_uid;
+ gboolean device_presentation_hide;
char *device_presentation_name;
char *device_presentation_icon_name;
guint64 device_size;
props->device_mount_paths = g_strdupv (g_value_get_boxed (value));
else if (strcmp (key, "device-mounted-by-uid") == 0)
props->device_mounted_by_uid = g_value_get_uint (value);
+ else if (strcmp (key, "device-presentation-hide") == 0)
+ props->device_presentation_hide = g_value_get_boolean (value);
else if (strcmp (key, "device-presentation-name") == 0)
props->device_presentation_name = g_strdup (g_value_get_string (value));
else if (strcmp (key, "device-presentation-icon-name") == 0)
}
g_print ("\n");
g_print (" mounted by uid: %d\n", props->device_mounted_by_uid);
+ g_print (" presentation hide: %d\n", props->device_presentation_hide);
g_print (" presentation name: %s\n", props->device_presentation_name);
g_print (" presentation icon: %s\n", props->device_presentation_icon_name);
g_print (" size: %" G_GUINT64_FORMAT "\n", props->device_size);