[gnome-control-center/gnome-3-14] wacom: Update from gnome-settings-daemon
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-3-14] wacom: Update from gnome-settings-daemon
- Date: Tue, 26 Apr 2016 11:03:19 +0000 (UTC)
commit dbafac58ae346e6ca3f47dcb8d3ee9d3cf801ad8
Author: Bastien Nocera <hadess hadess net>
Date: Thu Mar 24 16:41:41 2016 +0100
wacom: Update from gnome-settings-daemon
panels/wacom/gsd-wacom-device.c | 27 +++++++++++++++++++++------
1 files changed, 21 insertions(+), 6 deletions(-)
---
diff --git a/panels/wacom/gsd-wacom-device.c b/panels/wacom/gsd-wacom-device.c
index d656c2f..421cf8e 100644
--- a/panels/wacom/gsd-wacom-device.c
+++ b/panels/wacom/gsd-wacom-device.c
@@ -1247,7 +1247,6 @@ static GList *
gsd_wacom_device_add_buttons_dir (WacomDevice *wacom_device,
const char *settings_path,
WacomButtonFlags direction,
- const char *button_str,
const char *button_str_id)
{
GList *l;
@@ -1268,7 +1267,23 @@ gsd_wacom_device_add_buttons_dir (WacomDevice *wacom_device,
if (flags & WACOM_BUTTON_MODESWITCH)
continue;
- name = g_strdup_printf (button_str, button_num++);
+ switch (direction) {
+ case WACOM_BUTTON_POSITION_LEFT:
+ name = g_strdup_printf (_("Left Button #%d"), button_num++);
+ break;
+ case WACOM_BUTTON_POSITION_RIGHT:
+ name = g_strdup_printf (_("Right Button #%d"), button_num++);
+ break;
+ case WACOM_BUTTON_POSITION_TOP:
+ name = g_strdup_printf (_("Top Button #%d"), button_num++);
+ break;
+ case WACOM_BUTTON_POSITION_BOTTOM:
+ name = g_strdup_printf (_("Bottom Button #%d"), button_num++);
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
id = g_strdup_printf ("%s%c", button_str_id, i);
has_oled = (libwacom_get_button_flag (wacom_device, i) & WACOM_BUTTON_OLED) != 0;
l = g_list_append (l, gsd_wacom_tablet_button_new (name,
@@ -1331,16 +1346,16 @@ gsd_wacom_device_add_buttons (GsdWacomDevice *device,
ret = NULL;
- l = gsd_wacom_device_add_buttons_dir (wacom_device, settings_path, WACOM_BUTTON_POSITION_LEFT,
_("Left Button #%d"), "button");
+ l = gsd_wacom_device_add_buttons_dir (wacom_device, settings_path, WACOM_BUTTON_POSITION_LEFT,
"button");
if (l)
ret = l;
- l = gsd_wacom_device_add_buttons_dir (wacom_device, settings_path, WACOM_BUTTON_POSITION_RIGHT,
_("Right Button #%d"), "button");
+ l = gsd_wacom_device_add_buttons_dir (wacom_device, settings_path, WACOM_BUTTON_POSITION_RIGHT,
"button");
if (l)
ret = g_list_concat (ret, l);
- l = gsd_wacom_device_add_buttons_dir (wacom_device, settings_path, WACOM_BUTTON_POSITION_TOP, _("Top
Button #%d"), "button");
+ l = gsd_wacom_device_add_buttons_dir (wacom_device, settings_path, WACOM_BUTTON_POSITION_TOP,
"button");
if (l)
ret = g_list_concat (ret, l);
- l = gsd_wacom_device_add_buttons_dir (wacom_device, settings_path, WACOM_BUTTON_POSITION_BOTTOM,
_("Bottom Button #%d"), "button");
+ l = gsd_wacom_device_add_buttons_dir (wacom_device, settings_path, WACOM_BUTTON_POSITION_BOTTOM,
"button");
if (l)
ret = g_list_concat (ret, l);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]