From 0fa1b87e9ee6b947b2706a44fc7429730655b3f9 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 21 Nov 2000 22:09:51 +0000 Subject: New function to return if user wants to view message source. 2000-11-21 Jeffrey Stedfast * mail-config.c (mail_config_view_source): New function to return if user wants to view message source. (mail_config_set_view_source): New function to set whether the view wants to view source. * mail-ops.c (mail_do_view_message_sources): Removed. We're not gonna view-source this way anymore. * folder-browser-factory.c: Removed the ViewSource bonobo verb from the Message menu. (control_activate): Added ViewSource. * folder-browser.c (on_right_click): Removed Message menu item to view message source. (folder_browser_toggle_view_source): New callback to set whether or not the MailDisplay shows the raw message or the pretty-ified message. * mail-callbacks.c: Removed view_source. * mail-display.c (redisplay): If toggle_raw is set then display the raw message else display the pretty formatted message. (mail_display_redisplay): New function to force the redisplay of a message. * mail-format.c (mail_format_raw_message): New function to write the raw message data. svn path=/trunk/; revision=6639 --- mail/folder-browser.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'mail/folder-browser.c') diff --git a/mail/folder-browser.c b/mail/folder-browser.c index f6c1b94963..d03e58eaa4 100644 --- a/mail/folder-browser.c +++ b/mail/folder-browser.c @@ -381,6 +381,22 @@ folder_browser_toggle_threads (BonoboUIComponent *component, message_list_set_threaded (fb->message_list, atoi (state)); } +void +folder_browser_toggle_view_source (BonoboUIComponent *component, + const char *path, + Bonobo_UIComponent_EventType type, + const char *state, + gpointer user_data) +{ + FolderBrowser *fb = user_data; + + if (type != Bonobo_UIComponent_STATE_CHANGED) + return; + + mail_config_set_view_source (atoi (state)); + mail_display_redisplay (fb->mail_display, TRUE); +} + void vfolder_subject (GtkWidget *w, FolderBrowser *fb) { @@ -481,8 +497,6 @@ on_right_click (ETableScrolled *table, gint row, gint col, GdkEvent *event, Fold { _("Apply Filters"), NULL, GTK_SIGNAL_FUNC (apply_filters), NULL, 0 }, { "", NULL, GTK_SIGNAL_FUNC (NULL), NULL, 0 }, { _("Create Rule From Message"), NULL, GTK_SIGNAL_FUNC (NULL), filter_menu, 2 }, - { "", NULL, GTK_SIGNAL_FUNC (NULL), NULL, 0 }, - { _("View Message Source"), NULL, GTK_SIGNAL_FUNC (view_source), NULL, 0 }, { NULL, NULL, NULL, NULL, 0 } }; @@ -721,7 +735,7 @@ my_folder_browser_init (GtkObject *object) */ fb->message_list = (MessageList *)message_list_new (); fb->mail_display = (MailDisplay *)mail_display_new (); - + gtk_signal_connect (GTK_OBJECT (fb->message_list->etable), "key_press", GTK_SIGNAL_FUNC (etable_key), fb); -- cgit