diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/calendar/e-cal-shell-backend.c | 40 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-sidebar.c | 12 | ||||
-rw-r--r-- | modules/calendar/e-calendar-preferences.c | 16 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-backend.c | 41 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-content.c | 14 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-view-actions.c | 14 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-backend.c | 40 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-content.c | 16 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-view-actions.c | 14 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-backend.c | 6 | ||||
-rw-r--r-- | modules/mail/em-account-prefs.c | 3 | ||||
-rw-r--r-- | modules/network-manager/Makefile.am | 1 |
12 files changed, 126 insertions, 91 deletions
diff --git a/modules/calendar/e-cal-shell-backend.c b/modules/calendar/e-cal-shell-backend.c index 96077cf19e..36af9fd827 100644 --- a/modules/calendar/e-cal-shell-backend.c +++ b/modules/calendar/e-cal-shell-backend.c @@ -901,18 +901,24 @@ e_cal_shell_backend_get_source_list (ECalShellBackend *cal_shell_backend) GSList * e_cal_shell_backend_get_selected_calendars (ECalShellBackend *cal_shell_backend) { - GConfClient *client; - GSList *selected_calendars; - const gchar *key; + GSettings *settings; + char **strv; + gint i; + GSList *selected_calendars = NULL; g_return_val_if_fail ( E_IS_CAL_SHELL_BACKEND (cal_shell_backend), NULL); - client = gconf_client_get_default (); - key = "/apps/evolution/calendar/display/selected_calendars"; - selected_calendars = gconf_client_get_list ( - client, key, GCONF_VALUE_STRING, NULL); - g_object_unref (client); + settings = g_settings_new ("org.gnome.evolution.calendar"); + strv = g_settings_get_strv (settings, "selected-calendars"); + g_object_unref (settings); + + if (strv != NULL) { + for (i = 0; strv[i] != NULL; i++) + selected_calendars = g_slist_append (selected_calendars, g_strdup (strv[i])); + + g_strfreev (strv); + } return selected_calendars; } @@ -921,16 +927,20 @@ void e_cal_shell_backend_set_selected_calendars (ECalShellBackend *cal_shell_backend, GSList *selected_calendars) { - GConfClient *client; - const gchar *key; + GSettings *settings; + GSList *l; + GPtrArray *array = g_ptr_array_new (); g_return_if_fail (E_IS_CAL_SHELL_BACKEND (cal_shell_backend)); - client = gconf_client_get_default (); - key = "/apps/evolution/calendar/display/selected_calendars"; - gconf_client_set_list ( - client, key, GCONF_VALUE_STRING, selected_calendars, NULL); - g_object_unref (client); + for (l = selected_calendars; l != NULL; l = l->next) + g_ptr_array_add (array, l->data); + + settings = g_settings_new ("org.gnome.evolution.calendar"); + g_settings_set_strv (settings, "selected-calendars", array->pdata); + g_object_unref (settings); + + g_ptr_array_free (array, FALSE); } void diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c index 77c5639a78..f896db6136 100644 --- a/modules/calendar/e-cal-shell-sidebar.c +++ b/modules/calendar/e-cal-shell-sidebar.c @@ -30,7 +30,6 @@ #include <libedataserverui/e-client-utils.h> #include "e-util/e-alert-dialog.h" -#include "e-util/gconf-bridge.h" #include "widgets/misc/e-paned.h" #include "calendar/gui/e-calendar-selector.h" @@ -523,7 +522,7 @@ cal_shell_sidebar_restore_state_cb (EShellWindow *shell_window, ESourceSelector *selector; ESourceList *source_list; ESource *source; - GConfBridge *bridge; + GSettings *settings; GtkTreeModel *model; GSList *list, *iter; GObject *object; @@ -585,13 +584,14 @@ cal_shell_sidebar_restore_state_cb (EShellWindow *shell_window, G_CALLBACK (cal_shell_sidebar_selection_changed_cb), shell_sidebar); - /* Bind GObject properties to GConf keys. */ + /* Bind GObject properties to settings keys. */ - bridge = gconf_bridge_get (); + settings = g_settings_new ("org.gnome.evolution.calendar"); object = G_OBJECT (priv->paned); - key = "/apps/evolution/calendar/display/date_navigator_pane_position"; - gconf_bridge_bind_property_delayed (bridge, key, object, "vposition"); + g_settings_bind (settings, "date-navigator-pane-position", object, "vposition", G_SETTINGS_BIND_DEFAULT); + + g_object_unref (G_OBJECT (settings)); } static void diff --git a/modules/calendar/e-calendar-preferences.c b/modules/calendar/e-calendar-preferences.c index 85eddd9736..5578f39a2c 100644 --- a/modules/calendar/e-calendar-preferences.c +++ b/modules/calendar/e-calendar-preferences.c @@ -329,13 +329,13 @@ static void notify_with_tray_toggled (GtkToggleButton *toggle, ECalendarPreferences *prefs) { - GConfClient *gconf; + GSettings *settings; g_return_if_fail (toggle != NULL); - gconf = gconf_client_get_default (); - gconf_client_set_bool (gconf, "/apps/evolution/calendar/notify/notify_with_tray", gtk_toggle_button_get_active (toggle), NULL); - g_object_unref (gconf); + settings = g_settings_new ("org.gnome.evolution.calendar"); + g_settings_set_boolean (settings, "notify-with-tray", gtk_toggle_button_get_active (toggle)); + g_object_unref (settings); } static void @@ -454,7 +454,7 @@ initialize_selection (ESourceSelector *selector, static void show_alarms_config (ECalendarPreferences *prefs) { - GConfClient *gconf; + GSettings *settings; if (e_cal_client_get_sources (&prefs->alarms_list, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, NULL)) { prefs->alarm_list_widget = e_source_selector_new (prefs->alarms_list); @@ -464,9 +464,9 @@ show_alarms_config (ECalendarPreferences *prefs) initialize_selection (E_SOURCE_SELECTOR (prefs->alarm_list_widget), prefs->alarms_list); } - gconf = gconf_client_get_default (); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (prefs->notify_with_tray), gconf_client_get_bool (gconf, "/apps/evolution/calendar/notify/notify_with_tray", NULL)); - g_object_unref (gconf); + settings = g_settings_new ("org.gnome.evolution.calendar"); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (prefs->notify_with_tray), g_settings_get_boolean (settings, "notify-with-tray")); + g_object_unref (settings); } /* Shows the current config settings in the dialog. */ diff --git a/modules/calendar/e-memo-shell-backend.c b/modules/calendar/e-memo-shell-backend.c index 7edb82d6bb..5e24425678 100644 --- a/modules/calendar/e-memo-shell-backend.c +++ b/modules/calendar/e-memo-shell-backend.c @@ -645,18 +645,25 @@ e_memo_shell_backend_get_source_list (EMemoShellBackend *memo_shell_backend) GSList * e_memo_shell_backend_get_selected_memo_lists (EMemoShellBackend *memo_shell_backend) { - GConfClient *client; - GSList *selected_memo_lists; - const gchar *key; + GSettings *settings; + char **strv; + gint i; + GSList *selected_memo_lists = NULL; g_return_val_if_fail ( E_IS_MEMO_SHELL_BACKEND (memo_shell_backend), NULL); - client = gconf_client_get_default (); - key = "/apps/evolution/calendar/memos/selected_memos"; - selected_memo_lists = gconf_client_get_list ( - client, key, GCONF_VALUE_STRING, NULL); - g_object_unref (client); + settings = g_settings_new ("org.gnome.evolution.calendar"); + strv = g_settings_get_strv (settings, "selected-memos"); + g_object_unref (settings); + + + if (strv != NULL) { + for (i = 0; strv[i] != NULL; i++) + selected_memo_lists = g_slist_append (selected_memo_lists, g_strdup (strv[i])); + + g_strfreev (strv); + } return selected_memo_lists; } @@ -665,14 +672,18 @@ void e_memo_shell_backend_set_selected_memo_lists (EMemoShellBackend *memo_shell_backend, GSList *selected_memo_lists) { - GConfClient *client; - const gchar *key; + GSettings *settings; + GSList *l; + GPtrArray *array = g_ptr_array_new (); g_return_if_fail (E_IS_MEMO_SHELL_BACKEND (memo_shell_backend)); - client = gconf_client_get_default (); - key = "/apps/evolution/calendar/memos/selected_memos"; - gconf_client_set_list ( - client, key, GCONF_VALUE_STRING, selected_memo_lists, NULL); - g_object_unref (client); + for (l = selected_memo_lists; l != NULL; l = l->next) + g_ptr_array_add (array, l->data); + + settings = g_settings_new ("org.gnome.evolution.calendar"); + g_settings_set_strv (settings, "selected-memos", array->pdata); + g_object_unref (settings); + + g_ptr_array_free (array, FALSE); } diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c index f0f4fe958f..60936ccb8c 100644 --- a/modules/calendar/e-memo-shell-content.c +++ b/modules/calendar/e-memo-shell-content.c @@ -28,7 +28,6 @@ #include <glib/gi18n.h> #include "e-util/e-selection.h" -#include "e-util/gconf-bridge.h" #include "shell/e-shell-utils.h" #include "widgets/menus/gal-view-etable.h" #include "widgets/misc/e-paned.h" @@ -273,23 +272,20 @@ memo_shell_content_restore_state_cb (EShellWindow *shell_window, EShellContent *shell_content) { EMemoShellContentPrivate *priv; - GConfBridge *bridge; + GSettings *settings; GObject *object; - const gchar *key; priv = E_MEMO_SHELL_CONTENT (shell_content)->priv; - /* Bind GObject properties to GConf keys. */ + /* Bind GObject properties to settings keys. */ - bridge = gconf_bridge_get (); + settings = g_settings_new ("org.gnome.evolution.calendar"); object = G_OBJECT (priv->paned); - key = "/apps/evolution/calendar/display/memo_hpane_position"; - gconf_bridge_bind_property_delayed (bridge, key, object, "hposition"); + g_settings_bind (settings, "memo-hpane-position", object, "hposition", G_SETTINGS_BIND_DEFAULT); object = G_OBJECT (priv->paned); - key = "/apps/evolution/calendar/display/memo_vpane_position"; - gconf_bridge_bind_property_delayed (bridge, key, object, "vposition"); + g_settings_bind (settings, "memo-vpane-position", object, "vposition", G_SETTINGS_BIND_DEFAULT); } static GtkOrientation diff --git a/modules/calendar/e-memo-shell-view-actions.c b/modules/calendar/e-memo-shell-view-actions.c index d71b893fe3..c832066b59 100644 --- a/modules/calendar/e-memo-shell-view-actions.c +++ b/modules/calendar/e-memo-shell-view-actions.c @@ -863,7 +863,7 @@ e_memo_shell_view_actions_init (EMemoShellView *memo_shell_view) EPreviewPane *preview_pane; EWebView *web_view; GtkActionGroup *action_group; - GConfBridge *bridge; + GSettings *memo_settings; GtkAction *action; GObject *object; const gchar *key; @@ -922,17 +922,17 @@ e_memo_shell_view_actions_init (EMemoShellView *memo_shell_view) action_group, lockdown_save_to_disk_popup_entries, G_N_ELEMENTS (lockdown_save_to_disk_popup_entries)); - /* Bind GObject properties to GConf keys. */ + /* Bind GObject properties to settings keys. */ - bridge = gconf_bridge_get (); + memo_settings = g_settings_new ("org.gnome.evolution.calendar"); object = G_OBJECT (ACTION (MEMO_PREVIEW)); - key = "/apps/evolution/calendar/display/show_memo_preview"; - gconf_bridge_bind_property (bridge, key, object, "active"); + g_settings_bind (memo_settings, "show-memo-preview", object, "active", G_SETTINGS_BIND_DEFAULT); object = G_OBJECT (ACTION (MEMO_VIEW_VERTICAL)); - key = "/apps/evolution/calendar/display/memo_layout"; - gconf_bridge_bind_property (bridge, key, object, "current-value"); + g_settings_bind (memo_settings, "memo-layout", object, "current-value", G_SETTINGS_BIND_DEFAULT); + + g_object_unref (G_OBJECT (memo_settings)); /* Fine tuning. */ diff --git a/modules/calendar/e-task-shell-backend.c b/modules/calendar/e-task-shell-backend.c index f6a5e14588..0236a1227e 100644 --- a/modules/calendar/e-task-shell-backend.c +++ b/modules/calendar/e-task-shell-backend.c @@ -650,18 +650,24 @@ e_task_shell_backend_get_source_list (ETaskShellBackend *task_shell_backend) GSList * e_task_shell_backend_get_selected_task_lists (ETaskShellBackend *task_shell_backend) { - GConfClient *client; - GSList *selected_task_lists; - const gchar *key; + GSettings *settings; + char **strv; + gint i; + GSList *selected_task_lists = NULL; g_return_val_if_fail ( E_IS_TASK_SHELL_BACKEND (task_shell_backend), NULL); - client = gconf_client_get_default (); - key = "/apps/evolution/calendar/tasks/selected_tasks"; - selected_task_lists = gconf_client_get_list ( - client, key, GCONF_VALUE_STRING, NULL); - g_object_unref (client); + settings = g_settings_new ("org.gnome.evolution.calendar"); + strv = g_settings_get_strv (settings, "selected-tasks"); + g_object_unref (G_OBJECT (settings)); + + if (strv != NULL) { + for (i = 0; strv[i] != NULL; i++) + selected_task_lists = g_slist_append (selected_task_lists, g_strdup (strv[i])); + + g_strfreev (strv); + } return selected_task_lists; } @@ -670,14 +676,18 @@ void e_task_shell_backend_set_selected_task_lists (ETaskShellBackend *task_shell_backend, GSList *selected_task_lists) { - GConfClient *client; - const gchar *key; + GSettings *settings; + GSList *l; + GPtrArray *array = g_ptr_array_new (); g_return_if_fail (E_IS_TASK_SHELL_BACKEND (task_shell_backend)); - client = gconf_client_get_default (); - key = "/apps/evolution/calendar/tasks/selected_tasks"; - gconf_client_set_list ( - client, key, GCONF_VALUE_STRING, selected_task_lists, NULL); - g_object_unref (client); + for (l = selected_task_lists; l != NULL; l = l->next) + g_ptr_array_add (array, l->data); + + settings = g_settings_new ("org.gnome.evolution.calendar"); + g_settings_set_strv (settings, "selected-tasks", array->pdata); + g_object_unref (settings); + + g_ptr_array_free (array, FALSE); } diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c index 743bb937e7..cb2443f19d 100644 --- a/modules/calendar/e-task-shell-content.c +++ b/modules/calendar/e-task-shell-content.c @@ -28,7 +28,6 @@ #include <glib/gi18n.h> #include "e-util/e-selection.h" -#include "e-util/gconf-bridge.h" #include "shell/e-shell-utils.h" #include "widgets/menus/gal-view-etable.h" #include "widgets/misc/e-paned.h" @@ -271,23 +270,22 @@ task_shell_content_restore_state_cb (EShellWindow *shell_window, EShellContent *shell_content) { ETaskShellContentPrivate *priv; - GConfBridge *bridge; + GSettings *settings; GObject *object; - const gchar *key; priv = E_TASK_SHELL_CONTENT (shell_content)->priv; - /* Bind GObject properties to GConf keys. */ + /* Bind GObject properties to settings keys. */ - bridge = gconf_bridge_get (); + settings = g_settings_new ("org.gnome.evolution.calendar"); object = G_OBJECT (priv->paned); - key = "/apps/evolution/calendar/display/task_hpane_position"; - gconf_bridge_bind_property_delayed (bridge, key, object, "hposition"); + g_settings_bind (settings, "task-hpane-position", object, "hposition", G_SETTINGS_BIND_DEFAULT); object = G_OBJECT (priv->paned); - key = "/apps/evolution/calendar/display/task_vpane_position"; - gconf_bridge_bind_property_delayed (bridge, key, object, "vposition"); + g_settings_bind (settings, "task-vpane-position", object, "vposition", G_SETTINGS_BIND_DEFAULT); + + g_object_unref (G_OBJECT (settings)); } static GtkOrientation diff --git a/modules/calendar/e-task-shell-view-actions.c b/modules/calendar/e-task-shell-view-actions.c index 2fe28494ac..ad980ea576 100644 --- a/modules/calendar/e-task-shell-view-actions.c +++ b/modules/calendar/e-task-shell-view-actions.c @@ -1062,7 +1062,7 @@ e_task_shell_view_actions_init (ETaskShellView *task_shell_view) EPreviewPane *preview_pane; EWebView *web_view; GtkActionGroup *action_group; - GConfBridge *bridge; + GSettings *settings; GtkAction *action; GObject *object; const gchar *key; @@ -1121,17 +1121,17 @@ e_task_shell_view_actions_init (ETaskShellView *task_shell_view) action_group, lockdown_save_to_disk_popup_entries, G_N_ELEMENTS (lockdown_save_to_disk_popup_entries)); - /* Bind GObject properties to GConf keys. */ + /* Bind GObject properties to settings keys. */ - bridge = gconf_bridge_get (); + settings = g_settings_new ("org.gnome.evolution.calendar"); object = G_OBJECT (ACTION (TASK_PREVIEW)); - key = "/apps/evolution/calendar/display/show_task_preview"; - gconf_bridge_bind_property (bridge, key, object, "active"); + g_settings_bind (settings, "show-task-preview", object, "active", G_SETTINGS_BIND_DEFAULT); object = G_OBJECT (ACTION (TASK_VIEW_VERTICAL)); - key = "/apps/evolution/calendar/display/task_layout"; - gconf_bridge_bind_property (bridge, key, object, "current-value"); + g_settings_bind (settings, "task-layout", "current-value", G_SETTINGS_BIND_DEFAULT); + + g_object_unref (G_OBJECT (settings)); /* Fine tuning. */ diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c index 4cf3cb78a5..ad572f1421 100644 --- a/modules/mail/e-mail-shell-backend.c +++ b/modules/mail/e-mail-shell-backend.c @@ -234,6 +234,8 @@ mail_shell_backend_mail_sync (EMailShellBackend *mail_shell_backend) { EShell *shell; EShellBackend *shell_backend; + EMailBackend *backend; + EMailSession *session; shell_backend = E_SHELL_BACKEND (mail_shell_backend); shell = e_shell_backend_get_shell (shell_backend); @@ -246,6 +248,9 @@ mail_shell_backend_mail_sync (EMailShellBackend *mail_shell_backend) if (mail_shell_backend->priv->mail_sync_in_progress) goto exit; + backend = E_MAIL_BACKEND (mail_shell_backend); + session = e_mail_backend_get_session (backend); + e_mail_store_foreach ( E_MAIL_BACKEND (mail_shell_backend), (GFunc) mail_shell_backend_sync_store_cb, @@ -441,6 +446,7 @@ mail_shell_backend_start (EShellBackend *shell_backend) EShell *shell; EShellSettings *shell_settings; EMailBackend *backend; + EMailSession *session; gboolean enable_search_folders; const gchar *data_dir; diff --git a/modules/mail/em-account-prefs.c b/modules/mail/em-account-prefs.c index 0dc93bea1f..f4a0a740d5 100644 --- a/modules/mail/em-account-prefs.c +++ b/modules/mail/em-account-prefs.c @@ -98,6 +98,7 @@ account_prefs_enable_account_cb (EAccountTreeView *tree_view, EMAccountPrefs *prefs) { EAccount *account; + EMailSession *session; account = e_account_tree_view_get_selected (tree_view); if (!account) { @@ -115,6 +116,7 @@ account_prefs_disable_account_cb (EAccountTreeView *tree_view, EMAccountPrefs *prefs) { EAccountList *account_list; + EMailSession *session; EAccount *account; gpointer parent; gint response; @@ -320,6 +322,7 @@ account_prefs_delete_account (EAccountManager *manager) EMAccountPrefsPrivate *priv; EAccountTreeView *tree_view; EAccountList *account_list; + EMailSession *session; EAccount *account; gboolean has_proxies; gpointer parent; diff --git a/modules/network-manager/Makefile.am b/modules/network-manager/Makefile.am index 81b61ac864..2d87b22acf 100644 --- a/modules/network-manager/Makefile.am +++ b/modules/network-manager/Makefile.am @@ -6,6 +6,7 @@ libevolution_module_network_manager_la_CPPFLAGS = \ -DG_LOG_DOMAIN=\"evolution-network-manager\" \ $(EVOLUTION_DATA_SERVER_CFLAGS) \ $(GNOME_PLATFORM_CFLAGS) \ + $(SHELL_CFLAGS) \ $(NM_CFLAGS) libevolution_module_network_manager_la_SOURCES = \ |