[gnome-settings-daemon] wacom: restore OLED handling on Intuos4 tablets
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] wacom: restore OLED handling on Intuos4 tablets
- Date: Fri, 4 Oct 2013 11:40:15 +0000 (UTC)
commit d97d540b7e17f9e0fa759b2388e09b4600ed118c
Author: Bastien Nocera <hadess hadess net>
Date: Sat Aug 17 01:37:41 2013 +0100
wacom: restore OLED handling on Intuos4 tablets
This patch restores OLED handling that was broken by recent button
mapping changes.
https://bugzilla.gnome.org/show_bug.cgi?id=705943
plugins/wacom/gsd-wacom-button-editor.c | 28 +++++++++++++++++++++++++++-
1 files changed, 27 insertions(+), 1 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-button-editor.c b/plugins/wacom/gsd-wacom-button-editor.c
index 6197857..68b90d5 100644
--- a/plugins/wacom/gsd-wacom-button-editor.c
+++ b/plugins/wacom/gsd-wacom-button-editor.c
@@ -31,6 +31,7 @@
#define ACTION_TYPE_KEY "action-type"
#define CUSTOM_ACTION_KEY "custom-action"
#define CUSTOM_ELEVATOR_ACTION_KEY "custom-elevator-action"
+#define OLED_LABEL "oled-label"
#define GSD_WACOM_BUTTON_EDITOR_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj),
GSD_WACOM_BUTTON_EDITOR_TYPE, GsdWacomButtonEditorPrivate))
@@ -144,6 +145,23 @@ change_button_action_type (GsdWacomButtonEditor *self,
}
else if (current_type != type)
{
+ const char *oled_label;
+
+ switch (type) {
+ case GSD_WACOM_ACTION_TYPE_NONE:
+ oled_label = "";
+ break;
+ case GSD_WACOM_ACTION_TYPE_HELP:
+ oled_label = C_("Action type", "Show On-Screen Help");
+ break;
+ case GSD_WACOM_ACTION_TYPE_SWITCH_MONITOR:
+ oled_label = C_("Action type", "Switch Monitor");
+ break;
+ default:
+ oled_label = "";
+ break;
+ };
+ g_settings_set_string (button->settings, OLED_LABEL, oled_label);
g_settings_set_enum (button->settings, ACTION_TYPE_KEY, type);
}
@@ -253,7 +271,15 @@ on_key_shortcut_edited (GsdWacomKeyShortcutButton *shortcut_button,
g_strfreev (strv);
}
else
- g_settings_set_string (button->settings, CUSTOM_ACTION_KEY, custom_key);
+ {
+ char *oled_label;
+
+ oled_label = gtk_accelerator_get_label (keyval, mask);
+ g_settings_set_string (button->settings, OLED_LABEL, oled_label);
+ g_free (oled_label);
+
+ g_settings_set_string (button->settings, CUSTOM_ACTION_KEY, custom_key);
+ }
g_free (custom_key);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]