aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-cal-attachment-handler.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/calendar/e-cal-attachment-handler.c')
-rw-r--r--modules/calendar/e-cal-attachment-handler.c14
1 files changed, 9 insertions, 5 deletions
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);
}