aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-toolbars-model.c
diff options
context:
space:
mode:
authorDiego Escalante Urrelo <descalante@igalia.com>2010-07-25 07:59:55 +0800
committerXan Lopez <xan@gnome.org>2010-10-08 17:09:11 +0800
commit5df7af9e3041102a5f5601d60faa11c38b48de75 (patch)
treefe0306b87e0874a8541a082fe844f4a487331161 /src/ephy-toolbars-model.c
parent60d08f64c2466ce8eda20d832239ec6defc9ef06 (diff)
downloadgsoc2013-epiphany-5df7af9e3041102a5f5601d60faa11c38b48de75.tar
gsoc2013-epiphany-5df7af9e3041102a5f5601d60faa11c38b48de75.tar.gz
gsoc2013-epiphany-5df7af9e3041102a5f5601d60faa11c38b48de75.tar.bz2
gsoc2013-epiphany-5df7af9e3041102a5f5601d60faa11c38b48de75.tar.lz
gsoc2013-epiphany-5df7af9e3041102a5f5601d60faa11c38b48de75.tar.xz
gsoc2013-epiphany-5df7af9e3041102a5f5601d60faa11c38b48de75.tar.zst
gsoc2013-epiphany-5df7af9e3041102a5f5601d60faa11c38b48de75.zip
gsettings: port epiphany to gsettings
Adds our own schemas, a migration file and removes old gconf API and files. Bug #624485
Diffstat (limited to 'src/ephy-toolbars-model.c')
-rw-r--r--src/ephy-toolbars-model.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/ephy-toolbars-model.c b/src/ephy-toolbars-model.c
index a10fc3ada..5dc6cf4b1 100644
--- a/src/ephy-toolbars-model.c
+++ b/src/ephy-toolbars-model.c
@@ -23,7 +23,7 @@
#include "ephy-toolbars-model.h"
#include "ephy-file-helpers.h"
#include "ephy-prefs.h"
-#include "eel-gconf-extensions.h"
+#include "ephy-settings.h"
#include "eggtypebuiltins.h"
#include "ephy-debug.h"
@@ -39,7 +39,6 @@ struct _EphyToolbarsModelPrivate
char *xml_file;
EggTbModelFlags style;
guint timeout;
- guint style_notifier_id;
};
static void ephy_toolbars_model_class_init (EphyToolbarsModelClass *klass);
@@ -118,7 +117,8 @@ get_toolbar_style (void)
EggTbModelFlags flags = 0;
char *pref;
- pref = eel_gconf_get_string (CONF_INTERFACE_TOOLBAR_STYLE);
+ pref = g_settings_get_string (EPHY_SETTINGS_UI,
+ EPHY_PREFS_UI_TOOLBAR_STYLE);
if (pref != NULL)
{
flags_class = g_type_class_ref (EGG_TYPE_TB_MODEL_FLAGS);
@@ -137,10 +137,9 @@ get_toolbar_style (void)
}
static void
-toolbar_style_notifier (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- EphyToolbarsModel *model)
+toolbar_style_changed_cb (GSettings *settings,
+ char *key,
+ EphyToolbarsModel *model)
{
model->priv->style = get_toolbar_style ();
@@ -233,9 +232,9 @@ ephy_toolbars_model_init (EphyToolbarsModel *model)
NULL);
priv->style = get_toolbar_style ();
- priv->style_notifier_id = eel_gconf_notification_add
- (CONF_INTERFACE_TOOLBAR_STYLE,
- (GConfClientNotifyFunc) toolbar_style_notifier, model);
+ g_signal_connect (EPHY_SETTINGS_UI,
+ "changed::" EPHY_PREFS_UI_TOOLBAR_STYLE,
+ G_CALLBACK (toolbar_style_changed_cb), model);
g_signal_connect_after (model, "item_added",
G_CALLBACK (save_changes), NULL);
@@ -263,11 +262,6 @@ ephy_toolbars_model_finalize (GObject *object)
EphyToolbarsModel *model = EPHY_TOOLBARS_MODEL (object);
EphyToolbarsModelPrivate *priv = model->priv;
- if (priv->style_notifier_id != 0)
- {
- eel_gconf_notification_remove (priv->style_notifier_id);
- }
-
if (priv->timeout != 0)
{
g_source_remove (priv->timeout);