diff options
-rw-r--r-- | mail/ChangeLog | 11 | ||||
-rw-r--r-- | mail/message-browser.c | 14 |
2 files changed, 24 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 275a54671a..bb1caf2ace 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,16 @@ 2001-08-05 Ettore Perazzoli <ettore@ximian.com> + * 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. + +2001-08-05 Ettore Perazzoli <ettore@ximian.com> + [Revert the previous changes, there seems to be something wrong with it.] 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 |