wacom: Update from gnome-settings-daemon
https://bugzilla.gnome.org/show_bug.cgi?id=746117
This commit is contained in:
parent
66cb45bdad
commit
e463a1eb55
1 changed files with 6 additions and 2 deletions
|
@ -122,8 +122,10 @@ gsd_wacom_stylus_finalize (GObject *object)
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *
|
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) {
|
switch (type) {
|
||||||
case WSTYLUS_INKING:
|
case WSTYLUS_INKING:
|
||||||
case WSTYLUS_STROKE:
|
case WSTYLUS_STROKE:
|
||||||
|
@ -137,6 +139,8 @@ get_icon_name_from_type (WacomStylusType type)
|
||||||
case WSTYLUS_CLASSIC:
|
case WSTYLUS_CLASSIC:
|
||||||
return "wacom-stylus-classic";
|
return "wacom-stylus-classic";
|
||||||
default:
|
default:
|
||||||
|
if (!libwacom_stylus_has_eraser (wstylus))
|
||||||
|
return "wacom-stylus-no-eraser";
|
||||||
return "wacom-stylus";
|
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->name = g_strdup (libwacom_stylus_get_name (wstylus));
|
||||||
stylus->priv->settings = settings;
|
stylus->priv->settings = settings;
|
||||||
stylus->priv->type = libwacom_stylus_get_type (wstylus);
|
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->has_eraser = libwacom_stylus_has_eraser (wstylus);
|
||||||
stylus->priv->num_buttons = libwacom_stylus_get_num_buttons (wstylus);
|
stylus->priv->num_buttons = libwacom_stylus_get_num_buttons (wstylus);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue