aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-06-10 02:18:33 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-06-10 02:18:33 +0800
commita9329a4a2ef2a1f855e042ee3fa9219f22559926 (patch)
tree6f0b18a73285d22c5fae6b9aa8ef51545eb2cc59
parentc67d63acbaabca31297960e29725a9ef3224d327 (diff)
downloadgsoc2013-evolution-a9329a4a2ef2a1f855e042ee3fa9219f22559926.tar
gsoc2013-evolution-a9329a4a2ef2a1f855e042ee3fa9219f22559926.tar.gz
gsoc2013-evolution-a9329a4a2ef2a1f855e042ee3fa9219f22559926.tar.bz2
gsoc2013-evolution-a9329a4a2ef2a1f855e042ee3fa9219f22559926.tar.lz
gsoc2013-evolution-a9329a4a2ef2a1f855e042ee3fa9219f22559926.tar.xz
gsoc2013-evolution-a9329a4a2ef2a1f855e042ee3fa9219f22559926.tar.zst
gsoc2013-evolution-a9329a4a2ef2a1f855e042ee3fa9219f22559926.zip
Same as the rest. (setup_ui): We didn't even seem to be using the gconf
2003-05-21 Jeffrey Stedfast <fejj@ximian.com> * e-msg-composer.c (composer_get_default_charset_setting): Same as the rest. (setup_ui): We didn't even seem to be using the gconf client here. Removed. (e_msg_composer_load_config): Unref the gconf client after we're finished. (e_msg_composer_new): Same. (e_msg_composer_new_post): Here too. (e_msg_composer_set_view_from): And here. (e_msg_composer_set_view_replyto): And here. (e_msg_composer_set_view_cc): Here too. (e_msg_composer_set_view_bcc): Again here. * e-msg-composer-hdrs.c (create_from_optionmenu): Same as below. (e_msg_composer_hdrs_set_from_account): Here too. * e-msg-composer-attachment-bar.c (get_default_charset): Unref the gconf client. svn path=/trunk/; revision=21391
-rw-r--r--composer/ChangeLog20
-rw-r--r--composer/e-msg-composer-attachment-bar.c1
-rw-r--r--composer/e-msg-composer-hdrs.c8
-rw-r--r--composer/e-msg-composer.c15
4 files changed, 37 insertions, 7 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index e69de29bb2..6add4558bd 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -0,0 +1,20 @@
+2003-05-21 Jeffrey Stedfast <fejj@ximian.com>
+
+ * e-msg-composer.c (composer_get_default_charset_setting): Same as
+ the rest.
+ (setup_ui): We didn't even seem to be using the gconf client
+ here. Removed.
+ (e_msg_composer_load_config): Unref the gconf client after we're
+ finished.
+ (e_msg_composer_new): Same.
+ (e_msg_composer_new_post): Here too.
+ (e_msg_composer_set_view_from): And here.
+ (e_msg_composer_set_view_replyto): And here.
+ (e_msg_composer_set_view_cc): Here too.
+ (e_msg_composer_set_view_bcc): Again here.
+
+ * e-msg-composer-hdrs.c (create_from_optionmenu): Same as below.
+ (e_msg_composer_hdrs_set_from_account): Here too.
+
+ * e-msg-composer-attachment-bar.c (get_default_charset): Unref the
+ gconf client.
diff --git a/composer/e-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c
index 6db77b7a5c..fe826e4089 100644
--- a/composer/e-msg-composer-attachment-bar.c
+++ b/composer/e-msg-composer-attachment-bar.c
@@ -730,6 +730,7 @@ get_default_charset (void)
gconf = gconf_client_get_default ();
buf = gconf_client_get_string (gconf, "/apps/evolution/mail/composer/charset", NULL);
+ g_object_unref (gconf);
if (buf != NULL) {
charset = e_iconv_charset_name (buf);
diff --git a/composer/e-msg-composer-hdrs.c b/composer/e-msg-composer-hdrs.c
index f81914160f..344810ff83 100644
--- a/composer/e-msg-composer-hdrs.c
+++ b/composer/e-msg-composer-hdrs.c
@@ -308,6 +308,7 @@ create_from_optionmenu (EMsgComposerHdrs *hdrs)
gconf = gconf_client_get_default ();
uid = gconf_client_get_string (gconf, "/apps/evolution/mail/default_account", NULL);
+ g_object_unref (gconf);
/* Make list of account email addresses */
addresses = g_ptr_array_new ();
@@ -1009,10 +1010,11 @@ e_msg_composer_hdrs_set_from_account (EMsgComposerHdrs *hdrs,
omenu = GTK_OPTION_MENU (e_msg_composer_hdrs_get_from_omenu (hdrs));
- gconf = gconf_client_get_default ();
-
- if (!account_name)
+ if (!account_name) {
+ gconf = gconf_client_get_default ();
uid = gconf_client_get_string (gconf, "/apps/evolution/mail/default_account", NULL);
+ g_object_unref (gconf);
+ }
/* find the item that represents the account and activate it */
l = hdrs->priv->from_options;
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 76f09fd6f8..0a72e2aad1 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -243,6 +243,8 @@ composer_get_default_charset_setting (void)
if (buf == NULL)
buf = gconf_client_get_string (gconf, "/apps/evolution/mail/format/charset", NULL);
+ g_object_unref (gconf);
+
if (buf != NULL) {
charset = e_iconv_charset_name (buf);
g_free (buf);
@@ -2074,7 +2076,6 @@ setup_ui (EMsgComposer *composer)
BonoboUIContainer *container;
const char *default_charset;
gboolean hide_smime;
- GConfClient *gconf;
container = bonobo_window_get_ui_container (BONOBO_WINDOW (composer));
@@ -2094,7 +2095,6 @@ setup_ui (EMsgComposer *composer)
/* Populate the Charset Encoding menu and default it to whatever the user
chose as his default charset in the mailer */
- gconf = gconf_client_get_default ();
default_charset = composer_get_default_charset_setting ();
e_charset_picker_bonobo_ui_populate (composer->uic, "/menu/Edit/EncodingPlaceholder",
default_charset,
@@ -2731,6 +2731,8 @@ e_msg_composer_load_config (EMsgComposer *composer)
gconf, "/apps/evolution/mail/composer/view/Bcc", NULL);
composer->view_subject = gconf_client_get_bool (
gconf, "/apps/evolution/mail/composer/view/Subject", NULL);
+
+ g_object_unref (gconf);
}
static int
@@ -2970,14 +2972,13 @@ create_composer (int visible_mask)
"FormatHTML", TC_CORBA_boolean, composer->send_html,
NULL);
-
gconf = gconf_client_get_default ();
composer_settings_update (gconf, 0, NULL, composer);
gconf_client_add_dir (gconf, "/apps/evolution/mail/composer", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
composer->notify_id = gconf_client_notify_add (gconf, "/apps/evolution/mail/composer",
composer_settings_update, composer, NULL, NULL);
g_object_unref (gconf);
-
+
editor_server = bonobo_widget_get_objref (BONOBO_WIDGET (composer->editor));
/* FIXME: handle exceptions */
@@ -3081,6 +3082,7 @@ e_msg_composer_new (void)
gconf = gconf_client_get_default ();
send_html = gconf_client_get_bool (gconf, "/apps/evolution/mail/composer/send_html", NULL);
+ g_object_unref (gconf);
new = create_composer (E_MSG_COMPOSER_VISIBLE_MASK_MAIL);
if (new) {
@@ -3108,6 +3110,7 @@ e_msg_composer_new_post (void)
gconf = gconf_client_get_default ();
send_html = gconf_client_get_bool (gconf, "/apps/evolution/mail/composer/send_html", NULL);
+ g_object_unref (gconf);
new = create_composer (E_MSG_COMPOSER_VISIBLE_MASK_POST);
if (new) {
@@ -4608,6 +4611,7 @@ e_msg_composer_set_view_from (EMsgComposer *composer, gboolean view_from)
gconf = gconf_client_get_default ();
gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/From", view_from, NULL);
+ g_object_unref (gconf);
e_msg_composer_hdrs_set_visible (E_MSG_COMPOSER_HDRS (composer->hdrs),
e_msg_composer_get_visible_flags (composer));
@@ -4655,6 +4659,7 @@ e_msg_composer_set_view_replyto (EMsgComposer *composer, gboolean view_replyto)
gconf = gconf_client_get_default ();
gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/ReplyTo", view_replyto, NULL);
+ g_object_unref (gconf);
e_msg_composer_hdrs_set_visible (E_MSG_COMPOSER_HDRS (composer->hdrs),
e_msg_composer_get_visible_flags (composer));
@@ -4702,6 +4707,7 @@ e_msg_composer_set_view_cc (EMsgComposer *composer, gboolean view_cc)
gconf = gconf_client_get_default ();
gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/Cc", view_cc, NULL);
+ g_object_unref (gconf);
e_msg_composer_hdrs_set_visible (E_MSG_COMPOSER_HDRS (composer->hdrs),
e_msg_composer_get_visible_flags (composer));
@@ -4749,6 +4755,7 @@ e_msg_composer_set_view_bcc (EMsgComposer *composer, gboolean view_bcc)
gconf = gconf_client_get_default ();
gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/Bcc", view_bcc, NULL);
+ g_object_unref (gconf);
e_msg_composer_hdrs_set_visible (E_MSG_COMPOSER_HDRS (composer->hdrs),
e_msg_composer_get_visible_flags (composer));