[gnome-settings-daemon] wacom: Monitor the last-stylus changing
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] wacom: Monitor the last-stylus changing
- Date: Wed, 14 Dec 2011 18:57:17 +0000 (UTC)
commit 904a13a1d39bea9f595215f52745bf499af5a50d
Author: Bastien Nocera <hadess hadess net>
Date: Wed Dec 14 18:32:20 2011 +0000
wacom: Monitor the last-stylus changing
And applying relevant settings.
plugins/wacom/gsd-wacom-manager.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-manager.c b/plugins/wacom/gsd-wacom-manager.c
index 8f7d5ea..8c16139 100644
--- a/plugins/wacom/gsd-wacom-manager.c
+++ b/plugins/wacom/gsd-wacom-manager.c
@@ -436,6 +436,16 @@ stylus_settings_changed (GSettings *settings,
}
static void
+last_stylus_changed (GsdWacomDevice *device,
+ GParamSpec *pspec,
+ GsdWacomManager *manager)
+{
+ g_debug ("Stylus for device '%s' changed, applying settings",
+ gsd_wacom_device_get_name (device));
+ apply_stylus_settings (device);
+}
+
+static void
device_added_cb (GdkDeviceManager *device_manager,
GdkDevice *gdk_device,
GsdWacomManager *manager)
@@ -470,6 +480,9 @@ device_added_cb (GdkDeviceManager *device_manager,
}
g_list_free (styli);
+
+ g_signal_connect (G_OBJECT (device), "notify::last-stylus",
+ G_CALLBACK (last_stylus_changed), manager);
}
set_wacom_settings (manager, device);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]