diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-01-08 09:31:21 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-01-08 09:31:21 +0800 |
commit | 235dc4e759f1781b34a985233c6b707613db41ad (patch) | |
tree | 82d930d61f4e27aa42f37737e121d02ad73f22a6 | |
parent | a7c452fa5770e07e4a23024e23433dec4d7dd49b (diff) | |
download | gsoc2013-evolution-235dc4e759f1781b34a985233c6b707613db41ad.tar gsoc2013-evolution-235dc4e759f1781b34a985233c6b707613db41ad.tar.gz gsoc2013-evolution-235dc4e759f1781b34a985233c6b707613db41ad.tar.bz2 gsoc2013-evolution-235dc4e759f1781b34a985233c6b707613db41ad.tar.lz gsoc2013-evolution-235dc4e759f1781b34a985233c6b707613db41ad.tar.xz gsoc2013-evolution-235dc4e759f1781b34a985233c6b707613db41ad.tar.zst gsoc2013-evolution-235dc4e759f1781b34a985233c6b707613db41ad.zip |
New convenience function. (attach_to_multipart): Use
2003-01-07 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer-attachment-bar.c (get_default_charset): New
convenience function.
(attach_to_multipart): Use get_default_charset().
svn path=/trunk/; revision=19270
-rw-r--r-- | composer/ChangeLog | 4 | ||||
-rw-r--r-- | composer/e-msg-composer-attachment-bar.c | 20 |
2 files changed, 23 insertions, 1 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index a388660dab..e0a258ff47 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,5 +1,9 @@ 2003-01-07 Jeffrey Stedfast <fejj@ximian.com> + * e-msg-composer-attachment-bar.c (get_default_charset): New + convenience function. + (attach_to_multipart): Use get_default_charset(). + * e-msg-composer.c (composer_get_default_charset): Convenience function. (get_file_content): Use the convenience function to get the diff --git a/composer/e-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c index dbcf37dc33..13bd6cb495 100644 --- a/composer/e-msg-composer-attachment-bar.c +++ b/composer/e-msg-composer-attachment-bar.c @@ -28,6 +28,9 @@ #include <gtk/gtk.h> #include <glade/glade.h> +#include <gconf/gconf.h> +#include <gconf/gconf-client.h> +#include <gal/util/e-iconv.h> #include <libgnome/gnome-util.h> #include <libgnomeui/gnome-app.h> #include <libgnomeui/gnome-app-helper.h> @@ -715,6 +718,21 @@ e_msg_composer_attachment_bar_new (GtkAdjustment *adj) return GTK_WIDGET (new); } +static const char * +get_default_charset (void) +{ + GConfClient *gconf; + const char *charset; + char *buf; + + gconf = gconf_client_get_default (); + buf = gconf_client_get_string (gconf, "/apps/evolution/mail/format/charset", NULL); + charset = e_iconv_charset_name (buf); + g_free (buf); + + return charset; +} + static void attach_to_multipart (CamelMultipart *multipart, EMsgComposerAttachment *attachment, @@ -762,7 +780,7 @@ attach_to_multipart (CamelMultipart *multipart, default_charset = "us-ascii"; } else if (!charset) { if (!default_charset) - default_charset = mail_config_get_default_charset (); + default_charset = get_default_charset (); /* FIXME: We should really check that this fits within the default_charset and if not find one that does and/or |