From f29e762e0bc379caef1a2899d7d8bd43c2d45228 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Sun, 5 Aug 2001 16:55:13 +0000 Subject: 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 --- mail/ChangeLog | 11 +++++++++++ mail/message-browser.c | 14 +++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 275a54671a..bb1caf2ace 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,14 @@ +2001-08-05 Ettore Perazzoli + + * 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 [Revert the previous changes, there seems to be something wrong 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 +#include + #include #include #include @@ -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 -- cgit