aboutsummaryrefslogtreecommitdiffstats
path: root/mail/folder-browser.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/folder-browser.c')
-rw-r--r--mail/folder-browser.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index c435b3c281..126ec20a01 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -138,7 +138,7 @@ folder_browser_finalise (GtkObject *object)
g_free (folder_browser->uri);
folder_browser->uri = NULL;
-
+
if (folder_browser->folder) {
camel_object_unhook_event(CAMEL_OBJECT(folder_browser->folder), "folder_changed",
folder_changed, folder_browser);
@@ -1172,6 +1172,29 @@ folder_browser_set_message_display_style (BonoboUIComponent *component
}
void
+folder_browser_charset_changed (BonoboUIComponent *component,
+ const char *path,
+ Bonobo_UIComponent_EventType type,
+ const char *state,
+ gpointer user_data)
+{
+ FolderBrowser *fb = FOLDER_BROWSER (user_data);
+ const char *charset;
+
+ if (type != Bonobo_UIComponent_STATE_CHANGED)
+ return;
+
+ if (atoi (state)) {
+ /* Charset menu names are "Charset-%s" where %s is the charset name */
+ charset = path + strlen ("Charset-");
+ if (!strcmp (charset, FB_DEFAULT_CHARSET))
+ charset = NULL;
+
+ mail_display_set_charset (fb->mail_display, charset);
+ }
+}
+
+void
vfolder_subject (GtkWidget *w, FolderBrowser *fb)
{
vfolder_gui_add_from_message (fb->mail_display->current_message, AUTO_SUBJECT, fb->uri);