[gnome-control-center] wacom: Add basic OLED handling for Intuos4
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] wacom: Add basic OLED handling for Intuos4
- Date: Fri, 17 May 2013 07:41:42 +0000 (UTC)
commit 16c0a66acfa941266ce020b79247295ca8ffaa9f
Author: Przemo Firszt <przemo firszt eu>
Date: Fri Mar 1 17:05:48 2013 +0000
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
panels/wacom/cc-wacom-page.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/panels/wacom/cc-wacom-page.c b/panels/wacom/cc-wacom-page.c
index 22fc282..31f1882 100644
--- a/panels/wacom/cc-wacom-page.c
+++ b/panels/wacom/cc-wacom-page.c
@@ -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, "");
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]