aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2002-01-30 15:28:21 +0800
committerMichael Zucci <zucchi@src.gnome.org>2002-01-30 15:28:21 +0800
commitd4c2e5853d0f81347c9bdc2fe94c09717d632fd3 (patch)
tree7c379a21dbd02700e53defcd7ca88aedb5b525b8
parentbfe2921eb857419652124a9e3886b4bf2666c0a1 (diff)
downloadgsoc2013-evolution-d4c2e5853d0f81347c9bdc2fe94c09717d632fd3.tar
gsoc2013-evolution-d4c2e5853d0f81347c9bdc2fe94c09717d632fd3.tar.gz
gsoc2013-evolution-d4c2e5853d0f81347c9bdc2fe94c09717d632fd3.tar.bz2
gsoc2013-evolution-d4c2e5853d0f81347c9bdc2fe94c09717d632fd3.tar.lz
gsoc2013-evolution-d4c2e5853d0f81347c9bdc2fe94c09717d632fd3.tar.xz
gsoc2013-evolution-d4c2e5853d0f81347c9bdc2fe94c09717d632fd3.tar.zst
gsoc2013-evolution-d4c2e5853d0f81347c9bdc2fe94c09717d632fd3.zip
re-enable popup menu. (populate_folder_context_menu): If we're on a
2002-01-30 Not Zed <NotZed@Ximian.com> * component-factory.c (create_component): re-enable popup menu. (populate_folder_context_menu): If we're on a vfolder, and its not UNMATCHED, create a change properties item, and set it up approriately. (change_prop_popup): Callback to edit the vfolder rule. For #3358. svn path=/trunk/; revision=15523
-rw-r--r--mail/ChangeLog9
-rw-r--r--mail/component-factory.c30
2 files changed, 31 insertions, 8 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 02144c733f..2547011c7a 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,12 @@
+2002-01-30 Not Zed <NotZed@Ximian.com>
+
+ * component-factory.c (create_component): re-enable popup menu.
+ (populate_folder_context_menu): If we're on a vfolder, and its not
+ UNMATCHED, create a change properties item, and set it up
+ approriately.
+ (change_prop_popup): Callback to edit the vfolder rule. For
+ #3358.
+
2002-01-29 Dave West <kat@unleashed.org>
* mail-callbacks.c (create_msg_composer): Changed the function
diff --git a/mail/component-factory.c b/mail/component-factory.c
index cfd4478875..b754887c5e 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -420,7 +420,14 @@ xfer_folder (EvolutionShellComponent *shell_component,
camel_url_free(dst);
}
-#if 0
+static void
+configure_folder_popup(BonoboUIComponent *component, void *user_data, const char *cname)
+{
+ char *uri = user_data;
+
+ vfolder_edit_rule(uri);
+}
+
static void
populate_folder_context_menu (EvolutionShellComponent *shell_component,
BonoboUIComponent *uic,
@@ -432,16 +439,23 @@ populate_folder_context_menu (EvolutionShellComponent *shell_component,
static char popup_xml_i18n[] = {N_("Properties..."), N_("Change this folder's properties")};
#endif
static char popup_xml[] =
- "<menuitem name=\"ChangeFolderProperties\" verb=\"ChangeFolderProperties\""
+ "<menuitem name=\"ChangeFolderPropertiesPopUp\" verb=\"ChangeFolderPropertiesPopUp\""
" _label=\"Properties...\" _tip=\"Change this folder's properties\"/>";
-
+
if (strcmp (type, "mail") != 0)
return;
-
- bonobo_ui_component_set_translate (uic, EVOLUTION_SHELL_COMPONENT_POPUP_PLACEHOLDER,
- popup_xml, NULL);
+
+ /* FIXME: handle other types */
+
+ /* the unmatched test is a bit of a hack but it works */
+ if (strncmp(physical_uri, "vfolder:", 8) != 0
+ || strstr(physical_uri, "#" CAMEL_UNMATCHED_NAME) != NULL)
+ return;
+
+ bonobo_ui_component_add_verb_full(uic, "ChangeFolderPropertiesPopUp", configure_folder_popup, g_strdup(physical_uri), g_free);
+
+ bonobo_ui_component_set_translate (uic, EVOLUTION_SHELL_COMPONENT_POPUP_PLACEHOLDER, popup_xml, NULL);
}
-#endif
static char *
get_dnd_selection (EvolutionShellComponent *shell_component,
@@ -938,7 +952,7 @@ create_component (void)
create_folder,
remove_folder,
xfer_folder,
- /*populate_folder_context_menu*/NULL,
+ populate_folder_context_menu,
get_dnd_selection,
NULL);