[gnome-control-center] wacom: Update from gnome-settings-daemon



commit e463a1eb555d45874dc96644d33a675995ccd52e
Author: Benjamin Tissoires <benjamin tissoires redhat com>
Date:   Fri Mar 13 17:08:00 2015 -0400

    wacom: Update from gnome-settings-daemon
    
    https://bugzilla.gnome.org/show_bug.cgi?id=746117

 panels/wacom/gsd-wacom-device.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/panels/wacom/gsd-wacom-device.c b/panels/wacom/gsd-wacom-device.c
index 2e0ea7b..b109444 100644
--- a/panels/wacom/gsd-wacom-device.c
+++ b/panels/wacom/gsd-wacom-device.c
@@ -122,8 +122,10 @@ gsd_wacom_stylus_finalize (GObject *object)
 }
 
 static const char *
-get_icon_name_from_type (WacomStylusType type)
+get_icon_name_from_type (const WacomStylus *wstylus)
 {
+       WacomStylusType type = libwacom_stylus_get_type (wstylus);
+
        switch (type) {
        case WSTYLUS_INKING:
        case WSTYLUS_STROKE:
@@ -137,6 +139,8 @@ get_icon_name_from_type (WacomStylusType type)
        case WSTYLUS_CLASSIC:
                return "wacom-stylus-classic";
        default:
+               if (!libwacom_stylus_has_eraser (wstylus))
+                       return "wacom-stylus-no-eraser";
                return "wacom-stylus";
        }
 }
@@ -158,7 +162,7 @@ gsd_wacom_stylus_new (GsdWacomDevice    *device,
        stylus->priv->name = g_strdup (libwacom_stylus_get_name (wstylus));
        stylus->priv->settings = settings;
        stylus->priv->type = libwacom_stylus_get_type (wstylus);
-       stylus->priv->icon_name = get_icon_name_from_type (stylus->priv->type);
+       stylus->priv->icon_name = get_icon_name_from_type (wstylus);
        stylus->priv->has_eraser = libwacom_stylus_has_eraser (wstylus);
        stylus->priv->num_buttons = libwacom_stylus_get_num_buttons (wstylus);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]