diff options
author | Not Zed <NotZed@Ximian.com> | 2002-09-11 12:27:23 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2002-09-11 12:27:23 +0800 |
commit | fd67fd43ea2c8e85f13f0f858d36d86f2af10e19 (patch) | |
tree | 4d216cc17ac4d45ca9f5e3d9dea0ad0d2b7d5571 /mail/component-factory.c | |
parent | 4081a13ff156379ad380e0456881f707f1e67831 (diff) | |
download | gsoc2013-evolution-fd67fd43ea2c8e85f13f0f858d36d86f2af10e19.tar.gz gsoc2013-evolution-fd67fd43ea2c8e85f13f0f858d36d86f2af10e19.tar.zst gsoc2013-evolution-fd67fd43ea2c8e85f13f0f858d36d86f2af10e19.zip |
Handle file uri's too.
2002-09-11 Not Zed <NotZed@Ximian.com>
* component-factory.c (configure_folder_popup): Handle file uri's
too.
* mail-callbacks.c (configure_folder): clear message list before
calling configure folder.
(local_configure_done): completion callback to reset message list
when done.
* mail-local.c (mail_local_reconfigure_folder): changed args to
accept uri, and done callback.
(reconfigure_got_folder): moved code to callback which presents
the configure uri once we have the folder.
svn path=/trunk/; revision=18039
Diffstat (limited to 'mail/component-factory.c')
-rw-r--r-- | mail/component-factory.c | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/mail/component-factory.c b/mail/component-factory.c index fdef24dca8..3251a618f6 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -390,7 +390,17 @@ configure_folder_popup(BonoboUIComponent *component, void *user_data, const char { char *uri = user_data; - vfolder_edit_rule(uri); + + if (strncmp(uri, "vfolder:", 8) == 0) + vfolder_edit_rule(uri); + else { + FolderBrowser *fb = folder_browser_factory_get_browser(uri); + + if (fb) + configure_folder(component, fb, cname); + else + mail_local_reconfigure_folder(uri, NULL, NULL); + } } static void @@ -413,13 +423,12 @@ populate_folder_context_menu (EvolutionShellComponent *shell_component, /* 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); + if ((strncmp(physical_uri, "vfolder:", 8) == 0 + && strstr(physical_uri, "#" CAMEL_UNMATCHED_NAME) == NULL) + || strncmp(physical_uri, "file:", 5) == 0) { + 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); + } } static void @@ -435,13 +444,11 @@ unpopulate_folder_context_menu (EvolutionShellComponent *shell_component, /* 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_rm (uic, - EVOLUTION_SHELL_COMPONENT_POPUP_PLACEHOLDER "/ChangeFolderPropertiesPopUp", - NULL); + if ((strncmp(physical_uri, "vfolder:", 8) == 0 + && strstr(physical_uri, "#" CAMEL_UNMATCHED_NAME) == NULL) + || strncmp(physical_uri, "file:", 5) == 0) { + bonobo_ui_component_rm (uic, EVOLUTION_SHELL_COMPONENT_POPUP_PLACEHOLDER "/ChangeFolderPropertiesPopUp", NULL); + } } static char * |