Commit 16c0a66a authored by Przemo Firszt's avatar Przemo Firszt Committed by Bastien Nocera
Browse files

wacom: Add basic OLED handling for Intuos4

This sets the OLED to the keyboard shortcut when a
custom keyboard shortcut is used.

https://bugzilla.gnome.org/show_bug.cgi?id=671072
parent 90f49a4d
......@@ -50,9 +50,10 @@ G_DEFINE_TYPE (CcWacomPage, cc_wacom_page, GTK_TYPE_BOX)
#define THRESHOLD_MISCLICK 15
#define THRESHOLD_DOUBLECLICK 7
#define ACTION_TYPE_KEY "action-type"
#define CUSTOM_ACTION_KEY "custom-action"
#define ACTION_TYPE_KEY "action-type"
#define CUSTOM_ACTION_KEY "custom-action"
#define KEY_CUSTOM_ELEVATOR_ACTION "custom-elevator-action"
#define OLED_LABEL "oled-label"
enum {
MAPPING_DESCRIPTION_COLUMN,
......@@ -577,6 +578,9 @@ accel_edited_callback (GtkCellRendererText *cell,
g_strfreev (strv);
} else {
g_settings_set_string (button->settings, CUSTOM_ACTION_KEY, str);
g_free (str);
str = gtk_accelerator_get_label (keyval, mask);
g_settings_set_string (button->settings, OLED_LABEL, str);
}
g_settings_set_enum (button->settings, ACTION_TYPE_KEY, GSD_WACOM_ACTION_TYPE_CUSTOM);
g_free (str);
......@@ -638,6 +642,7 @@ accel_cleared_callback (GtkCellRendererText *cell,
} else {
g_settings_set_enum (button->settings, ACTION_TYPE_KEY, GSD_WACOM_ACTION_TYPE_NONE);
g_settings_set_string (button->settings, CUSTOM_ACTION_KEY, "");
g_settings_set_string (button->settings, OLED_LABEL, "");
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment