[gnome-control-center] keyboard: Only listen to our own key
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] keyboard: Only listen to our own key
- Date: Thu, 17 Feb 2011 16:52:18 +0000 (UTC)
commit 52f8687c37a7097c8f8f4fe170487bdd651b4c3a
Author: Bastien Nocera <hadess hadess net>
Date: Thu Feb 17 16:50:32 2011 +0000
keyboard: Only listen to our own key
Rather than all the possible changes that could have happened in
the schemas.
panels/keyboard/cc-keyboard-item.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/panels/keyboard/cc-keyboard-item.c b/panels/keyboard/cc-keyboard-item.c
index 73c8b70..0ba7138 100644
--- a/panels/keyboard/cc-keyboard-item.c
+++ b/panels/keyboard/cc-keyboard-item.c
@@ -535,6 +535,8 @@ cc_keyboard_item_load_from_gsettings (CcKeyboardItem *item,
const char *schema,
const char *key)
{
+ char *signal_name;
+
item->schema = g_strdup (schema);
item->key = g_strdup (key);
item->description = g_strdup (description);
@@ -544,8 +546,10 @@ cc_keyboard_item_load_from_gsettings (CcKeyboardItem *item,
item->editable = g_settings_is_writable (item->settings, item->key);
binding_from_string (item->binding, &item->keyval, &item->keycode, &item->mask);
- g_signal_connect (G_OBJECT (item->settings), "changed",
+ signal_name = g_strdup_printf ("changed::%s", item->key);
+ g_signal_connect (G_OBJECT (item->settings), signal_name,
G_CALLBACK (binding_changed), item);
+ g_free (signal_name);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]