diff options
author | Diego Escalante Urrelo <descalante@igalia.com> | 2010-07-25 07:59:55 +0800 |
---|---|---|
committer | Xan Lopez <xan@gnome.org> | 2010-10-08 17:09:11 +0800 |
commit | 5df7af9e3041102a5f5601d60faa11c38b48de75 (patch) | |
tree | fe0306b87e0874a8541a082fe844f4a487331161 /src/ephy-notebook.c | |
parent | 60d08f64c2466ce8eda20d832239ec6defc9ef06 (diff) | |
download | gsoc2013-epiphany-5df7af9e3041102a5f5601d60faa11c38b48de75.tar.gz 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-notebook.c')
-rw-r--r-- | src/ephy-notebook.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c index 73fad2b63..23805d267 100644 --- a/src/ephy-notebook.c +++ b/src/ephy-notebook.c @@ -23,8 +23,8 @@ #include "config.h" #include "ephy-notebook.h" -#include "eel-gconf-extensions.h" #include "ephy-prefs.h" +#include "ephy-settings.h" #include "ephy-marshal.h" #include "ephy-file-helpers.h" #include "ephy-dnd.h" @@ -371,7 +371,8 @@ notebook_drag_data_received_cb (GtkWidget* widget, g_signal_stop_emission_by_name (widget, "drag_data_received"); - if (eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_ARBITRARY_URL)) return; + if (g_settings_get_boolean (EPHY_SETTINGS_LOCKDOWN, + EPHY_PREFS_LOCKDOWN_ARBITRARY_URL)) return; data = gtk_selection_data_get_data (selection_data); if (gtk_selection_data_get_length (selection_data) <= 0 || data == NULL) return; @@ -437,17 +438,18 @@ update_tabs_visibility (EphyNotebook *nb, if (before_inserting) num++; - show_tabs = (eel_gconf_get_boolean (CONF_ALWAYS_SHOW_TABS_BAR) || num > 1) && + show_tabs = (g_settings_get_boolean (EPHY_SETTINGS_UI, + EPHY_PREFS_UI_ALWAYS_SHOW_TABS_BAR) + || num > 1) && priv->show_tabs == TRUE; gtk_notebook_set_show_tabs (GTK_NOTEBOOK (nb), show_tabs); } static void -tabs_visibility_notifier (GConfClient *client, - guint cnxn_id, - GConfEntry *entry, - EphyNotebook *nb) +show_tabs_changed_cb (GSettings *settings, + char *key, + EphyNotebook *nb) { update_tabs_visibility (nb, FALSE); } @@ -484,9 +486,9 @@ ephy_notebook_init (EphyNotebook *notebook) GDK_ACTION_MOVE | GDK_ACTION_COPY); gtk_drag_dest_add_text_targets (widget); - priv->tabs_vis_notifier_id = eel_gconf_notification_add - (CONF_ALWAYS_SHOW_TABS_BAR, - (GConfClientNotifyFunc)tabs_visibility_notifier, notebook); + g_signal_connect (EPHY_SETTINGS_UI, + "changed::" EPHY_PREFS_UI_ALWAYS_SHOW_TABS_BAR, + G_CALLBACK (show_tabs_changed_cb), notebook); } static void @@ -495,8 +497,6 @@ ephy_notebook_finalize (GObject *object) EphyNotebook *notebook = EPHY_NOTEBOOK (object); EphyNotebookPrivate *priv = notebook->priv; - eel_gconf_notification_remove (priv->tabs_vis_notifier_id); - g_list_free (priv->focused_pages); G_OBJECT_CLASS (ephy_notebook_parent_class)->finalize (object); |