[anjuta/gsettings-migration: 11/65] libanjuta: Fixup preference notifications
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta/gsettings-migration: 11/65] libanjuta: Fixup preference notifications
- Date: Sun, 17 Oct 2010 09:33:41 +0000 (UTC)
commit 35982bf99a2c7f8ba5c2c0f390d5c421f776c173
Author: Johannes Schmid <jhs gnome org>
Date: Thu Sep 30 22:07:09 2010 +0200
libanjuta: Fixup preference notifications
libanjuta/anjuta-preferences.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/libanjuta/anjuta-preferences.c b/libanjuta/anjuta-preferences.c
index caf5b85..111fd1d 100644
--- a/libanjuta/anjuta-preferences.c
+++ b/libanjuta/anjuta-preferences.c
@@ -128,7 +128,7 @@ typedef struct
/* Data for notifications */
#define PREFERENCE_PROPERTY_PREFIX "preferences_"
-#define GSETTINGS_SCHEME "anjuta_preferences"
+#define GSETTINGS_SCHEME "org.gnome.anjuta"
/**
* anjuta_preferences_get:
@@ -869,7 +869,7 @@ anjuta_preferences_instance_init (AnjutaPreferences *pr)
NULL,
g_free);
- pr->priv->gsettings = g_settings_new ("anjuta-preferences");
+ pr->priv->gsettings = g_settings_new ("org.gnome.anjuta");
}
@@ -958,15 +958,16 @@ anjuta_preferences_notify_add (AnjutaPreferences *pr,
{
gchar* signal_name = g_strdup_printf ("changed::%s", key);
AnjutaPreferencesNotifyData* ndata = g_new0 (AnjutaPreferencesNotifyData, 1);
- guint id = g_signal_connect (pr->priv->gsettings, signal_name,
+ ndata->id = g_signal_connect (pr->priv->gsettings, signal_name,
G_CALLBACK (preferences_key_changed),
ndata);
+ ndata->pr = pr;
ndata->func = func;
ndata->data = data;
g_hash_table_insert (pr->priv->notifications,
- GUINT_TO_POINTER(id),
- data);
- return id;
+ &ndata->id,
+ ndata);
+ return ndata->id;
}
/**
@@ -980,7 +981,7 @@ void
anjuta_preferences_notify_remove (AnjutaPreferences *pr, guint notify_id)
{
g_signal_handler_disconnect (pr->priv->gsettings, notify_id);
- g_hash_table_remove (pr->priv->notifications, GUINT_TO_POINTER(notify_id));
+ g_hash_table_remove (pr->priv->notifications, ¬ify_id);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]