aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/dialogs/calendar-setup.c8
-rw-r--r--calendar/gui/dialogs/comp-editor.c8
-rw-r--r--calendar/gui/dialogs/e-send-options-utils.c2
-rw-r--r--calendar/gui/dialogs/event-page.c24
-rw-r--r--calendar/gui/dialogs/memo-page.c15
-rw-r--r--calendar/gui/dialogs/task-page.c13
-rw-r--r--calendar/gui/e-cal-component-preview.c2
-rw-r--r--calendar/gui/e-cal-model.c4
-rw-r--r--calendar/gui/e-calendar-view.c2
-rw-r--r--calendar/gui/e-day-view.c2
-rw-r--r--calendar/gui/e-task-table.c4
11 files changed, 51 insertions, 33 deletions
diff --git a/calendar/gui/dialogs/calendar-setup.c b/calendar/gui/dialogs/calendar-setup.c
index bf77f8c70d..0d0da2244a 100644
--- a/calendar/gui/dialogs/calendar-setup.c
+++ b/calendar/gui/dialogs/calendar-setup.c
@@ -68,7 +68,7 @@ eccp_check_complete (EConfig *ec,
const gchar *tmp;
ESource *source;
- tmp = e_source_peek_name (sdialog->source);
+ tmp = e_source_get_display_name (sdialog->source);
valid = tmp && tmp[0] && ((source = e_source_group_peek_source_by_name (sdialog->source_group, tmp)) == NULL || source == sdialog->original_source);
return valid;
@@ -233,7 +233,7 @@ name_changed (GtkEntry *entry,
name = gtk_entry_get_text (GTK_ENTRY (entry));
- changed = g_strcmp0 (name, e_source_peek_name (source)) != 0;
+ changed = g_strcmp0 (name, e_source_get_display_name (source)) != 0;
e_source_set_name (source, name);
group = e_source_peek_group (source);
@@ -275,7 +275,7 @@ eccp_get_source_name (EConfig *ec,
G_CALLBACK (name_changed), (gpointer) t);
if (source)
- gtk_entry_set_text (GTK_ENTRY (entry), e_source_peek_name (source));
+ gtk_entry_set_text (GTK_ENTRY (entry), e_source_get_display_name (source));
return entry;
}
@@ -440,7 +440,7 @@ eccp_get_source_color (EConfig *ec,
if (!gdk_color_parse (color_spec, &color))
g_warning ("Unknown color \"%s\" in calendar \"%s\"",
- color_spec, e_source_peek_name (sdialog->source));
+ color_spec, e_source_get_display_name (sdialog->source));
label = gtk_label_new_with_mnemonic (_("Colo_r:"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 641666b230..033d80a4a7 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -957,7 +957,7 @@ action_save_cb (GtkAction *action,
e_alert_submit (
E_ALERT_SINK (editor),
"calendar:prompt-read-only-cal-editor",
- e_source_peek_name (
+ e_source_get_display_name (
e_client_get_source (E_CLIENT (priv->cal_client))),
NULL);
return;
@@ -969,7 +969,7 @@ action_save_cb (GtkAction *action,
e_alert_submit (
E_ALERT_SINK (editor),
"calendar:prompt-no-task-assignment-editor",
- e_source_peek_name (
+ e_source_get_display_name (
e_client_get_source (E_CLIENT (priv->cal_client))),
NULL);
return;
@@ -2184,7 +2184,7 @@ prompt_and_save_changes (CompEditor *editor,
e_alert_submit (
E_ALERT_SINK (editor),
"calendar:prompt-read-only-cal-editor",
- e_source_peek_name (
+ e_source_get_display_name (
e_client_get_source (E_CLIENT (priv->cal_client))),
NULL);
/* don't discard changes when selected readonly calendar */
@@ -2197,7 +2197,7 @@ prompt_and_save_changes (CompEditor *editor,
e_alert_submit (
E_ALERT_SINK (editor),
"calendar:prompt-no-task-assignment-editor",
- e_source_peek_name (
+ e_source_get_display_name (
e_client_get_source (E_CLIENT (priv->cal_client))),
NULL);
return FALSE;
diff --git a/calendar/gui/dialogs/e-send-options-utils.c b/calendar/gui/dialogs/e-send-options-utils.c
index 780554812d..e42bbc73d4 100644
--- a/calendar/gui/dialogs/e-send-options-utils.c
+++ b/calendar/gui/dialogs/e-send-options-utils.c
@@ -51,7 +51,7 @@ e_send_options_utils_set_default_data (ESendOptionsDialog *sod,
else
source_list = e_source_list_new_for_gconf (gconf, "/apps/evolution/tasks/sources");
- uid = e_source_peek_uid (source);
+ uid = e_source_get_uid (source);
source = e_source_list_peek_source_by_uid (source_list, uid);
/* priority */
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index 086f3ef494..a3c2b496ea 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -2889,10 +2889,12 @@ event_page_send_options_clicked_cb (EventPage *epage)
if (!priv->sod) {
priv->sod = e_send_options_dialog_new ();
- source = e_source_combo_box_get_active (
+ source = e_source_combo_box_ref_active (
E_SOURCE_COMBO_BOX (priv->source_selector));
- e_send_options_utils_set_default_data (priv->sod, source, "calendar");
+ e_send_options_utils_set_default_data (
+ priv->sod, source, "calendar");
priv->sod->data->initialized = TRUE;
+ g_object_unref (source);
}
if (e_client_check_capability (E_CLIENT (client), CAL_STATIC_CAPABILITY_NO_GEN_OPTIONS)) {
@@ -2939,7 +2941,7 @@ epage_client_opened_cb (GObject *source_object,
NULL, GTK_DIALOG_MODAL,
GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
_("Unable to open the calendar '%s': %s"),
- e_source_peek_name (source),
+ e_source_get_display_name (source),
error->message);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
@@ -2987,7 +2989,8 @@ source_changed_cb (ESourceComboBox *source_combo_box,
if (comp_editor_page_get_updating (COMP_EDITOR_PAGE (epage)))
return;
- source = e_source_combo_box_get_active (source_combo_box);
+ source = e_source_combo_box_ref_active (source_combo_box);
+ g_return_if_fail (source != NULL);
if (priv->open_cancellable) {
g_cancellable_cancel (priv->open_cancellable);
@@ -2995,9 +2998,13 @@ source_changed_cb (ESourceComboBox *source_combo_box,
}
priv->open_cancellable = g_cancellable_new ();
- e_client_utils_open_new (source, E_CLIENT_SOURCE_TYPE_EVENTS, FALSE, priv->open_cancellable,
- e_client_utils_authenticate_handler, NULL,
- epage_client_opened_cb, epage);
+ e_client_utils_open_new (
+ source, E_CLIENT_SOURCE_TYPE_EVENTS,
+ FALSE, priv->open_cancellable,
+ e_client_utils_authenticate_handler, NULL,
+ epage_client_opened_cb, epage);
+
+ g_object_unref (source);
}
static void
@@ -3305,7 +3312,8 @@ init_widgets (EventPage *epage)
g_signal_connect (
priv->alarm_dialog, "delete-event",
G_CALLBACK (gtk_widget_hide), priv->alarm_dialog);
- priv->alarm_list_dlg_widget = alarm_list_dialog_peek (client, priv->alarm_list_store);
+ priv->alarm_list_dlg_widget = alarm_list_dialog_peek (
+ client, priv->alarm_list_store);
gtk_widget_reparent (priv->alarm_list_dlg_widget, priv->alarm_box);
gtk_widget_show_all (priv->alarm_list_dlg_widget);
gtk_widget_hide (priv->alarm_dialog);
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index 5348a19328..58d3d3b207 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -947,7 +947,7 @@ mpage_client_opened_cb (GObject *source_object,
dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
_("Unable to open memos in '%s': %s"),
- e_source_peek_name (source),
+ e_source_get_display_name (source),
error ? error->message : _("Unknown error"));
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
@@ -993,7 +993,8 @@ source_changed_cb (ESourceComboBox *source_combo_box,
if (comp_editor_page_get_updating (COMP_EDITOR_PAGE (mpage)))
return;
- source = e_source_combo_box_get_active (source_combo_box);
+ source = e_source_combo_box_ref_active (source_combo_box);
+ g_return_if_fail (source != NULL);
if (priv->open_cancellable) {
g_cancellable_cancel (priv->open_cancellable);
@@ -1001,9 +1002,13 @@ source_changed_cb (ESourceComboBox *source_combo_box,
}
priv->open_cancellable = g_cancellable_new ();
- e_client_utils_open_new (source, E_CLIENT_SOURCE_TYPE_MEMOS, FALSE, priv->open_cancellable,
- e_client_utils_authenticate_handler, NULL,
- mpage_client_opened_cb, mpage);
+ e_client_utils_open_new (
+ source, E_CLIENT_SOURCE_TYPE_MEMOS,
+ FALSE, priv->open_cancellable,
+ e_client_utils_authenticate_handler, NULL,
+ mpage_client_opened_cb, mpage);
+
+ g_object_unref (source);
}
static void
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index 71a494541a..9e051af37d 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -1775,7 +1775,7 @@ tpage_client_opened_cb (GObject *source_object,
NULL, GTK_DIALOG_MODAL,
GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
_("Unable to open tasks in '%s': %s"),
- e_source_peek_name (source),
+ e_source_get_display_name (source),
error->message);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
@@ -1824,7 +1824,8 @@ source_changed_cb (ESourceComboBox *source_combo_box,
if (comp_editor_page_get_updating (COMP_EDITOR_PAGE (tpage)))
return;
- source = e_source_combo_box_get_active (source_combo_box);
+ source = e_source_combo_box_ref_active (source_combo_box);
+ g_return_if_fail (source != NULL);
if (priv->open_cancellable) {
g_cancellable_cancel (priv->open_cancellable);
@@ -1837,6 +1838,8 @@ source_changed_cb (ESourceComboBox *source_combo_box,
FALSE, priv->open_cancellable,
e_client_utils_authenticate_handler, NULL,
tpage_client_opened_cb, tpage);
+
+ g_object_unref (source);
}
static void
@@ -1880,9 +1883,11 @@ task_page_send_options_clicked_cb (TaskPage *tpage)
if (!priv->sod) {
priv->sod = e_send_options_dialog_new ();
priv->sod->data->initialized = TRUE;
- source = e_source_combo_box_get_active (
+ source = e_source_combo_box_ref_active (
E_SOURCE_COMBO_BOX (priv->source_selector));
- e_send_options_utils_set_default_data (priv->sod, source, "task");
+ e_send_options_utils_set_default_data (
+ priv->sod, source, "task");
+ g_object_unref (source);
}
if (e_client_check_capability (E_CLIENT (client), CAL_STATIC_CAPABILITY_NO_GEN_OPTIONS)) {
diff --git a/calendar/gui/e-cal-component-preview.c b/calendar/gui/e-cal-component-preview.c
index c96a9e0790..4b727d4d53 100644
--- a/calendar/gui/e-cal-component-preview.c
+++ b/calendar/gui/e-cal-component-preview.c
@@ -109,7 +109,7 @@ update_comp_info (ECalComponentPreview *preview,
gint comp_sequence;
source = e_client_get_source (E_CLIENT (client));
- cal_uid = g_strdup (e_source_peek_uid (source));
+ cal_uid = g_strdup (e_source_get_uid (source));
e_cal_component_get_uid (comp, &uid);
comp_uid = g_strdup (uid);
e_cal_component_get_last_modified (comp, &itm);
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index 20dee7f714..d56b7583fd 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -2942,7 +2942,7 @@ client_opened_cb (GObject *source_object,
g_warning (
"%s: Failed to open '%s': %s",
G_STRFUNC,
- e_source_peek_name (source),
+ e_source_get_display_name (source),
error->message);
g_error_free (error);
e_cal_model_update_status_message (model, NULL, -1.0);
@@ -3017,7 +3017,7 @@ add_new_client (ECalModel *model,
gchar *msg;
source = e_client_get_source (E_CLIENT (client));
- display_name = e_source_peek_name (source);
+ display_name = e_source_get_display_name (source);
msg = g_strdup_printf (_("Opening %s"), display_name);
e_cal_model_update_status_message (model, msg, -1.0);
g_free (msg);
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 17d5a43965..24ea98a8f7 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -1517,7 +1517,7 @@ e_calendar_view_new_appointment_for (ECalendarView *cal_view,
widget = e_alert_dialog_new_for_args (
parent, "calendar:prompt-read-only-cal",
- e_source_peek_name (source),
+ e_source_get_display_name (source),
NULL);
g_signal_connect (
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 7b4fecfb0a..ad7fd78cd3 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -7909,7 +7909,7 @@ e_day_view_on_drag_data_get (GtkWidget *widget,
gchar *tmp;
source = e_client_get_source (E_CLIENT (event->comp_data->client));
- source_uid = e_source_peek_uid (source);
+ source_uid = e_source_get_uid (source);
tmp = g_strconcat (source_uid, "\n", comp_str, NULL);
target = gtk_selection_data_get_target (selection_data);
diff --git a/calendar/gui/e-task-table.c b/calendar/gui/e-task-table.c
index b314766aff..651ef83a89 100644
--- a/calendar/gui/e-task-table.c
+++ b/calendar/gui/e-task-table.c
@@ -1692,7 +1692,7 @@ hide_completed_rows_ready (GObject *source_object,
g_debug ("%s: Could not get the objects from '%s': %s",
G_STRFUNC,
- source ? e_source_peek_name (source) : "???",
+ source ? e_source_get_display_name (source) : "???",
error ? error->message : "Uknown error");
}
g_clear_error (&error);
@@ -1754,7 +1754,7 @@ show_completed_rows_ready (GObject *source_object,
g_debug ("%s: Could not get the objects from '%s': %s",
G_STRFUNC,
- source ? e_source_peek_name (source) : "???",
+ source ? e_source_get_display_name (source) : "???",
error ? error->message : "Uknown error");
}
g_clear_error (&error);