aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/groupwise-features/ChangeLog12
-rw-r--r--plugins/groupwise-features/org-gnome-groupwise-features.eplug.xml10
-rw-r--r--plugins/groupwise-features/share-folder-common.c39
3 files changed, 51 insertions, 10 deletions
diff --git a/plugins/groupwise-features/ChangeLog b/plugins/groupwise-features/ChangeLog
index b0273e2871..e3bc30d0c6 100644
--- a/plugins/groupwise-features/ChangeLog
+++ b/plugins/groupwise-features/ChangeLog
@@ -1,4 +1,14 @@
-23-05-2005 Vivek Jain <jvivek@novell.com>
+2005-05-24 Vivek Jain <jvivek@novell.com>
+
+ * org-gnome-groupwise-features.eplug.xml:
+ removed "Item" tag entries, included a factory method
+
+ * shared-folder-common.c: changed callback (org_gnome_create_option)
+ to a factory method, check uri before adding the option to the menu.
+ New folder dialog now comes in another callback (create_shared_folder)
+ also added a function to free the item list.
+
+2005-05-23 Vivek Jain <jvivek@novell.com>
Created a plugin "groupwise-features" which is a consolidation of
following existing plugins
diff --git a/plugins/groupwise-features/org-gnome-groupwise-features.eplug.xml b/plugins/groupwise-features/org-gnome-groupwise-features.eplug.xml
index 504fa39a36..18b4ea35ce 100644
--- a/plugins/groupwise-features/org-gnome-groupwise-features.eplug.xml
+++ b/plugins/groupwise-features/org-gnome-groupwise-features.eplug.xml
@@ -6,7 +6,7 @@
<author name="Vivek Jain" email="jvivek@novell.com" />
<author name="Chenthill Palanisamy" email="pchenthill@novell.com"/>
<author name="Parthasarathi Susarla" email="sparthasarathi@novell.com"/>
- <_description>A consolidated plugin for the features in Groupwise accounts.</_description>
+ <_description>A plugin for the features in Groupwise accounts.</_description>
<hook class="org.gnome.evolution.mail.config:1.0">
<group id="org.gnome.evolution.mail.config.accountDruid" target="account">
<item
@@ -55,13 +55,7 @@
handle="org_gnome_popup_wizard"/>
</hook>
<hook class="org.gnome.evolution.mail.popup:1.0">
- <menu id="org.gnome.evolution.mail.foldertree.popup" target="folder">
- <item
- type="item"
- path="20.emc.00"
- label="_New Shared Folder"
- activate="org_gnome_create_option"
- enable="delete" visible="delete"/>
+ <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">
<item
diff --git a/plugins/groupwise-features/share-folder-common.c b/plugins/groupwise-features/share-folder-common.c
index 388ec39260..cde5069a34 100644
--- a/plugins/groupwise-features/share-folder-common.c
+++ b/plugins/groupwise-features/share-folder-common.c
@@ -60,6 +60,8 @@ struct ShareInfo {
GtkWidget * org_gnome_shared_folder_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_data);
void org_gnome_create_option(EPlugin *ep, EMPopupTargetFolder *target);
+static void create_shared_folder(EPopup *ep, EPopupItem *p, void *data);
+static void popup_free (EPopup *ep, GSList *items, void *data);
void shared_folder_commit (EPlugin *ep, EConfigTarget *tget);
void shared_folder_abort (EPlugin *ep, EConfigTarget *target);
@@ -331,8 +333,43 @@ new_folder_response (EMFolderSelector *emfs, int response, EMFolderTreeModel *mo
}
+static EPopupItem popup_items[] = {
+{ E_POPUP_ITEM, "20.emc.001", N_("New _Shared Folder..."), create_shared_folder, NULL, "stock_new-dir", 0, EM_POPUP_FOLDER_INFERIORS }
+};
+
+static void
+popup_free (EPopup *ep, GSList *items, void *data)
+{
+g_slist_free (items);
+}
+
void
-org_gnome_create_option(EPlugin *ep, EMPopupTargetFolder *target)
+org_gnome_create_option(EPlugin *ep, EMPopupTargetFolder *t)
+{
+ GSList *menus = NULL;
+ int i = 0;
+ static int first =1;
+
+ if (! g_strrstr (t->uri, "groupwise://"))
+ 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, NULL);
+
+}
+
+static void
+create_shared_folder(EPopup *ep, EPopupItem *p, void *data)
{
EMFolderTreeModel *model;