aboutsummaryrefslogtreecommitdiffstats
path: root/mail/component-factory.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2002-07-15 10:06:46 +0800
committerMichael Zucci <zucchi@src.gnome.org>2002-07-15 10:06:46 +0800
commit393fa3c3e84b73dc591fa4481bcf2731dc640157 (patch)
tree3dab076406b9611fd5fa3eb7b77289c99f6136a5 /mail/component-factory.c
parent68ec840bca073bc8e8ea2f58ad36078df9c619c1 (diff)
downloadgsoc2013-evolution-393fa3c3e84b73dc591fa4481bcf2731dc640157.tar
gsoc2013-evolution-393fa3c3e84b73dc591fa4481bcf2731dc640157.tar.gz
gsoc2013-evolution-393fa3c3e84b73dc591fa4481bcf2731dc640157.tar.bz2
gsoc2013-evolution-393fa3c3e84b73dc591fa4481bcf2731dc640157.tar.lz
gsoc2013-evolution-393fa3c3e84b73dc591fa4481bcf2731dc640157.tar.xz
gsoc2013-evolution-393fa3c3e84b73dc591fa4481bcf2731dc640157.tar.zst
gsoc2013-evolution-393fa3c3e84b73dc591fa4481bcf2731dc640157.zip
** fixes for #10781
2002-07-10 Not Zed <NotZed@Ximian.com> ** fixes for #10781 * mail-callbacks.c (filter_edit): Add back a cancel button. We dont need to do anything special to 'undo' here, as the rules are loaded every time they're used. * mail-vfolder.c (vfolder_editor_clicked): If ok wans't clicked, revert the ruleset. (vfolder_editor_destroy): Fake a button of -1 if we get destroyed with no click. (context_rule_removed): Unref the folder after we delete it. If we're the last ref to the folder, unrefing it means it no longer exist,s which means no delte processing occurs ... svn path=/trunk/; revision=17449
Diffstat (limited to 'mail/component-factory.c')
-rw-r--r--mail/component-factory.c52
1 files changed, 46 insertions, 6 deletions
diff --git a/mail/component-factory.c b/mail/component-factory.c
index 7fe2a4e8a1..6c677c1874 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -385,11 +385,16 @@ xfer_folder (EvolutionShellComponent *shell_component,
camel_url_free(dst);
}
+static char *configure_folder_uri;
+static FolderBrowser *configure_folder_browser;
+
static void
configure_folder_popup(BonoboUIComponent *component, void *user_data, const char *cname)
{
char *uri = user_data;
+ return;
+
vfolder_edit_rule(uri);
}
@@ -406,20 +411,55 @@ populate_folder_context_menu (EvolutionShellComponent *shell_component,
static char popup_xml[] =
"<menuitem name=\"ChangeFolderPropertiesPopUp\" verb=\"ChangeFolderPropertiesPopUp\""
" _label=\"Properties...\" _tip=\"Change this folder's properties\"/>";
+ static int setup = FALSE;
+ int add;
- if (strcmp (type, "mail") != 0)
- return;
+ if (!setup) {
+ setup = TRUE;
+ bonobo_ui_component_set_translate (uic, EVOLUTION_SHELL_COMPONENT_POPUP_PLACEHOLDER, popup_xml, NULL);
+ bonobo_ui_component_add_verb_full(uic, "ChangeFolderPropertiesPopUp", configure_folder_popup, NULL, NULL);
+ }
+
+ if (strncmp(physical_uri, "file:", 5) == 0) {
+ add = folder_browser_factory_get_browser(physical_uri) != NULL;
+ } else if ((strncmp(physical_uri, "vfolder:", 8) == 0
+ && strstr(physical_uri, "#" CAMEL_UNMATCHED_NAME) == NULL)) {
+ add = TRUE;
+ } else {
+ add = FALSE;
+ }
+
+ printf("popup!!! url = '%s' add = %s\n", physical_uri, add?"TRUE":"FALSE");
+
+ bonobo_ui_component_set_prop(uic, EVOLUTION_SHELL_COMPONENT_POPUP_PLACEHOLDER "/ChangeFolderPropertiesPopUp", "sensitive", add?"1":"0", NULL);
+
+#if 0
+
+ { static int shit = 0;
+ shit++;
+ }
/* 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)
+ if (strncmp(physical_uri, "file:", 5) == 0) {
+ FolderBrowser *fb = folder_browser_factory_get_browser(physical_uri);
+ if (fb) {
+ printf("folderbrowser = %s\n", fb->uri);
+ gtk_object_ref((GtkObject *)fb);
+ bonobo_ui_component_add_verb_full(uic, "ChangeFolderPropertiesPopUp", configure_folder, fb, gtk_object_unref);
+ } else
+ return;
+ } else if ((strncmp(physical_uri, "vfolder:", 8) == 0
+ && strstr(physical_uri, "#" CAMEL_UNMATCHED_NAME) == NULL)) {
+ bonobo_ui_component_add_verb_full(uic, "ChangeFolderPropertiesPopUp", configure_folder_popup, g_strdup(physical_uri), g_free);
+ } else {
+ printf("doing nothing\n");
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 *