aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-utils.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-10-18 05:19:13 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-10-19 00:32:37 +0800
commit22ef5aa7e61bcea10169153932f100a0954942da (patch)
tree18e81eaa672f1db6fcd6b32d9faa88515c378e3e /mail/em-utils.c
parent35e55a8d6e3455efa92abd669680d191e3e4cbac (diff)
downloadgsoc2013-evolution-22ef5aa7e61bcea10169153932f100a0954942da.tar
gsoc2013-evolution-22ef5aa7e61bcea10169153932f100a0954942da.tar.gz
gsoc2013-evolution-22ef5aa7e61bcea10169153932f100a0954942da.tar.bz2
gsoc2013-evolution-22ef5aa7e61bcea10169153932f100a0954942da.tar.lz
gsoc2013-evolution-22ef5aa7e61bcea10169153932f100a0954942da.tar.xz
gsoc2013-evolution-22ef5aa7e61bcea10169153932f100a0954942da.tar.zst
gsoc2013-evolution-22ef5aa7e61bcea10169153932f100a0954942da.zip
Kill mail_config_get_gconf_client().
Diffstat (limited to 'mail/em-utils.c')
-rw-r--r--mail/em-utils.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/mail/em-utils.c b/mail/em-utils.c
index dab327a20e..3fcc530c51 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -124,18 +124,24 @@ em_utils_ask_open_many (GtkWindow *parent,
* Returns %TRUE if the user clicks Yes or %FALSE otherwise.
**/
gboolean
-em_utils_prompt_user (GtkWindow *parent, const gchar *promptkey, const gchar *tag, ...)
+em_utils_prompt_user (GtkWindow *parent,
+ const gchar *promptkey,
+ const gchar *tag,
+ ...)
{
GtkWidget *mbox, *check = NULL;
GtkWidget *container;
va_list ap;
gint button;
- GConfClient *gconf = mail_config_get_gconf_client ();
+ GConfClient *client;
EAlert *alert = NULL;
- if (promptkey
- && !gconf_client_get_bool (gconf, promptkey, NULL))
+ client = gconf_client_get_default ();
+
+ if (promptkey && !gconf_client_get_bool (client, promptkey, NULL)) {
+ g_object_unref (client);
return TRUE;
+ }
va_start (ap, tag);
alert = e_alert_new_valist (tag, ap);
@@ -154,10 +160,15 @@ em_utils_prompt_user (GtkWindow *parent, const gchar *promptkey, const gchar *ta
button = gtk_dialog_run ((GtkDialog *) mbox);
if (promptkey)
- gconf_client_set_bool (gconf, promptkey, !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check)), NULL);
+ gconf_client_set_bool (
+ client, promptkey,
+ !gtk_toggle_button_get_active (
+ GTK_TOGGLE_BUTTON (check)), NULL);
gtk_widget_destroy (mbox);
+ g_object_unref (client);
+
return button == GTK_RESPONSE_YES;
}