From 7950d6a0c6efd6c4d48afd99c138f38952bdd1bb Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 21 Apr 2012 14:52:23 -0400 Subject: Adapt to libedataserver[ui] changes. --- modules/calendar/e-cal-attachment-handler.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'modules/calendar/e-cal-attachment-handler.c') 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); } -- cgit v1.2.3