From 7751734b69ac0e104c69aea46c8a512465eaa249 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 13 Feb 2002 22:28:39 +0000 Subject: Set the followup icon to use the new flag icon rather than the exclamation 2002-02-13 Jeffrey Stedfast * folder-browser-ui.c: Set the followup icon to use the new flag icon rather than the exclamation mark icon. * mail-callbacks.c (flag_for_followup): Append the selected messages to the clist in the followp editor. * message-list.c: Include the new flag-for-followup icon. * message-tag-followup.c (message_tag_followup_append_message): New method to add a message to the message-list. (construct): Get the message_list widget and load the flag icon pixmap. svn path=/trunk/; revision=15720 --- mail/ChangeLog | 15 ++++++++ mail/folder-browser-ui.c | 2 +- mail/mail-callbacks.c | 10 ++++++ mail/message-list.c | 3 +- mail/message-list.etspec | 2 +- mail/message-tag-followup.c | 23 ++++++++++++ mail/message-tag-followup.h | 6 ++++ mail/message-tags.glade | 87 ++++++++++++++++++++++++++++++++++----------- 8 files changed, 124 insertions(+), 24 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 24d3881708..ba0ff29ad0 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,18 @@ +2002-02-13 Jeffrey Stedfast + + * folder-browser-ui.c: Set the followup icon to use the new flag + icon rather than the exclamation mark icon. + + * mail-callbacks.c (flag_for_followup): Append the selected + messages to the clist in the followp editor. + + * message-list.c: Include the new flag-for-followup icon. + + * message-tag-followup.c (message_tag_followup_append_message): + New method to add a message to the message-list. + (construct): Get the message_list widget and load the flag icon + pixmap. + 2002-02-12 Jeffrey Stedfast * message-tag-followup.c (set_widget_values): Fixed a bug. diff --git a/mail/folder-browser-ui.c b/mail/folder-browser-ui.c index 538675e144..cd79be08ea 100644 --- a/mail/folder-browser-ui.c +++ b/mail/folder-browser-ui.c @@ -135,7 +135,7 @@ static EPixmap message_pixcache [] = { E_PIXMAP ("/commands/MessageMarkAsRead", "mail-read.xpm"), E_PIXMAP ("/commands/MessageMarkAsUnRead", "mail-new.xpm"), E_PIXMAP ("/commands/MessageMarkAsImportant", "priority-high.xpm"), - E_PIXMAP ("/commands/MessageFollowUpFlag", "priority-high.xpm"), + E_PIXMAP ("/commands/MessageFollowUpFlag", "flag-for-followup-16.png"), E_PIXMAP ("/Toolbar/MailMessageToolbar/MessageReplySender", "buttons/reply.png"), E_PIXMAP ("/Toolbar/MailMessageToolbar/MessageReplyAll", "buttons/reply-to-all.png"), diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index dc57cf8d68..0c10521ad9 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -1873,6 +1873,7 @@ flag_for_followup (BonoboUIComponent *uih, void *user_data, const char *path) struct _tag_editor_data *data; GtkWidget *editor; GPtrArray *uids; + int i; if (FOLDER_BROWSER_IS_DESTROYED (fb)) return; @@ -1888,6 +1889,15 @@ flag_for_followup (BonoboUIComponent *uih, void *user_data, const char *path) data->fb = fb; data->uids = uids; + for (i = 0; i < uids->len; i++) { + CamelMessageInfo *info; + + info = camel_folder_get_message_info (fb->folder, uids->pdata[i]); + message_tag_followup_append_message (MESSAGE_TAG_FOLLOWUP (editor), + camel_message_info_from (info), + camel_message_info_subject (info)); + } + gnome_dialog_button_connect (GNOME_DIALOG (editor), 0, tag_editor_ok, data); gnome_dialog_button_connect (GNOME_DIALOG (editor), 1, tag_editor_cancel, data); gnome_dialog_set_close (GNOME_DIALOG (editor), TRUE); diff --git a/mail/message-list.c b/mail/message-list.c index e3c6f3f726..f2dfcf1918 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -59,6 +59,7 @@ #include "art/score-high.xpm" #include "art/score-higher.xpm" #include "art/score-highest.xpm" +#include "art/flag-for-followup.xpm" /*#define TIMEIT */ @@ -152,7 +153,7 @@ static struct { { score_high_xpm, NULL }, { score_higher_xpm, NULL }, { score_highest_xpm, NULL }, - { priority_high_xpm, NULL }, /* FIXME: replace with a flag icon */ + { flag_for_followup_xpm,NULL }, { NULL, NULL } }; diff --git a/mail/message-list.etspec b/mail/message-list.etspec index 4f91cbb98d..c4c86b13b2 100644 --- a/mail/message-list.etspec +++ b/mail/message-list.etspec @@ -19,7 +19,7 @@ - + diff --git a/mail/message-tag-followup.c b/mail/message-tag-followup.c index 8306fead8b..82a502e791 100644 --- a/mail/message-tag-followup.c +++ b/mail/message-tag-followup.c @@ -31,6 +31,8 @@ #include +#include + #include "message-tag-followup.h" static void message_tag_followup_class_init (MessageTagFollowUpClass *class); @@ -311,6 +313,11 @@ construct (MessageTagEditor *editor) /* reparent */ gtk_widget_reparent (widget, GNOME_DIALOG (editor)->vbox); + widget = glade_xml_get_widget (gui, "pixmap"); + gnome_pixmap_load_file (GNOME_PIXMAP (widget), EVOLUTION_GLADEDIR "/flag-for-followup-48.png"); + + followup->message_list = GTK_CLIST (glade_xml_get_widget (gui, "message_list")); + followup->type = GTK_OPTION_MENU (glade_xml_get_widget (gui, "followup_type")); gtk_option_menu_remove_menu (followup->type); menu = gtk_menu_new (); @@ -354,3 +361,19 @@ message_tag_followup_new (void) return editor; } + +void +message_tag_followup_append_message (MessageTagFollowUp *editor, + const char *from, + const char *subject) +{ + char *text[3]; + + g_return_if_fail (IS_MESSAGE_TAG_FOLLOWUP (editor)); + + text[0] = (char *) from; + text[1] = (char *) subject; + text[2] = NULL; + + gtk_clist_append (editor->message_list, text); +} diff --git a/mail/message-tag-followup.h b/mail/message-tag-followup.h index 75161a4e76..0245809754 100644 --- a/mail/message-tag-followup.h +++ b/mail/message-tag-followup.h @@ -69,6 +69,8 @@ struct _MessageTagFollowUp { struct _FollowUpTag *tag; char *value; + GtkCList *message_list; + GtkOptionMenu *type; GtkWidget *none; @@ -94,6 +96,10 @@ const char *message_tag_followup_i18n_name (int type); MessageTagEditor *message_tag_followup_new (void); +void message_tag_followup_append_message (MessageTagFollowUp *editor, + const char *from, + const char *subject); + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/mail/message-tags.glade b/mail/message-tags.glade index 469d74ce31..9883005f52 100644 --- a/mail/message-tags.glade +++ b/mail/message-tags.glade @@ -20,9 +20,9 @@ GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False - False - False - False + True + True + True False False @@ -86,10 +86,9 @@ GtkHBox - hbox1 - 3 + hbox2 False - 3 + 4 0 False @@ -97,15 +96,9 @@ - GtkLabel - label6 - - GTK_JUSTIFY_LEFT - False - 7.45058e-09 - 0 - 0 - 0 + GnomePixmap + pixmap + flag-for-followup-48.png 0 False @@ -115,22 +108,74 @@ GtkLabel - lblSubject - + lblDirections + GTK_JUSTIFY_LEFT - True - 7.45058e-09 + False + 0.5 0.5 0 0 0 - True - True + False + False + + GtkScrolledWindow + scrolledwindow1 + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_UPDATE_CONTINUOUS + GTK_UPDATE_CONTINUOUS + + 0 + True + True + + + + GtkCList + message_list + True + 2 + 106,80 + GTK_SELECTION_SINGLE + True + GTK_SHADOW_IN + + + GtkLabel + CList:title + lblFrom + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + GtkLabel + CList:title + lblSubject + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + GtkTable table2 -- cgit v1.2.3