[evolution-patches] (Mail) Fix for 324677 & 228040
- From: Srinivasa Ragavan <sragavan novell com>
- To: evolution-patches gnome org
- Subject: [evolution-patches] (Mail) Fix for 324677 & 228040
- Date: Wed, 21 Dec 2005 11:49:02 +0530
Hi,
The attached patch fixes two issues.
First one is a hack to refresh the view on setting the flag.
Second one is the fix to show Clear/Complete Flag in the menu, which
wasn't there.
It also has a hack to hide the "Not Junk" or "Junk" depending on its
enabled status. It is to reduce the size of the toolbar, which is pretty
huge and it goes beyond the screen size on few occasions.
Please review and give me your comments.
-Srini
Index: em-folder-view.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-folder-view.c,v
retrieving revision 1.136
diff -u -p -r1.136 em-folder-view.c
--- em-folder-view.c 12 Dec 2005 12:40:37 -0000 1.136
+++ em-folder-view.c 21 Dec 2005 04:57:59 -0000
@@ -802,6 +802,9 @@ emfv_popup_flag_completed(EPopup *ep, EP
uids = message_list_get_selected(emfv->list);
em_utils_flag_for_followup_completed((GtkWidget *)emfv, emfv->folder, uids);
+
+ if (emfv->preview)
+ em_format_redraw (emfv->preview);
}
static void
@@ -811,6 +814,9 @@ emfv_popup_flag_clear(EPopup *ep, EPopup
GPtrArray *uids = message_list_get_selected(emfv->list);
em_utils_flag_for_followup_clear((GtkWidget *)emfv, emfv->folder, uids);
+
+ if (emfv->preview)
+ em_format_redraw (emfv->preview);
}
static void
@@ -1207,8 +1213,8 @@ EMFV_MAP_CALLBACK(emfv_message_mark_noju
EMFV_MAP_CALLBACK(emfv_message_delete, emfv_popup_delete)
EMFV_MAP_CALLBACK(emfv_message_undelete, emfv_popup_undelete)
EMFV_MAP_CALLBACK(emfv_message_followup_flag, emfv_popup_flag_followup)
-/*EMFV_MAP_CALLBACK(emfv_message_followup_clear, emfv_popup_flag_clear)
- EMFV_MAP_CALLBACK(emfv_message_followup_completed, emfv_popup_flag_completed)*/
+EMFV_MAP_CALLBACK(emfv_message_followup_clear, emfv_popup_flag_clear)
+EMFV_MAP_CALLBACK(emfv_message_followup_completed, emfv_popup_flag_completed)
EMFV_MAP_CALLBACK(emfv_message_open, emfv_popup_open)
EMFV_MAP_CALLBACK(emfv_message_edit, emfv_popup_edit)
EMFV_MAP_CALLBACK(emfv_message_saveas, emfv_popup_saveas)
@@ -1659,6 +1665,8 @@ static BonoboUIVerb emfv_message_verbs[]
BONOBO_UI_UNSAFE_VERB ("MessageMarkAsJunk", emfv_message_mark_junk),
BONOBO_UI_UNSAFE_VERB ("MessageMarkAsNotJunk", emfv_message_mark_nojunk),
BONOBO_UI_UNSAFE_VERB ("MessageFollowUpFlag", emfv_message_followup_flag),
+ BONOBO_UI_UNSAFE_VERB ("MessageFollowUpComplete", emfv_message_followup_completed),
+ BONOBO_UI_UNSAFE_VERB ("MessageFollowUpClear", emfv_message_followup_clear),
BONOBO_UI_UNSAFE_VERB ("MessageMove", emfv_message_move),
BONOBO_UI_UNSAFE_VERB ("MessageOpen", emfv_message_open),
BONOBO_UI_UNSAFE_VERB ("MessagePostReply", emfv_message_post_reply),
@@ -1773,7 +1781,9 @@ static const EMFolderViewEnable emfv_ena
{ "MessageMarkAsUnimportant", EM_POPUP_SELECT_MANY|EM_POPUP_SELECT_MARK_UNIMPORTANT },
{ "MessageMarkAsJunk", EM_POPUP_SELECT_MANY|EM_POPUP_SELECT_JUNK },
{ "MessageMarkAsNotJunk", EM_POPUP_SELECT_MANY|EM_POPUP_SELECT_NOT_JUNK },
- { "MessageFollowUpFlag", EM_POPUP_SELECT_MANY },
+ { "MessageFollowUpFlag", EM_POPUP_SELECT_MANY|EM_POPUP_SELECT_FLAG_FOLLOWUP },
+ { "MessageFollowUpComplete", EM_POPUP_SELECT_MANY|EM_POPUP_SELECT_FLAG_COMPLETED },
+ { "MessageFollowUpClear", EM_POPUP_SELECT_MANY|EM_POPUP_SELECT_FLAG_CLEAR },
{ "MessageMove", EM_POPUP_SELECT_MANY },
{ "MessageOpen", EM_POPUP_SELECT_MANY },
{ "MessagePostReply", EM_POPUP_SELECT_ONE },
@@ -1860,6 +1870,12 @@ emfv_enable_menus(EMFolderView *emfv)
bonobo_ui_component_set_prop(emfv->uic, name->str, "sensitive", state?"1":"0", NULL);
}
}
+
+ /* Just Hide/Unhide Junk-Not Junk*/
+ bonobo_ui_component_set_prop(emfv->uic, "/commands/MessageMarkAsJunk", "hidden",
+ *(bonobo_ui_component_get_prop(emfv->uic, "/commands/MessageMarkAsJunk", "sensitive",NULL)) == '1'?"0":"1", NULL);
+ bonobo_ui_component_set_prop(emfv->uic, "/commands/MessageMarkAsNotJunk", "hidden",
+ *(bonobo_ui_component_get_prop(emfv->uic, "/commands/MessageMarkAsNotJunk", "sensitive",NULL)) == '1'?"0":"1", NULL);
g_string_free(name, TRUE);
}
Index: em-utils.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-utils.c,v
retrieving revision 1.68
diff -u -p -r1.68 em-utils.c
--- em-utils.c 18 Oct 2005 08:31:39 -0000 1.68
+++ em-utils.c 21 Dec 2005 04:57:59 -0000
@@ -62,6 +62,7 @@
#include "em-utils.h"
#include "em-composer-utils.h"
+#include "em-folder-view.h"
#include "em-format-quote.h"
#include "em-account-editor.h"
#include "e-attachment.h"
@@ -722,6 +723,7 @@ void em_utils_add_address(struct _GtkWid
/* tag-editor callback data */
struct ted_t {
+ EMFolderView *emfv;
MessageTagEditor *editor;
CamelFolder *folder;
GPtrArray *uids;
@@ -761,6 +763,9 @@ tag_editor_response (GtkWidget *dialog,
camel_folder_thaw (folder);
camel_tag_list_free (&tags);
+
+ if (ted->emfv->preview)
+ em_format_redraw(ted->emfv->preview);
}
gtk_widget_destroy (dialog);
@@ -793,6 +798,7 @@ em_utils_flag_for_followup (GtkWidget *p
camel_object_ref (folder);
ted = g_new (struct ted_t, 1);
+ ted->emfv = (EMFolderView *) parent;
ted->editor = MESSAGE_TAG_EDITOR (editor);
ted->folder = folder;
ted->uids = uids;
? .evolution-mail-message.xml.swp
Index: evolution-mail-message.xml
===================================================================
RCS file: /cvs/gnome/evolution/ui/evolution-mail-message.xml,v
retrieving revision 1.84
diff -u -p -r1.84 evolution-mail-message.xml
--- evolution-mail-message.xml 20 Dec 2005 04:34:12 -0000 1.84
+++ evolution-mail-message.xml 21 Dec 2005 05:56:39 -0000
@@ -372,6 +372,8 @@
<separator f="" name="emaillist2"/>
<menuitem name="MessageFollowUpFlag" verb="" _label="Follow _Up..."/>
+ <menuitem name="MessageFollowUpClear" verb="" _label="_Clear Flag"/>
+ <menuitem name="MessageFollowUpComplete" verb="" _label="_Flag Completed" pixtype="pixbuf"/>
</submenu>
<menuitem name="MessageApplyFilters" verb="" _label="A_pply Filters"/>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]