aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-08-11 03:58:39 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-09-14 20:08:48 +0800
commit911d9f8c6b947d8ac922489fc03b1d063b377973 (patch)
tree9d5a080bed88e0601e2eec57f9e2073a6f231c26 /calendar
parentbae19960b300c3f39ca093f51576621aacbbc84f (diff)
downloadgsoc2013-evolution-911d9f8c6b947d8ac922489fc03b1d063b377973.tar.gz
gsoc2013-evolution-911d9f8c6b947d8ac922489fc03b1d063b377973.tar.zst
gsoc2013-evolution-911d9f8c6b947d8ac922489fc03b1d063b377973.zip
EConfig: Broadcast abort/commit events by way of signals.
Remove the clumsy abortfunc and commitfunc callback arguments from e_config_add_items().
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/dialogs/calendar-setup.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/calendar/gui/dialogs/calendar-setup.c b/calendar/gui/dialogs/calendar-setup.c
index 7dfbfdb4f2..8cb3f50d04 100644
--- a/calendar/gui/dialogs/calendar-setup.c
+++ b/calendar/gui/dialogs/calendar-setup.c
@@ -73,9 +73,9 @@ eccp_check_complete (EConfig *ec, const gchar *pageid, gpointer data)
}
static void
-eccp_commit (EConfig *ec, GSList *items, gpointer data)
+eccp_commit (EConfig *ec,
+ CalendarSourceDialog *sdialog)
{
- CalendarSourceDialog *sdialog = data;
xmlNodePtr xml;
GtkWindow *window;
@@ -493,8 +493,11 @@ calendar_setup_edit_calendar (GtkWindow *parent, ESource *source, ESourceGroup *
sdialog->config = ec = e_cal_config_new (E_CONFIG_BOOK, "org.gnome.evolution.calendar.calendarProperties");
for (i = 0; eccp_items[i].path; i++)
items = g_slist_prepend (items, &eccp_items[i]);
- e_config_add_items ((EConfig *) ec, items, eccp_commit, NULL, eccp_free, sdialog);
+ e_config_add_items ((EConfig *) ec, items, eccp_free, sdialog);
e_config_add_page_check ((EConfig *) ec, NULL, eccp_check_complete, sdialog);
+ g_signal_connect (
+ ec, "commit",
+ G_CALLBACK (eccp_commit), sdialog);
target = e_cal_config_target_new_source (ec, sdialog->source);
target->source_type = E_CAL_CLIENT_SOURCE_TYPE_EVENTS;
@@ -549,8 +552,11 @@ calendar_setup_edit_task_list (GtkWindow *parent, ESource *source)
sdialog->config = ec = e_cal_config_new (E_CONFIG_BOOK, "org.gnome.evolution.calendar.calendarProperties");
for (i = 0; ectp_items[i].path; i++)
items = g_slist_prepend (items, &ectp_items[i]);
- e_config_add_items ((EConfig *) ec, items, eccp_commit, NULL, eccp_free, sdialog);
+ e_config_add_items ((EConfig *) ec, items, eccp_free, sdialog);
e_config_add_page_check ((EConfig *) ec, NULL, eccp_check_complete, sdialog);
+ g_signal_connect (
+ ec, "commit",
+ G_CALLBACK (eccp_commit), sdialog);
target = e_cal_config_target_new_source (ec, sdialog->source);
target->source_type = E_CAL_CLIENT_SOURCE_TYPE_TASKS;
@@ -605,8 +611,11 @@ calendar_setup_edit_memo_list (GtkWindow *parent, ESource *source)
sdialog->config = ec = e_cal_config_new (E_CONFIG_BOOK, "org.gnome.evolution.calendar.calendarProperties");
for (i = 0; ecmp_items[i].path; i++)
items = g_slist_prepend (items, &ecmp_items[i]);
- e_config_add_items ((EConfig *) ec, items, eccp_commit, NULL, eccp_free, sdialog);
+ e_config_add_items ((EConfig *) ec, items, eccp_free, sdialog);
e_config_add_page_check ((EConfig *) ec, NULL, eccp_check_complete, sdialog);
+ g_signal_connect (
+ ec, "commit",
+ G_CALLBACK (eccp_commit), sdialog);
target = e_cal_config_target_new_source (ec, sdialog->source);
target->source_type = E_CAL_CLIENT_SOURCE_TYPE_MEMOS;