diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2001-08-06 00:55:13 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2001-08-06 00:55:13 +0800 |
commit | f29e762e0bc379caef1a2899d7d8bd43c2d45228 (patch) | |
tree | 142883443548d5e26db1ef37ec076ef341a7fa2f /mail/message-browser.c | |
parent | ee07364c0671bad04c76f3c7b8775b4c8e241ef0 (diff) | |
download | gsoc2013-evolution-f29e762e0bc379caef1a2899d7d8bd43c2d45228.tar.gz gsoc2013-evolution-f29e762e0bc379caef1a2899d7d8bd43c2d45228.tar.zst gsoc2013-evolution-f29e762e0bc379caef1a2899d7d8bd43c2d45228.zip |
Make the title of the window "subject - Message" instead of just
* message-browser.c (message_browser_message_loaded): Make the
title of the window "subject - Message" instead of just "subject".
Also, display "(No subject)" if the subject is NULL.
[Fix #6399, 8-bit characters are not displayed in window title.]
* message-browser.c (message_browser_message_loaded): Convert the
subject from UTF-8 to GTK.
svn path=/trunk/; revision=11695
Diffstat (limited to 'mail/message-browser.c')
-rw-r--r-- | mail/message-browser.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/mail/message-browser.c b/mail/message-browser.c index 741c663cd8..4562ff8eb5 100644 --- a/mail/message-browser.c +++ b/mail/message-browser.c @@ -25,6 +25,8 @@ #endif #include <gal/util/e-util.h> +#include <gal/widgets/e-unicode.h> + #include <bonobo/bonobo-exception.h> #include <bonobo/bonobo-ui-component.h> #include <bonobo/bonobo-ui-container.h> @@ -108,6 +110,7 @@ message_browser_message_loaded (FolderBrowser *fb, const char *uid, MessageBrows { CamelMimeMessage *message; char *subject = NULL; + char *title; g_warning ("got 'message_loaded' event"); @@ -115,8 +118,17 @@ message_browser_message_loaded (FolderBrowser *fb, const char *uid, MessageBrows if (message) subject = (char *) camel_mime_message_get_subject (message); + + if (subject != NULL) + subject = e_utf8_to_gtk_string (GTK_WIDGET (mb), subject); + else + subject = _("(No subject)"); + + title = g_strdup_printf (_("%s - Message"), subject); - gtk_window_set_title (GTK_WINDOW (mb), subject ? subject : ""); + gtk_window_set_title (GTK_WINDOW (mb), title); + + g_free (title); } static void |