summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2012-06-06 18:04:05 +0200
committerOlivier Fourdan <ofourdan@redhat.com>2012-06-11 15:01:02 +0200
commitc4c4637972128eb0ac18c257dbd2e0a39f12487c (patch)
tree43efe9b334be4ec0a48e35434854bcdb84643a50
parent49c02b7e4293a2b109df39800f3d33c090b4ecd2 (diff)
downloadgnome-settings-daemon-c4c4637972128eb0ac18c257dbd2e0a39f12487c.tar.gz
wacom: flag unknown devices created from fallback
so we can report that in the UI. https://bugzilla.gnome.org/show_bug.cgi?id=677562
-rw-r--r--plugins/wacom/gsd-wacom-device.c10
-rw-r--r--plugins/wacom/gsd-wacom-device.h1
-rw-r--r--plugins/wacom/list-wacom.c1
3 files changed, 12 insertions, 0 deletions
diff --git a/plugins/wacom/gsd-wacom-device.c b/plugins/wacom/gsd-wacom-device.c
index 060fd575..4f0ed85f 100644
--- a/plugins/wacom/gsd-wacom-device.c
+++ b/plugins/wacom/gsd-wacom-device.c
@@ -321,6 +321,7 @@ struct GsdWacomDevicePrivate
char *tool_name;
gboolean reversible;
gboolean is_screen_tablet;
+ gboolean is_fallback;
GList *styli;
GsdWacomStylus *last_stylus;
GList *buttons;
@@ -1220,6 +1221,7 @@ gsd_wacom_device_constructor (GType type,
gdk_device_get_name (device->priv->gdk_device),
device->priv->path);
+ device->priv->is_fallback = TRUE;
wacom_error = libwacom_error_new ();
wacom_device = libwacom_new_from_path (db, device->priv->path, TRUE, wacom_error);
if (wacom_device == NULL) {
@@ -1459,6 +1461,14 @@ gsd_wacom_device_is_screen_tablet (GsdWacomDevice *device)
return device->priv->is_screen_tablet;
}
+gboolean
+gsd_wacom_device_is_fallback (GsdWacomDevice *device)
+{
+ g_return_val_if_fail (GSD_IS_WACOM_DEVICE (device), FALSE);
+
+ return device->priv->is_fallback;
+}
+
GSettings *
gsd_wacom_device_get_settings (GsdWacomDevice *device)
{
diff --git a/plugins/wacom/gsd-wacom-device.h b/plugins/wacom/gsd-wacom-device.h
index 327b4886..b59493d9 100644
--- a/plugins/wacom/gsd-wacom-device.h
+++ b/plugins/wacom/gsd-wacom-device.h
@@ -137,6 +137,7 @@ const char * gsd_wacom_device_get_icon_name (GsdWacomDevice *device);
const char * gsd_wacom_device_get_tool_name (GsdWacomDevice *device);
gboolean gsd_wacom_device_reversible (GsdWacomDevice *device);
gboolean gsd_wacom_device_is_screen_tablet (GsdWacomDevice *device);
+gboolean gsd_wacom_device_is_fallback (GsdWacomDevice *device);
GSettings * gsd_wacom_device_get_settings (GsdWacomDevice *device);
void gsd_wacom_device_set_current_stylus (GsdWacomDevice *device,
int stylus_id);
diff --git a/plugins/wacom/list-wacom.c b/plugins/wacom/list-wacom.c
index 20089069..6f19633f 100644
--- a/plugins/wacom/list-wacom.c
+++ b/plugins/wacom/list-wacom.c
@@ -195,6 +195,7 @@ list_devices (GList *devices)
gsd_wacom_device_type_to_string (gsd_wacom_device_get_device_type (device)));
g_print ("\tReversible: %s\n", BOOL_AS_STR (gsd_wacom_device_reversible (device)));
g_print ("\tScreen Tablet: %s\n", BOOL_AS_STR (gsd_wacom_device_is_screen_tablet (device)));
+ g_print ("\tUnknown (fallback) device: %s\n", BOOL_AS_STR(gsd_wacom_device_is_fallback (device)));
loc = get_loc (gsd_wacom_device_get_settings (device));
g_print ("\tGeneric settings: %s\n", loc);