aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-08-11 03:58:39 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-08-11 04:13:08 +0800
commit15376b6657c77d4f701367c4f14bed653201fe26 (patch)
treeacb7081ff7f41653e8684738bf1677ec896721fb /modules
parent90e4a46478e5c39b51bfd36bc252c10e9cd60865 (diff)
downloadgsoc2013-evolution-15376b6657c77d4f701367c4f14bed653201fe26.tar
gsoc2013-evolution-15376b6657c77d4f701367c4f14bed653201fe26.tar.gz
gsoc2013-evolution-15376b6657c77d4f701367c4f14bed653201fe26.tar.bz2
gsoc2013-evolution-15376b6657c77d4f701367c4f14bed653201fe26.tar.lz
gsoc2013-evolution-15376b6657c77d4f701367c4f14bed653201fe26.tar.xz
gsoc2013-evolution-15376b6657c77d4f701367c4f14bed653201fe26.tar.zst
gsoc2013-evolution-15376b6657c77d4f701367c4f14bed653201fe26.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 'modules')
-rw-r--r--modules/addressbook/addressbook-config.c9
-rw-r--r--modules/addressbook/autocompletion-config.c2
-rw-r--r--modules/calendar/e-calendar-preferences.c2
-rw-r--r--modules/mail/em-composer-prefs.c2
-rw-r--r--modules/mail/em-mailer-prefs.c2
-rw-r--r--modules/mail/em-network-prefs.c2
-rw-r--r--modules/startup-wizard/evolution-startup-wizard.c12
7 files changed, 19 insertions, 12 deletions
diff --git a/modules/addressbook/addressbook-config.c b/modules/addressbook/addressbook-config.c
index 3686fa60bd..a41651459a 100644
--- a/modules/addressbook/addressbook-config.c
+++ b/modules/addressbook/addressbook-config.c
@@ -1076,9 +1076,9 @@ static EConfigItem eabc_new_items[] = {
};
static void
-eabc_commit (EConfig *ec, GSList *items, gpointer data)
+eabc_commit (EConfig *ec,
+ AddressbookSourceDialog *sdialog)
{
- AddressbookSourceDialog *sdialog = data;
xmlNodePtr xml;
#if d(!)0
gchar *txt;
@@ -1262,8 +1262,11 @@ addressbook_config_edit_source (GtkWidget *parent, ESource *source)
items = g_slist_prepend (items, &eabc_items[i]);
}
- e_config_add_items ((EConfig *) ec, items, eabc_commit, NULL, eabc_free, sdialog);
+ e_config_add_items ((EConfig *) ec, items, eabc_free, sdialog);
e_config_add_page_check ((EConfig *) ec, NULL, eabc_check_complete, sdialog);
+ g_signal_connect (
+ ec, "commit",
+ G_CALLBACK (eabc_commit), sdialog);
target = eab_config_target_new_source (ec, sdialog->source);
e_config_set_target ((EConfig *) ec, (EConfigTarget *) target);
diff --git a/modules/addressbook/autocompletion-config.c b/modules/addressbook/autocompletion-config.c
index c78b958022..d4124193a6 100644
--- a/modules/addressbook/autocompletion-config.c
+++ b/modules/addressbook/autocompletion-config.c
@@ -265,7 +265,7 @@ autocompletion_config_new (EPreferencesWindow *window)
l = NULL;
for (ii = 0; ii < G_N_ELEMENTS (acc_items); ii++)
l = g_slist_prepend (l, &acc_items[ii]);
- e_config_add_items ((EConfig *) eab, l, NULL, NULL, acc_free, shell);
+ e_config_add_items ((EConfig *) eab, l, acc_free, shell);
gconf = gconf_client_get_default ();
diff --git a/modules/calendar/e-calendar-preferences.c b/modules/calendar/e-calendar-preferences.c
index ad04d307cf..a3dd435910 100644
--- a/modules/calendar/e-calendar-preferences.c
+++ b/modules/calendar/e-calendar-preferences.c
@@ -545,7 +545,7 @@ calendar_preferences_construct (ECalendarPreferences *prefs,
l = NULL;
for (i = 0; i < G_N_ELEMENTS (eccp_items); i++)
l = g_slist_prepend (l, &eccp_items[i]);
- e_config_add_items ((EConfig *) ec, l, NULL, NULL, eccp_free, prefs);
+ e_config_add_items ((EConfig *) ec, l, eccp_free, prefs);
widget = e_builder_get_widget (prefs->builder, "use-system-tz-check");
g_object_bind_property (
diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c
index 2703a8d9e4..f8825f701c 100644
--- a/modules/mail/em-composer-prefs.c
+++ b/modules/mail/em-composer-prefs.c
@@ -350,7 +350,7 @@ em_composer_prefs_construct (EMComposerPrefs *prefs,
l = NULL;
for (i = 0; i < G_N_ELEMENTS (emcp_items); i++)
l = g_slist_prepend (l, &emcp_items[i]);
- e_config_add_items ((EConfig *) ec, l, NULL, NULL, emcp_free, prefs);
+ e_config_add_items ((EConfig *) ec, l, emcp_free, prefs);
/* General tab */
diff --git a/modules/mail/em-mailer-prefs.c b/modules/mail/em-mailer-prefs.c
index bbf65e36b5..62d9377bc1 100644
--- a/modules/mail/em-mailer-prefs.c
+++ b/modules/mail/em-mailer-prefs.c
@@ -719,7 +719,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs,
l = NULL;
for (i = 0; i < G_N_ELEMENTS (emmp_items); i++)
l = g_slist_prepend (l, &emmp_items[i]);
- e_config_add_items ((EConfig *) ec, l, NULL, NULL, emmp_free, prefs);
+ e_config_add_items ((EConfig *) ec, l, emmp_free, prefs);
/* General tab */
diff --git a/modules/mail/em-network-prefs.c b/modules/mail/em-network-prefs.c
index d33f71ec6c..e12bb3c9c2 100644
--- a/modules/mail/em-network-prefs.c
+++ b/modules/mail/em-network-prefs.c
@@ -335,7 +335,7 @@ em_network_prefs_construct (EMNetworkPrefs *prefs)
l = NULL;
for (i = 0; i < G_N_ELEMENTS (emnp_items); i++)
l = g_slist_prepend (l, &emnp_items[i]);
- e_config_add_items ((EConfig *) ec, l, NULL, NULL, emnp_free, prefs);
+ e_config_add_items ((EConfig *) ec, l, emnp_free, prefs);
/* Proxy tab */
diff --git a/modules/startup-wizard/evolution-startup-wizard.c b/modules/startup-wizard/evolution-startup-wizard.c
index 5e3b028cdf..3cfca9318a 100644
--- a/modules/startup-wizard/evolution-startup-wizard.c
+++ b/modules/startup-wizard/evolution-startup-wizard.c
@@ -167,7 +167,6 @@ completed:
static void
startup_wizard_config_abort (EConfig *config,
- GSList *items,
EStartupWizard *extension)
{
GtkAssistant *assistant;
@@ -209,7 +208,6 @@ startup_wizard_config_abort (EConfig *config,
static void
startup_wizard_config_commit (EConfig *config,
- GSList *items,
EStartupWizard *extension)
{
EShell *shell;
@@ -480,8 +478,6 @@ startup_wizard_new_assistant (EStartupWizard *extension)
e_config_add_items (
config, items,
- (EConfigItemsFunc) startup_wizard_config_commit,
- (EConfigItemsFunc) startup_wizard_config_abort,
(EConfigItemsFunc) startup_wizard_config_free,
g_object_ref (extension));
@@ -489,6 +485,14 @@ startup_wizard_new_assistant (EStartupWizard *extension)
config, "70.progress", (EConfigCheckFunc)
startup_wizard_check_progress, extension);
+ g_signal_connect (
+ config, "abort",
+ G_CALLBACK (startup_wizard_config_abort), extension);
+
+ g_signal_connect (
+ config, "commit",
+ G_CALLBACK (startup_wizard_config_commit), extension);
+
e_config_create_window (config, NULL, _("Evolution Setup Assistant"));
/* Additional tweaks. The window must be created at this point. */