diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-04-22 02:52:23 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-04-22 05:07:15 +0800 |
commit | 7950d6a0c6efd6c4d48afd99c138f38952bdd1bb (patch) | |
tree | 3a8fd7957dd29441120d2db18ccb1cc23f5935f2 /modules | |
parent | 397b15ff4aa5afd1d5c7e0a093a33616624401cf (diff) | |
download | gsoc2013-evolution-7950d6a0c6efd6c4d48afd99c138f38952bdd1bb.tar.gz gsoc2013-evolution-7950d6a0c6efd6c4d48afd99c138f38952bdd1bb.tar.zst gsoc2013-evolution-7950d6a0c6efd6c4d48afd99c138f38952bdd1bb.zip |
Adapt to libedataserver[ui] changes.
Diffstat (limited to 'modules')
20 files changed, 212 insertions, 124 deletions
diff --git a/modules/addressbook/addressbook-config.c b/modules/addressbook/addressbook-config.c index beccf33856..7e09c1b5da 100644 --- a/modules/addressbook/addressbook-config.c +++ b/modules/addressbook/addressbook-config.c @@ -482,7 +482,7 @@ eabc_type_changed (GtkComboBox *dropdown, } e_source_set_property(sdialog->source, "auth-domain", "Groupwise"); - tmp = g_strconcat (";", e_source_peek_name(sdialog->source), NULL); + tmp = g_strconcat (";", e_source_get_display_name(sdialog->source), NULL); e_source_set_relative_uri (sdialog->source, tmp); g_free (tmp); #ifdef HAVE_LDAP @@ -499,7 +499,7 @@ eabc_type_changed (GtkComboBox *dropdown, e_source_set_property(sdialog->source, "limit", "100"); #endif } else { - e_source_set_relative_uri (sdialog->source, e_source_peek_uid (sdialog->source)); + e_source_set_relative_uri (sdialog->source, e_source_get_uid (sdialog->source)); } e_config_target_changed ((EConfig *) sdialog->config, E_CONFIG_TARGET_CHANGED_REBUILD); @@ -573,7 +573,7 @@ name_changed_cb (GtkWidget *w, text = gtk_entry_get_text (GTK_ENTRY (sdialog->display_name)); stripped_name = g_strstrip (g_strdup (text)); - changed = g_strcmp0 (stripped_name, e_source_peek_name (sdialog->source)) != 0; + changed = g_strcmp0 (stripped_name, e_source_get_display_name (sdialog->source)) != 0; e_source_set_name (sdialog->source, stripped_name); g_free (stripped_name); @@ -607,7 +607,7 @@ eabc_general_name (EConfig *ec, g_signal_connect ( sdialog->display_name, "changed", G_CALLBACK (name_changed_cb), sdialog); - gtk_entry_set_text ((GtkEntry *) sdialog->display_name, e_source_peek_name (sdialog->source)); + gtk_entry_set_text ((GtkEntry *) sdialog->display_name, e_source_get_display_name (sdialog->source)); /* Hardcoded: groupwise can't edit the name (or anything else) */ if (sdialog->original_source) { @@ -1204,7 +1204,7 @@ eabc_check_complete (EConfig *ec, d(printf("check complete, pageid = '%s'\n", pageid?pageid:"<all>")); /* have name, and unique */ - tmp = e_source_peek_name (sdialog->source); + tmp = e_source_get_display_name (sdialog->source); valid = tmp && tmp[0] != 0 && ((source = e_source_group_peek_source_by_name (sdialog->source_group, tmp)) == NULL || source == sdialog->original_source); @@ -1349,7 +1349,7 @@ addressbook_config_edit_source (GtkWidget *parent, /* forces initial validation */ if (!sdialog->original_source) { - e_source_set_relative_uri (sdialog->source, e_source_peek_uid (sdialog->source)); + e_source_set_relative_uri (sdialog->source, e_source_get_uid (sdialog->source)); e_config_target_changed ((EConfig *) ec, E_CONFIG_TARGET_CHANGED_STATE); } diff --git a/modules/addressbook/e-book-shell-sidebar.c b/modules/addressbook/e-book-shell-sidebar.c index af28f8bbb1..d47dbd75f9 100644 --- a/modules/addressbook/e-book-shell-sidebar.c +++ b/modules/addressbook/e-book-shell-sidebar.c @@ -151,25 +151,30 @@ book_shell_sidebar_check_state (EShellSidebar *shell_sidebar) ESource *source; gboolean can_delete = FALSE; gboolean is_system = FALSE; + gboolean has_primary_source = FALSE; guint32 state = 0; book_shell_sidebar = E_BOOK_SHELL_SIDEBAR (shell_sidebar); selector = e_book_shell_sidebar_get_selector (book_shell_sidebar); - source = e_source_selector_get_primary_selection (selector); + source = e_source_selector_ref_primary_selection (selector); if (source != NULL) { const gchar *uri; const gchar *delete; + has_primary_source = TRUE; + uri = e_source_peek_relative_uri (source); is_system = (uri == NULL || strcmp (uri, "system") == 0); can_delete = !is_system; delete = e_source_get_property (source, "delete"); can_delete &= (delete == NULL || strcmp (delete, "no") != 0); + + g_object_unref (source); } - if (source != NULL) + if (has_primary_source) state |= E_BOOK_SHELL_SIDEBAR_HAS_PRIMARY_SOURCE; if (can_delete) state |= E_BOOK_SHELL_SIDEBAR_CAN_DELETE_PRIMARY_SOURCE; diff --git a/modules/addressbook/e-book-shell-view-actions.c b/modules/addressbook/e-book-shell-view-actions.c index 33c382bc4f..50834113c9 100644 --- a/modules/addressbook/e-book-shell-view-actions.c +++ b/modules/addressbook/e-book-shell-view-actions.c @@ -73,20 +73,23 @@ action_address_book_delete_cb (GtkAction *action, book_shell_sidebar = book_shell_view->priv->book_shell_sidebar; selector = e_book_shell_sidebar_get_selector (book_shell_sidebar); - source = e_source_selector_get_primary_selection (selector); + source = e_source_selector_ref_primary_selection (selector); g_return_if_fail (source != NULL); response = e_alert_run_dialog_for_args ( GTK_WINDOW (shell_window), "addressbook:ask-delete-addressbook", - e_source_peek_name (source), NULL); + e_source_get_display_name (source), NULL); - if (response != GTK_RESPONSE_YES) + if (response != GTK_RESPONSE_YES) { + g_object_unref (source); return; + } book = e_book_client_new (source, &error); if (error != NULL) { g_warning ("Error removing addressbook: %s", error->message); + g_object_unref (source); g_error_free (error); return; } @@ -95,6 +98,7 @@ action_address_book_delete_cb (GtkAction *action, e_alert_run_dialog_for_args ( GTK_WINDOW (shell_window), "addressbook:remove-addressbook", NULL); + g_object_unref (source); g_object_unref (book); return; } @@ -107,6 +111,7 @@ action_address_book_delete_cb (GtkAction *action, e_source_list_sync (source_list, NULL); + g_object_unref (source); g_object_unref (book); } @@ -187,10 +192,10 @@ action_address_book_properties_cb (GtkAction *action, book_shell_sidebar = book_shell_view->priv->book_shell_sidebar; selector = e_book_shell_sidebar_get_selector (book_shell_sidebar); - source = e_source_selector_get_primary_selection (selector); + source = e_source_selector_ref_primary_selection (selector); g_return_if_fail (source != NULL); - uid = e_source_peek_uid (source); + uid = e_source_get_uid (source); uid_to_editor = book_shell_view->priv->uid_to_editor; closure = g_hash_table_lookup (uid_to_editor, uid); @@ -213,6 +218,8 @@ action_address_book_properties_cb (GtkAction *action, } gtk_window_present (GTK_WINDOW (closure->editor)); + + g_object_unref (source); } #ifdef WITH_CONTACT_MAPS diff --git a/modules/addressbook/e-book-shell-view-private.c b/modules/addressbook/e-book-shell-view-private.c index 3c3b1a9a8f..62793f3e50 100644 --- a/modules/addressbook/e-book-shell-view-private.c +++ b/modules/addressbook/e-book-shell-view-private.c @@ -271,12 +271,12 @@ book_shell_view_activate_selected_source (EBookShellView *book_shell_view, shell_window = e_shell_view_get_shell_window (shell_view); book_shell_content = book_shell_view->priv->book_shell_content; - source = e_source_selector_get_primary_selection (selector); + source = e_source_selector_ref_primary_selection (selector); if (source == NULL) return; - uid = e_source_peek_uid (source); + uid = e_source_get_uid (source); hash_table = book_shell_view->priv->uid_to_view; widget = g_hash_table_lookup (hash_table, uid); @@ -339,7 +339,8 @@ book_shell_view_activate_selected_source (EBookShellView *book_shell_view, model = e_addressbook_view_get_model (view); /* XXX No way to cancel this? */ - e_client_utils_open_new (source, E_CLIENT_SOURCE_TYPE_CONTACTS, FALSE, NULL, + e_client_utils_open_new ( + source, E_CLIENT_SOURCE_TYPE_CONTACTS, FALSE, NULL, e_client_utils_authenticate_handler, GTK_WINDOW (shell_window), book_shell_view_loaded_cb, g_object_ref (view)); @@ -380,6 +381,8 @@ book_shell_view_activate_selected_source (EBookShellView *book_shell_view, e_addressbook_model_force_folder_bar_message (model); selection_change (book_shell_view, view); + + g_object_unref (source); } static gboolean diff --git a/modules/calendar/e-cal-attachment-handler.c b/modules/calendar/e-cal-attachment-handler.c index 3b18f426aa..403345d8ec 100644 --- a/modules/calendar/e-cal-attachment-handler.c +++ b/modules/calendar/e-cal-attachment-handler.c @@ -183,7 +183,7 @@ attachment_handler_import_event (GObject *source_object, g_warn_if_fail (client == NULL); g_warning ( "%s: Failed to open '%s': %s", - G_STRFUNC, e_source_peek_name (source), + G_STRFUNC, e_source_get_display_name (source), error->message); g_object_unref (attachment); g_error_free (error); @@ -239,7 +239,7 @@ attachment_handler_import_todo (GObject *source_object, g_warn_if_fail (client == NULL); g_warning ( "%s: Failed to open '%s': %s", - G_STRFUNC, e_source_peek_name (source), + G_STRFUNC, e_source_get_display_name (source), error->message); g_object_unref (attachment); g_error_free (error); @@ -354,18 +354,20 @@ attachment_handler_run_dialog (GtkWindow *parent, if (gtk_dialog_run (GTK_DIALOG (dialog)) != GTK_RESPONSE_OK) goto exit; - source = e_source_selector_get_primary_selection (selector); + source = e_source_selector_ref_primary_selection (selector); if (source == NULL) goto exit; switch (source_type) { case E_CAL_CLIENT_SOURCE_TYPE_EVENTS: - e_client_utils_open_new (source, E_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL, + e_client_utils_open_new ( + source, E_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL, e_client_utils_authenticate_handler, NULL, attachment_handler_import_event, g_object_ref (attachment)); break; case E_CAL_CLIENT_SOURCE_TYPE_TASKS: - e_client_utils_open_new (source, E_CLIENT_SOURCE_TYPE_TASKS, FALSE, NULL, + e_client_utils_open_new ( + source, E_CLIENT_SOURCE_TYPE_TASKS, FALSE, NULL, e_client_utils_authenticate_handler, NULL, attachment_handler_import_todo, g_object_ref (attachment)); break; @@ -373,6 +375,8 @@ attachment_handler_run_dialog (GtkWindow *parent, break; } + g_object_unref (source); + exit: gtk_widget_destroy (dialog); } diff --git a/modules/calendar/e-cal-shell-backend.c b/modules/calendar/e-cal-shell-backend.c index d538e9bd74..e73eca5d42 100644 --- a/modules/calendar/e-cal-shell-backend.c +++ b/modules/calendar/e-cal-shell-backend.c @@ -163,7 +163,7 @@ cal_shell_backend_ensure_sources (EShellBackend *shell_backend) if (primary == NULL && selected == NULL) { const gchar *uid; - uid = e_source_peek_uid (source); + uid = e_source_get_uid (source); selected = g_slist_prepend (NULL, g_strdup (uid)); e_shell_settings_set_string ( @@ -260,7 +260,7 @@ cal_shell_backend_new_event (ESource *source, g_warn_if_fail (client == NULL); g_warning ( "%s: Failed to open '%s': %s", - G_STRFUNC, e_source_peek_name (source), + G_STRFUNC, e_source_get_display_name (source), error->message); g_error_free (error); return; @@ -641,7 +641,7 @@ cal_shell_backend_handle_uri_cb (EShellBackend *shell_backend, if (error != NULL) { g_warning ( "%s: Failed to create/open client '%s': %s", - G_STRFUNC, e_source_peek_name (source), + G_STRFUNC, e_source_get_display_name (source), error->message); g_object_unref (source_list); g_error_free (error); diff --git a/modules/calendar/e-cal-shell-migrate.c b/modules/calendar/e-cal-shell-migrate.c index dd76049171..7eb69edb85 100644 --- a/modules/calendar/e-cal-shell-migrate.c +++ b/modules/calendar/e-cal-shell-migrate.c @@ -176,9 +176,9 @@ create_calendar_sources (EShellBackend *shell_backend, e_shell_settings_set_string ( shell_settings, "cal-primary-calendar", - e_source_peek_uid (source)); + e_source_get_uid (source)); - link.data = (gpointer) e_source_peek_uid (source); + link.data = (gpointer) e_source_get_uid (source); link.next = NULL; e_cal_shell_backend_set_selected_calendars ( diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c index 633942df98..468db23c40 100644 --- a/modules/calendar/e-cal-shell-sidebar.c +++ b/modules/calendar/e-cal-shell-sidebar.c @@ -131,7 +131,7 @@ cal_shell_sidebar_backend_died_cb (ECalShellSidebar *cal_shell_sidebar, shell_content = e_shell_view_get_shell_content (shell_view); source = e_client_get_source (E_CLIENT (client)); - uid = e_source_peek_uid (source); + uid = e_source_get_uid (source); g_object_ref (source); @@ -167,7 +167,7 @@ cal_shell_sidebar_backend_error_cb (ECalShellSidebar *cal_shell_sidebar, E_ALERT_SINK (shell_content), "calendar:backend-error", e_source_group_peek_name (source_group), - e_source_peek_name (source), message, NULL); + e_source_get_display_name (source), message, NULL); } static void @@ -281,7 +281,7 @@ cal_shell_sidebar_client_opened_cb (GObject *source_object, case E_CLIENT_ERROR_BUSY: g_warning ( "%s: Cannot open '%s', it's busy (%s)", - G_STRFUNC, e_source_peek_name (source), + G_STRFUNC, e_source_get_display_name (source), error->message); g_clear_error (&error); return; @@ -422,7 +422,7 @@ cal_shell_sidebar_set_default (ECalShellSidebar *cal_shell_sidebar, priv->loading_default_client = NULL; } - uid = e_source_peek_uid (source); + uid = e_source_get_uid (source); client = g_hash_table_lookup (priv->client_table, uid); /* If we already have an open connection for @@ -456,20 +456,22 @@ cal_shell_sidebar_row_changed_cb (ECalShellSidebar *cal_shell_sidebar, ESource *source; selector = e_cal_shell_sidebar_get_selector (cal_shell_sidebar); - source = e_source_selector_get_source_by_path (selector, tree_path); + source = e_source_selector_ref_source_by_path (selector, tree_path); /* XXX This signal gets emitted a lot while the model is being * rebuilt, during which time we won't get a valid ESource. * ESourceSelector should probably block this signal while * rebuilding the model, but we'll be forgiving and not * emit a warning. */ - if (!E_IS_SOURCE (source)) + if (source == NULL) return; if (e_source_selector_source_is_selected (selector, source)) e_cal_shell_sidebar_add_source (cal_shell_sidebar, source); else e_cal_shell_sidebar_remove_source (cal_shell_sidebar, source); + + g_object_unref (source); } static void @@ -494,7 +496,7 @@ cal_shell_sidebar_selection_changed_cb (ECalShellSidebar *cal_shell_sidebar, for (iter = list; iter != NULL; iter = iter->next) { ESource *source = iter->data; - iter->data = (gpointer) e_source_peek_uid (source); + iter->data = (gpointer) e_source_get_uid (source); g_object_unref (source); } @@ -510,11 +512,13 @@ cal_shell_sidebar_primary_selection_changed_cb (ECalShellSidebar *cal_shell_side { ESource *source; - source = e_source_selector_get_primary_selection (selector); + source = e_source_selector_ref_primary_selection (selector); if (source == NULL) return; cal_shell_sidebar_set_default (cal_shell_sidebar, source); + + g_object_unref (source); } static void @@ -816,17 +820,20 @@ cal_shell_sidebar_check_state (EShellSidebar *shell_sidebar) gboolean can_delete = FALSE; gboolean is_system = FALSE; gboolean refresh_supported = FALSE; + gboolean has_primary_source = FALSE; guint32 state = 0; cal_shell_sidebar = E_CAL_SHELL_SIDEBAR (shell_sidebar); selector = e_cal_shell_sidebar_get_selector (cal_shell_sidebar); - source = e_source_selector_get_primary_selection (selector); + source = e_source_selector_ref_primary_selection (selector); if (source != NULL) { ECalClient *client; const gchar *uri; const gchar *delete; + has_primary_source = TRUE; + uri = e_source_peek_relative_uri (source); is_system = (uri == NULL || strcmp (uri, "system") == 0); @@ -836,12 +843,14 @@ cal_shell_sidebar_check_state (EShellSidebar *shell_sidebar) client = g_hash_table_lookup ( cal_shell_sidebar->priv->client_table, - e_source_peek_uid (source)); + e_source_get_uid (source)); refresh_supported = client && e_client_check_refresh_supported (E_CLIENT (client)); + + g_object_unref (source); } - if (source != NULL) + if (has_primary_source) state |= E_CAL_SHELL_SIDEBAR_HAS_PRIMARY_SOURCE; if (can_delete) state |= E_CAL_SHELL_SIDEBAR_CAN_DELETE_PRIMARY_SOURCE; @@ -870,8 +879,7 @@ cal_shell_sidebar_client_removed (ECalShellSidebar *cal_shell_sidebar, NULL, NULL, cal_shell_sidebar); source = e_client_get_source (E_CLIENT (client)); - uid = e_source_peek_uid (source); - g_return_if_fail (uid != NULL); + uid = e_source_get_uid (source); g_hash_table_remove (client_table, uid); e_source_selector_unselect_source (selector, source); @@ -1069,7 +1077,7 @@ e_cal_shell_sidebar_add_source (ECalShellSidebar *cal_shell_sidebar, default_client = cal_shell_sidebar->priv->default_client; selector = e_cal_shell_sidebar_get_selector (cal_shell_sidebar); - uid = e_source_peek_uid (source); + uid = e_source_get_uid (source); client = g_hash_table_lookup (client_table, uid); if (client != NULL) @@ -1080,7 +1088,7 @@ e_cal_shell_sidebar_add_source (ECalShellSidebar *cal_shell_sidebar, const gchar *default_uid; default_source = e_client_get_source (E_CLIENT (default_client)); - default_uid = e_source_peek_uid (default_source); + default_uid = e_source_get_uid (default_source); if (g_strcmp0 (uid, default_uid) == 0) client = g_object_ref (default_client); @@ -1146,7 +1154,7 @@ e_cal_shell_sidebar_remove_source (ECalShellSidebar *cal_shell_sidebar, client_table = cal_shell_sidebar->priv->client_table; - uid = e_source_peek_uid (source); + uid = e_source_get_uid (source); client = g_hash_table_lookup (client_table, uid); if (client == NULL) diff --git a/modules/calendar/e-cal-shell-view-actions.c b/modules/calendar/e-cal-shell-view-actions.c index d73feef25e..e5db33837c 100644 --- a/modules/calendar/e-cal-shell-view-actions.c +++ b/modules/calendar/e-cal-shell-view-actions.c @@ -46,12 +46,14 @@ action_calendar_copy_cb (GtkAction *action, cal_shell_sidebar = cal_shell_view->priv->cal_shell_sidebar; selector = e_cal_shell_sidebar_get_selector (cal_shell_sidebar); - source = e_source_selector_get_primary_selection (selector); - g_return_if_fail (E_IS_SOURCE (source)); + source = e_source_selector_ref_primary_selection (selector); + g_return_if_fail (source != NULL); copy_source_dialog ( GTK_WINDOW (shell_window), source, E_CAL_CLIENT_SOURCE_TYPE_EVENTS); + + g_object_unref (source); } static void @@ -88,16 +90,18 @@ action_calendar_delete_cb (GtkAction *action, cal_shell_sidebar = cal_shell_view->priv->cal_shell_sidebar; selector = e_cal_shell_sidebar_get_selector (cal_shell_sidebar); - source = e_source_selector_get_primary_selection (selector); - g_return_if_fail (E_IS_SOURCE (source)); + source = e_source_selector_ref_primary_selection (selector); + g_return_if_fail (source != NULL); /* Ask for confirmation. */ response = e_alert_run_dialog_for_args ( GTK_WINDOW (shell_window), "calendar:prompt-delete-calendar", - e_source_peek_name (source), NULL); - if (response != GTK_RESPONSE_YES) + e_source_get_display_name (source), NULL); + if (response != GTK_RESPONSE_YES) { + g_object_unref (source); return; + } uri = e_source_get_uri (source); client = e_cal_model_get_client_for_uri (model, uri); @@ -114,6 +118,7 @@ action_calendar_delete_cb (GtkAction *action, g_warning ( "%s: Failed to remove client: %s", G_STRFUNC, error->message); + g_object_unref (source); g_error_free (error); return; } @@ -138,6 +143,8 @@ action_calendar_delete_cb (GtkAction *action, G_STRFUNC, error->message); g_error_free (error); } + + g_object_unref (source); } static void @@ -282,13 +289,15 @@ action_calendar_properties_cb (GtkAction *action, cal_shell_sidebar = cal_shell_view->priv->cal_shell_sidebar; selector = e_cal_shell_sidebar_get_selector (cal_shell_sidebar); - source = e_source_selector_get_primary_selection (selector); - g_return_if_fail (E_IS_SOURCE (source)); + source = e_source_selector_ref_primary_selection (selector); + g_return_if_fail (source != NULL); /* XXX Does this -really- need a source group parameter? */ calendar_setup_edit_calendar ( GTK_WINDOW (shell_window), source, e_source_peek_group (source)); + + g_object_unref (source); } static void @@ -384,15 +393,17 @@ action_calendar_refresh_cb (GtkAction *action, model = e_cal_shell_content_get_model (cal_shell_content); selector = e_cal_shell_sidebar_get_selector (cal_shell_sidebar); - source = e_source_selector_get_primary_selection (selector); - g_return_if_fail (E_IS_SOURCE (source)); + source = e_source_selector_ref_primary_selection (selector); + g_return_if_fail (source != NULL); uri = e_source_get_uri (source); client = e_cal_model_get_client_for_uri (model, uri); g_free (uri); - if (client == NULL) + if (client == NULL) { + g_object_unref (source); return; + } g_return_if_fail (e_client_check_refresh_supported (E_CLIENT (client))); @@ -401,10 +412,12 @@ action_calendar_refresh_cb (GtkAction *action, if (error != NULL) { g_warning ( "%s: Failed to refresh '%s', %s", - G_STRFUNC, e_source_peek_name (source), + G_STRFUNC, e_source_get_display_name (source), error->message); g_error_free (error); } + + g_object_unref (source); } static void @@ -452,10 +465,12 @@ action_calendar_select_one_cb (GtkAction *action, cal_shell_sidebar = cal_shell_view->priv->cal_shell_sidebar; selector = e_cal_shell_sidebar_get_selector (cal_shell_sidebar); - primary = e_source_selector_get_primary_selection (selector); + primary = e_source_selector_ref_primary_selection (selector); g_return_if_fail (primary != NULL); e_source_selector_select_exclusive (selector, primary); + + g_object_unref (primary); } static void diff --git a/modules/calendar/e-memo-shell-backend.c b/modules/calendar/e-memo-shell-backend.c index 2bdd3ef8ed..127473d582 100644 --- a/modules/calendar/e-memo-shell-backend.c +++ b/modules/calendar/e-memo-shell-backend.c @@ -151,7 +151,7 @@ memo_shell_backend_ensure_sources (EShellBackend *shell_backend) if (primary == NULL && selected == NULL) { const gchar *uid; - uid = e_source_peek_uid (source); + uid = e_source_get_uid (source); selected = g_slist_prepend (NULL, g_strdup (uid)); e_shell_settings_set_string ( @@ -193,7 +193,7 @@ memo_shell_backend_new_memo (ESource *source, g_warn_if_fail (client == NULL); g_warning ( "%s: Failed to open '%s': %s", - G_STRFUNC, e_source_peek_name (source), + G_STRFUNC, e_source_get_display_name (source), error->message); g_error_free (error); return; diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c index 528db0911b..24f7a68d73 100644 --- a/modules/calendar/e-memo-shell-content.c +++ b/modules/calendar/e-memo-shell-content.c @@ -124,7 +124,7 @@ memo_shell_content_table_foreach_cb (gint model_row, const gchar *source_uid; source = e_client_get_source (E_CLIENT (comp_data->client)); - source_uid = e_source_peek_uid (source); + source_uid = e_source_get_uid (source); foreach_data->list = g_slist_prepend ( foreach_data->list, diff --git a/modules/calendar/e-memo-shell-migrate.c b/modules/calendar/e-memo-shell-migrate.c index 64b5263008..efa0716b81 100644 --- a/modules/calendar/e-memo-shell-migrate.c +++ b/modules/calendar/e-memo-shell-migrate.c @@ -134,9 +134,9 @@ create_memo_sources (EShellBackend *shell_backend, e_shell_settings_set_string ( shell_settings, "cal-primary-memo-list", - e_source_peek_uid (source)); + e_source_get_uid (source)); - link.data = (gpointer) e_source_peek_uid (source); + link.data = (gpointer) e_source_get_uid (source); link.next = NULL; e_memo_shell_backend_set_selected_memo_lists ( diff --git a/modules/calendar/e-memo-shell-sidebar.c b/modules/calendar/e-memo-shell-sidebar.c index 4a012c7d6d..7e209c5d24 100644 --- a/modules/calendar/e-memo-shell-sidebar.c +++ b/modules/calendar/e-memo-shell-sidebar.c @@ -127,7 +127,7 @@ memo_shell_sidebar_backend_died_cb (EMemoShellSidebar *memo_shell_sidebar, shell_content = e_shell_view_get_shell_content (shell_view); source = e_client_get_source (E_CLIENT (client)); - uid = e_source_peek_uid (source); + uid = e_source_get_uid (source); g_object_ref (source); @@ -163,7 +163,7 @@ memo_shell_sidebar_backend_error_cb (EMemoShellSidebar *memo_shell_sidebar, E_ALERT_SINK (shell_content), "calendar:backend-error", e_source_group_peek_name (source_group), - e_source_peek_name (source), message, NULL); + e_source_get_display_name (source), message, NULL); } static void @@ -276,7 +276,7 @@ memo_shell_sidebar_client_opened_cb (GObject *source_object, case E_CLIENT_ERROR_BUSY: g_warning ( "%s: Cannot open '%s', it's busy (%s)", - G_STRFUNC, e_source_peek_name (source), + G_STRFUNC, e_source_get_display_name (source), error->message); g_clear_error (&error); return; @@ -417,7 +417,7 @@ memo_shell_sidebar_set_default (EMemoShellSidebar *memo_shell_sidebar, priv->loading_default_client = NULL; } - uid = e_source_peek_uid (source); + uid = e_source_get_uid (source); client = g_hash_table_lookup (priv->client_table, uid); /* If we already have an open connection for @@ -451,20 +451,22 @@ memo_shell_sidebar_row_changed_cb (EMemoShellSidebar *memo_shell_sidebar, ESource *source; selector = e_memo_shell_sidebar_get_selector (memo_shell_sidebar); - source = e_source_selector_get_source_by_path (selector, tree_path); + source = e_source_selector_ref_source_by_path (selector, tree_path); /* XXX This signal gets emitted a lot while the model is being * rebuilt, during which time we won't get a valid ESource. * ESourceSelector should probably block this signal while * rebuilding the model, but we'll be forgiving and not * emit a warning. */ - if (!E_IS_SOURCE (source)) + if (source == NULL) return; if (e_source_selector_source_is_selected (selector, source)) e_memo_shell_sidebar_add_source (memo_shell_sidebar, source); else e_memo_shell_sidebar_remove_source (memo_shell_sidebar, source); + + g_object_unref (source); } static void @@ -489,7 +491,7 @@ memo_shell_sidebar_selection_changed_cb (EMemoShellSidebar *memo_shell_sidebar, for (iter = list; iter != NULL; iter = iter->next) { ESource *source = iter->data; - iter->data = (gpointer) e_source_peek_uid (source); + iter->data = (gpointer) e_source_get_uid (source); g_object_unref (source); } @@ -505,11 +507,13 @@ memo_shell_sidebar_primary_selection_changed_cb (EMemoShellSidebar *memo_shell_s { ESource *source; - source = e_source_selector_get_primary_selection (selector); + source = e_source_selector_ref_primary_selection (selector); if (source == NULL) return; memo_shell_sidebar_set_default (memo_shell_sidebar, source); + + g_object_unref (source); } static void @@ -721,17 +725,20 @@ memo_shell_sidebar_check_state (EShellSidebar *shell_sidebar) gboolean can_delete = FALSE; gboolean is_system = FALSE; gboolean refresh_supported = FALSE; + gboolean has_primary_source = FALSE; guint32 state = 0; memo_shell_sidebar = E_MEMO_SHELL_SIDEBAR (shell_sidebar); selector = e_memo_shell_sidebar_get_selector (memo_shell_sidebar); - source = e_source_selector_get_primary_selection (selector); + source = e_source_selector_ref_primary_selection (selector); if (source != NULL) { ECalClient *client; const gchar *uri; const gchar *delete; + has_primary_source = TRUE; + uri = e_source_peek_relative_uri (source); is_system = (uri == NULL || strcmp (uri, "system") == 0); @@ -741,12 +748,14 @@ memo_shell_sidebar_check_state (EShellSidebar *shell_sidebar) client = g_hash_table_lookup ( memo_shell_sidebar->priv->client_table, - e_source_peek_uid (source)); + e_source_get_uid (source)); refresh_supported = client && e_client_check_refresh_supported (E_CLIENT (client)); + + g_object_unref (source); } - if (source != NULL) + if (has_primary_source) state |= E_MEMO_SHELL_SIDEBAR_HAS_PRIMARY_SOURCE; if (can_delete) state |= E_MEMO_SHELL_SIDEBAR_CAN_DELETE_PRIMARY_SOURCE; @@ -775,8 +784,7 @@ memo_shell_sidebar_client_removed (EMemoShellSidebar *memo_shell_sidebar, NULL, NULL, memo_shell_sidebar); source = e_client_get_source (E_CLIENT (client)); - uid = e_source_peek_uid (source); - g_return_if_fail (uid != NULL); + uid = e_source_get_uid (source); g_hash_table_remove (client_table, uid); e_source_selector_unselect_source (selector, source); @@ -956,7 +964,7 @@ e_memo_shell_sidebar_add_source (EMemoShellSidebar *memo_shell_sidebar, default_client = memo_shell_sidebar->priv->default_client; selector = e_memo_shell_sidebar_get_selector (memo_shell_sidebar); - uid = e_source_peek_uid (source); + uid = e_source_get_uid (source); client = g_hash_table_lookup (client_table, uid); if (client != NULL) @@ -967,7 +975,7 @@ e_memo_shell_sidebar_add_source (EMemoShellSidebar *memo_shell_sidebar, const gchar *default_uid; default_source = e_client_get_source (E_CLIENT (default_client)); - default_uid = e_source_peek_uid (default_source); + default_uid = e_source_get_uid (default_source); if (g_strcmp0 (uid, default_uid) == 0) client = g_object_ref (default_client); @@ -1033,7 +1041,7 @@ e_memo_shell_sidebar_remove_source (EMemoShellSidebar *memo_shell_sidebar, client_table = memo_shell_sidebar->priv->client_table; - uid = e_source_peek_uid (source); + uid = e_source_get_uid (source); client = g_hash_table_lookup (client_table, uid); if (client == NULL) diff --git a/modules/calendar/e-memo-shell-view-actions.c b/modules/calendar/e-memo-shell-view-actions.c index 5a99624a95..4c2025910a 100644 --- a/modules/calendar/e-memo-shell-view-actions.c +++ b/modules/calendar/e-memo-shell-view-actions.c @@ -116,12 +116,14 @@ action_memo_list_copy_cb (GtkAction *action, memo_shell_sidebar = memo_shell_view->priv->memo_shell_sidebar; selector = e_memo_shell_sidebar_get_selector (memo_shell_sidebar); - source = e_source_selector_get_primary_selection (selector); - g_return_if_fail (E_IS_SOURCE (source)); + source = e_source_selector_ref_primary_selection (selector); + g_return_if_fail (source != NULL); copy_source_dialog ( GTK_WINDOW (shell_window), source, E_CAL_CLIENT_SOURCE_TYPE_MEMOS); + + g_object_unref (source); } static void @@ -156,16 +158,18 @@ action_memo_list_delete_cb (GtkAction *action, memo_shell_sidebar = memo_shell_view->priv->memo_shell_sidebar; selector = e_memo_shell_sidebar_get_selector (memo_shell_sidebar); - source = e_source_selector_get_primary_selection (selector); - g_return_if_fail (E_IS_SOURCE (source)); + source = e_source_selector_ref_primary_selection (selector); + g_return_if_fail (source != NULL); /* Ask for confirmation. */ response = e_alert_run_dialog_for_args ( GTK_WINDOW (shell_window), "calendar:prompt-delete-memo-list", - e_source_peek_name (source), NULL); - if (response != GTK_RESPONSE_YES) + e_source_get_display_name (source), NULL); + if (response != GTK_RESPONSE_YES) { + g_object_unref (source); return; + } uri = e_source_get_uri (source); client = e_cal_model_get_client_for_uri (model, uri); @@ -182,6 +186,7 @@ action_memo_list_delete_cb (GtkAction *action, g_warning ( "%s: Failed to remove client: %s", G_STRFUNC, error->message); + g_object_unref (source); g_error_free (error); return; } @@ -203,6 +208,8 @@ action_memo_list_delete_cb (GtkAction *action, G_STRFUNC, error->message); g_error_free (error); } + + g_object_unref (source); } static void @@ -262,10 +269,12 @@ action_memo_list_properties_cb (GtkAction *action, memo_shell_sidebar = memo_shell_view->priv->memo_shell_sidebar; selector = e_memo_shell_sidebar_get_selector (memo_shell_sidebar); - source = e_source_selector_get_primary_selection (selector); - g_return_if_fail (E_IS_SOURCE (source)); + source = e_source_selector_ref_primary_selection (selector); + g_return_if_fail (source != NULL); calendar_setup_edit_memo_list (GTK_WINDOW (shell_window), source); + + g_object_unref (source); } static void @@ -287,15 +296,17 @@ action_memo_list_refresh_cb (GtkAction *action, model = e_memo_shell_content_get_memo_model (memo_shell_content); selector = e_memo_shell_sidebar_get_selector (memo_shell_sidebar); - source = e_source_selector_get_primary_selection (selector); - g_return_if_fail (E_IS_SOURCE (source)); + source = e_source_selector_ref_primary_selection (selector); + g_return_if_fail (source != NULL); uri = e_source_get_uri (source); client = e_cal_model_get_client_for_uri (model, uri); g_free (uri); - if (client == NULL) + if (client == NULL) { + g_object_unref (source); return; + } g_return_if_fail (e_client_check_refresh_supported (E_CLIENT (client))); @@ -304,10 +315,12 @@ action_memo_list_refresh_cb (GtkAction *action, if (error != NULL) { g_warning ( "%s: Failed to refresh '%s', %s", - G_STRFUNC, e_source_peek_name (source), + G_STRFUNC, e_source_get_display_name (source), error->message); g_error_free (error); } + + g_object_unref (source); } static void @@ -334,10 +347,12 @@ action_memo_list_select_one_cb (GtkAction *action, memo_shell_sidebar = memo_shell_view->priv->memo_shell_sidebar; selector = e_memo_shell_sidebar_get_selector (memo_shell_sidebar); - primary = e_source_selector_get_primary_selection (selector); + primary = e_source_selector_ref_primary_selection (selector); g_return_if_fail (primary != NULL); e_source_selector_select_exclusive (selector, primary); + + g_object_unref (primary); } static void diff --git a/modules/calendar/e-task-shell-backend.c b/modules/calendar/e-task-shell-backend.c index 1bb7ca338f..786e9c6910 100644 --- a/modules/calendar/e-task-shell-backend.c +++ b/modules/calendar/e-task-shell-backend.c @@ -147,7 +147,7 @@ task_shell_backend_ensure_sources (EShellBackend *shell_backend) if (primary == NULL && selected == NULL) { const gchar *uid; - uid = e_source_peek_uid (source); + uid = e_source_get_uid (source); selected = g_slist_prepend (NULL, g_strdup (uid)); e_shell_settings_set_string ( @@ -189,7 +189,7 @@ task_shell_backend_new_task (ESource *source, g_warn_if_fail (client == NULL); g_warning ( "%s: Failed to open '%s': %s", - G_STRFUNC, e_source_peek_name (source), + G_STRFUNC, e_source_get_display_name (source), error->message); g_error_free (error); return; diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c index 67b1e368b3..0ebff795bf 100644 --- a/modules/calendar/e-task-shell-content.c +++ b/modules/calendar/e-task-shell-content.c @@ -124,7 +124,7 @@ task_shell_content_table_foreach_cb (gint model_row, const gchar *source_uid; source = e_client_get_source (E_CLIENT (comp_data->client)); - source_uid = e_source_peek_uid (source); + source_uid = e_source_get_uid (source); foreach_data->list = g_slist_prepend ( foreach_data->list, diff --git a/modules/calendar/e-task-shell-migrate.c b/modules/calendar/e-task-shell-migrate.c index 60499d673f..c24f52d97c 100644 --- a/modules/calendar/e-task-shell-migrate.c +++ b/modules/calendar/e-task-shell-migrate.c @@ -143,9 +143,9 @@ create_task_sources (EShellBackend *shell_backend, e_shell_settings_set_string ( shell_settings, "cal-primary-task-list", - e_source_peek_uid (source)); + e_source_get_uid (source)); - link.data = (gpointer) e_source_peek_uid (source); + link.data = (gpointer) e_source_get_uid (source); link.next = NULL; e_task_shell_backend_set_selected_task_lists ( diff --git a/modules/calendar/e-task-shell-sidebar.c b/modules/calendar/e-task-shell-sidebar.c index a2ceb77bbf..4667ae4ed6 100644 --- a/modules/calendar/e-task-shell-sidebar.c +++ b/modules/calendar/e-task-shell-sidebar.c @@ -127,7 +127,7 @@ task_shell_sidebar_backend_died_cb (ETaskShellSidebar *task_shell_sidebar, shell_content = e_shell_view_get_shell_content (shell_view); source = e_client_get_source (E_CLIENT (client)); - uid = e_source_peek_uid (source); + uid = e_source_get_uid (source); g_object_ref (source); @@ -163,7 +163,7 @@ task_shell_sidebar_backend_error_cb (ETaskShellSidebar *task_shell_sidebar, E_ALERT_SINK (shell_content), "calendar:backend-error", e_source_group_peek_name (source_group), - e_source_peek_name (source), message, NULL); + e_source_get_display_name (source), message, NULL); } static void @@ -276,7 +276,7 @@ task_shell_sidebar_client_opened_cb (GObject *source_object, case E_CLIENT_ERROR_BUSY: g_warning ( "%s: Cannot open '%s', it's busy (%s)", - G_STRFUNC, e_source_peek_name (source), + G_STRFUNC, e_source_get_display_name (source), error->message); g_clear_error (&error); return; @@ -417,7 +417,7 @@ task_shell_sidebar_set_default (ETaskShellSidebar *task_shell_sidebar, priv->loading_default_client = NULL; } - uid = e_source_peek_uid (source); + uid = e_source_get_uid (source); client = g_hash_table_lookup (priv->client_table, uid); /* If we already have an open connection for @@ -451,20 +451,22 @@ task_shell_sidebar_row_changed_cb (ETaskShellSidebar *task_shell_sidebar, ESource *source; selector = e_task_shell_sidebar_get_selector (task_shell_sidebar); - source = e_source_selector_get_source_by_path (selector, tree_path); + source = e_source_selector_ref_source_by_path (selector, tree_path); /* XXX This signal gets emitted a lot while the model is being * rebuilt, during which time we won't get a valid ESource. * ESourceSelector should probably block this signal while * rebuilding the model, but we'll be forgiving and not * emit a warning. */ - if (!E_IS_SOURCE (source)) + if (source == NULL) return; if (e_source_selector_source_is_selected (selector, source)) e_task_shell_sidebar_add_source (task_shell_sidebar, source); else e_task_shell_sidebar_remove_source (task_shell_sidebar, source); + + g_object_unref (source); } static void @@ -489,7 +491,7 @@ task_shell_sidebar_selection_changed_cb (ETaskShellSidebar *task_shell_sidebar, for (iter = list; iter != NULL; iter = iter->next) { ESource *source = iter->data; - iter->data = (gpointer) e_source_peek_uid (source); + iter->data = (gpointer) e_source_get_uid (source); g_object_unref (source); } @@ -505,11 +507,13 @@ task_shell_sidebar_primary_selection_changed_cb (ETaskShellSidebar *task_shell_s { ESource *source; - source = e_source_selector_get_primary_selection (selector); + source = e_source_selector_ref_primary_selection (selector); if (source == NULL) return; task_shell_sidebar_set_default (task_shell_sidebar, source); + + g_object_unref (source); } static void @@ -721,17 +725,20 @@ task_shell_sidebar_check_state (EShellSidebar *shell_sidebar) gboolean can_delete = FALSE; gboolean is_system = FALSE; gboolean refresh_supported = FALSE; + gboolean has_primary_source = FALSE; guint32 state = 0; task_shell_sidebar = E_TASK_SHELL_SIDEBAR (shell_sidebar); selector = e_task_shell_sidebar_get_selector (task_shell_sidebar); - source = e_source_selector_get_primary_selection (selector); + source = e_source_selector_ref_primary_selection (selector); if (source != NULL) { ECalClient *client; const gchar *uri; const gchar *delete_prop; + has_primary_source = TRUE; + uri = e_source_peek_relative_uri (source); is_system = (uri == NULL || strcmp (uri, "system") == 0); @@ -742,12 +749,14 @@ task_shell_sidebar_check_state (EShellSidebar *shell_sidebar) client = g_hash_table_lookup ( task_shell_sidebar->priv->client_table, - e_source_peek_uid (source)); + e_source_get_uid (source)); refresh_supported = client && e_client_check_refresh_supported (E_CLIENT (client)); + + g_object_unref (source); } - if (source != NULL) + if (has_primary_source) state |= E_TASK_SHELL_SIDEBAR_HAS_PRIMARY_SOURCE; if (can_delete) state |= E_TASK_SHELL_SIDEBAR_CAN_DELETE_PRIMARY_SOURCE; @@ -776,8 +785,7 @@ task_shell_sidebar_client_removed (ETaskShellSidebar *task_shell_sidebar, NULL, NULL, task_shell_sidebar); source = e_client_get_source (E_CLIENT (client)); - uid = e_source_peek_uid (source); - g_return_if_fail (uid != NULL); + uid = e_source_get_uid (source); g_hash_table_remove (client_table, uid); e_source_selector_unselect_source (selector, source); @@ -957,7 +965,7 @@ e_task_shell_sidebar_add_source (ETaskShellSidebar *task_shell_sidebar, default_client = task_shell_sidebar->priv->default_client; selector = e_task_shell_sidebar_get_selector (task_shell_sidebar); - uid = e_source_peek_uid (source); + uid = e_source_get_uid (source); client = g_hash_table_lookup (client_table, uid); if (client != NULL) @@ -968,7 +976,7 @@ e_task_shell_sidebar_add_source (ETaskShellSidebar *task_shell_sidebar, const gchar *default_uid; default_source = e_client_get_source (E_CLIENT (default_client)); - default_uid = e_source_peek_uid (default_source); + default_uid = e_source_get_uid (default_source); if (g_strcmp0 (uid, default_uid) == 0) client = g_object_ref (default_client); @@ -1034,7 +1042,7 @@ e_task_shell_sidebar_remove_source (ETaskShellSidebar *task_shell_sidebar, client_table = task_shell_sidebar->priv->client_table; - uid = e_source_peek_uid (source); + uid = e_source_get_uid (source); client = g_hash_table_lookup (client_table, uid); if (client == NULL) diff --git a/modules/calendar/e-task-shell-view-actions.c b/modules/calendar/e-task-shell-view-actions.c index 7f4fd08600..badfbf031d 100644 --- a/modules/calendar/e-task-shell-view-actions.c +++ b/modules/calendar/e-task-shell-view-actions.c @@ -139,12 +139,14 @@ action_task_list_copy_cb (GtkAction *action, task_shell_sidebar = task_shell_view->priv->task_shell_sidebar; selector = e_task_shell_sidebar_get_selector (task_shell_sidebar); - source = e_source_selector_get_primary_selection (selector); - g_return_if_fail (E_IS_SOURCE (source)); + source = e_source_selector_ref_primary_selection (selector); + g_return_if_fail (source != NULL); copy_source_dialog ( GTK_WINDOW (shell_window), source, E_CAL_CLIENT_SOURCE_TYPE_TASKS); + + g_object_unref (source); } static void @@ -179,16 +181,18 @@ action_task_list_delete_cb (GtkAction *action, task_shell_sidebar = task_shell_view->priv->task_shell_sidebar; selector = e_task_shell_sidebar_get_selector (task_shell_sidebar); - source = e_source_selector_get_primary_selection (selector); - g_return_if_fail (E_IS_SOURCE (source)); + source = e_source_selector_ref_primary_selection (selector); + g_return_if_fail (source != NULL); /* Ask for confirmation. */ response = e_alert_run_dialog_for_args ( GTK_WINDOW (shell_window), "calendar:prompt-delete-task-list", - e_source_peek_name (source), NULL); - if (response != GTK_RESPONSE_YES) + e_source_get_display_name (source), NULL); + if (response != GTK_RESPONSE_YES) { + g_object_unref (source); return; + } uri = e_source_get_uri (source); client = e_cal_model_get_client_for_uri (model, uri); @@ -205,6 +209,7 @@ action_task_list_delete_cb (GtkAction *action, g_warning ( "%s: Failed to remove client: %s", G_STRFUNC, error->message); + g_object_unref (source); g_error_free (error); return; } @@ -226,6 +231,8 @@ action_task_list_delete_cb (GtkAction *action, G_STRFUNC, error->message); g_error_free (error); } + + g_object_unref (source); } static void @@ -285,10 +292,12 @@ action_task_list_properties_cb (GtkAction *action, task_shell_sidebar = task_shell_view->priv->task_shell_sidebar; selector = e_task_shell_sidebar_get_selector (task_shell_sidebar); - source = e_source_selector_get_primary_selection (selector); - g_return_if_fail (E_IS_SOURCE (source)); + source = e_source_selector_ref_primary_selection (selector); + g_return_if_fail (source != NULL); calendar_setup_edit_task_list (GTK_WINDOW (shell_window), source); + + g_object_unref (source); } static void @@ -310,15 +319,17 @@ action_task_list_refresh_cb (GtkAction *action, model = e_task_shell_content_get_task_model (task_shell_content); selector = e_task_shell_sidebar_get_selector (task_shell_sidebar); - source = e_source_selector_get_primary_selection (selector); - g_return_if_fail (E_IS_SOURCE (source)); + source = e_source_selector_ref_primary_selection (selector); + g_return_if_fail (source != NULL); uri = e_source_get_uri (source); client = e_cal_model_get_client_for_uri (model, uri); g_free (uri); - if (client == NULL) + if (client == NULL) { + g_object_unref (source); return; + } g_return_if_fail (e_client_check_refresh_supported (E_CLIENT (client))); @@ -327,10 +338,12 @@ action_task_list_refresh_cb (GtkAction *action, if (error != NULL) { g_warning ( "%s: Failed to refresh '%s', %s", - G_STRFUNC, e_source_peek_name (source), + G_STRFUNC, e_source_get_display_name (source), error->message); g_error_free (error); } + + g_object_unref (source); } static void @@ -357,10 +370,12 @@ action_task_list_select_one_cb (GtkAction *action, task_shell_sidebar = task_shell_view->priv->task_shell_sidebar; selector = e_task_shell_sidebar_get_selector (task_shell_sidebar); - primary = e_source_selector_get_primary_selection (selector); + primary = e_source_selector_ref_primary_selection (selector); g_return_if_fail (primary != NULL); e_source_selector_select_exclusive (selector, primary); + + g_object_unref (primary); } static void diff --git a/modules/online-accounts/evolution-online-accounts.c b/modules/online-accounts/evolution-online-accounts.c index 8abe52203b..3cdfc423c7 100644 --- a/modules/online-accounts/evolution-online-accounts.c +++ b/modules/online-accounts/evolution-online-accounts.c @@ -245,7 +245,7 @@ online_accounts_search_source_list (EOnlineAccounts *extension, source = E_SOURCE (list_b->data); list_b = g_slist_next (list_b); - uid = e_source_peek_uid (source); + uid = e_source_get_uid (source); property = e_source_get_property (source, GOA_KEY); if (property == NULL) |