[evolution-patches] patch to fix #311721 (groupwise-features plugin)
- From: Vivek Jain <jvivek novell com>
- To: evo-patches <evolution-patches lists ximian com>
- Subject: [evolution-patches] patch to fix #311721 (groupwise-features plugin)
- Date: Thu, 28 Jul 2005 19:38:56 +0530
hi,
The attached patch fixes
http://bugzilla.gnome.org/show_bug.cgi?id=311721
In addition to this bug fix, the menu item for "Track Message Status"
will now be appearing only in the groupwise accounts.
Thanks,
Vivek Jain
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/plugins/groupwise-features/ChangeLog,v
retrieving revision 1.19
diff -u -p -r1.19 ChangeLog
--- ChangeLog 25 Jul 2005 05:00:45 -0000 1.19
+++ ChangeLog 28 Jul 2005 14:11:09 -0000
@@ -1,3 +1,13 @@
+2005-07-28 Vivek Jain <jvivek novell com>
+
+ * org-gnome-groupwise-features.eplug.xml:
+ for status strack removed "Item" tag entries, included a factory method
+
+ * status-track.c : new function (track_status): does the actual work
+ (org_gnome_track_status): converted to
+ factory method to add the item
+ **Fixes #311721
+
2005-07-23 Chenthill Palanisamy <pchenthill novell com>
* Makefile.am: Added the new file process-meeting.c
Index: org-gnome-groupwise-features.eplug.xml
===================================================================
RCS file: /cvs/gnome/evolution/plugins/groupwise-features/org-gnome-groupwise-features.eplug.xml,v
retrieving revision 1.9
diff -u -p -r1.9 org-gnome-groupwise-features.eplug.xml
--- org-gnome-groupwise-features.eplug.xml 25 Jul 2005 05:00:45 -0000 1.9
+++ org-gnome-groupwise-features.eplug.xml 28 Jul 2005 14:11:09 -0000
@@ -43,15 +43,7 @@
<menu id="org.gnome.evolution.mail.foldertree.popup" target="folder" factory = "org_gnome_create_option">
</menu>
<menu id="org.gnome.evolution.mail.folderview.popup" target="select" factory = "org_gnome_junk_settings"/>
- <menu id="org.gnome.evolution.mail.folderview.popup" target="select">
- <item
- type="item"
- path="21.gw_status_tracking"
- label="Track Message Status"
- enable="one"
- visible="one"
- activate="org_gnome_track_status"/>
- </menu>
+ <menu id="org.gnome.evolution.mail.folderview.popup" target="select" factory = "org_gnome_track_status"/>
</hook>
<hook class="org.gnome.evolution.addressbook.config:1.0">
<group
Index: status-track.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/groupwise-features/status-track.c,v
retrieving revision 1.1
diff -u -p -r1.1 status-track.c
--- status-track.c 23 May 2005 09:44:26 -0000 1.1
+++ status-track.c 28 Jul 2005 14:11:09 -0000
@@ -32,7 +32,8 @@
#include "camel/camel-folder.h"
#include "camel/camel-medium.h"
#include "camel/camel-mime-message.h"
-#include "mail/em-popup.h"
+#include <mail/em-popup.h>
+#include <mail/em-folder-view.h>
#include <e-gw-connection.h>
@@ -68,13 +69,10 @@ add_detail (GtkTable *table, char *label
row++;
return row ;
}
-/*
- * The format for the options is:
- * 0 1 2 3 4 5 6 7 8 9
- * X-gw-status-opt: /TO/CC/BCC;name;email;delivered;opened;accepted;deleted;declined;completed;undelivered::
- */
-void org_gnome_track_status (void *ep, EMPopupTargetSelect *t)
+static void
+track_status (EPopup *ep, EPopupItem *item, void *data)
{
+ EMPopupTargetSelect *t = (EMPopupTargetSelect *)data;
CamelMimeMessage *msg = NULL ;
const CamelInternetAddress *from ;
const char *namep, *addp ;
@@ -94,17 +92,6 @@ void org_gnome_track_status (void *ep, E
int row = 0;
/*check if it is a groupwise account*/
- str = strstr (t->uri, "groupwise") ;
- if (!str) {
- g_warning ("Status tracking available for groupwise account only") ;
- return ;
- }
- str = strstr (t->uri, "Sent Items") ;
- if (!str) {
- g_warning ("Status tracking available for a sent folder only") ;
- return ;
- }
-
/*Get message*/
msg = camel_folder_get_message (t->folder, g_ptr_array_index (t->uids, 0), NULL);
if (!msg) {
@@ -234,4 +221,45 @@ void org_gnome_track_status (void *ep, E
g_strfreev (temp1) ;
+}
+
+/*
+ * The format for the options is:
+ * 0 1 2 3 4 5 6 7 8 9
+ * X-gw-status-opt: /TO/CC/BCC;name;email;delivered;opened;accepted;deleted;declined;completed;undelivered::
+ */
+
+static EPopupItem popup_items[] = {
+{ E_POPUP_ITEM, "50.emfv.05", N_("Track Message Status..."), track_status, NULL, NULL, 0, EM_POPUP_SELECT_ONE|EM_FOLDER_VIEW_SELECT_LISTONLY}
+};
+
+static void
+popup_free (EPopup *ep, GSList *items, void *data)
+{
+g_slist_free (items);
+}
+
+void org_gnome_track_status (void *ep, EMPopupTargetSelect *t)
+{
+ GSList *menus = NULL;
+
+ int i = 0;
+ static int first = 0;
+
+ if (! g_strrstr (t->uri, "groupwise://") || g_ascii_strncasecmp ((t->folder)->full_name, "Sent Items", 10))
+ return;
+
+ /* for translation*/
+ if (!first) {
+ popup_items[0].label = _(popup_items[0].label);
+
+ }
+
+ first++;
+
+ for (i = 0; i < sizeof (popup_items) / sizeof (popup_items[0]); i++)
+ menus = g_slist_prepend (menus, &popup_items[i]);
+
+ e_popup_add_items (t->target.popup, menus, NULL, popup_free, t);
+
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]