diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 6 | ||||
-rw-r--r-- | mail/folder-browser-ui.c | 20 |
2 files changed, 24 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index c0703762d8..dd878dc2d1 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2001-10-04 <NotZed@Ximian.com> + + * folder-browser-ui.c (folder_browser_setup_property_menu): Do a + better job of setting up the name. Also de-sensitise when we + can't configure the folder. + 2001-10-04 Jeffrey Stedfast <fejj@ximian.com> * mail-callbacks.c (providers_config): Set the parent window as diff --git a/mail/folder-browser-ui.c b/mail/folder-browser-ui.c index 662fd98de3..2229c240b4 100644 --- a/mail/folder-browser-ui.c +++ b/mail/folder-browser-ui.c @@ -253,9 +253,15 @@ folder_browser_setup_property_menu (FolderBrowser *fb, BonoboUIComponent *uic) { char *name, *base = NULL; + CamelURL *url; - if (fb->uri) - base = g_basename (fb->uri); + url = camel_url_new(fb->uri, NULL); + if (url) { + if (url->fragment) + base = g_basename(url->fragment); + else + base = g_basename(url->path); + } if (base && base [0] != 0) name = g_strdup_printf (_("Properties for \"%s\""), base); @@ -266,6 +272,16 @@ folder_browser_setup_property_menu (FolderBrowser *fb, uic, "/menu/File/Folder/ComponentPlaceholder/ChangeFolderProperties", "label", name, NULL); g_free (name); + + if (url) + camel_url_free(url); + + if (strncmp(fb->uri, "vfolder:", 8) == 0 || strncmp(fb->uri, "file:", 5) == 0) + name = "1"; + else + name = "0"; + bonobo_ui_component_set_prop (uic, "/commands/ChangeFolderProperties", "sensitive", name, NULL); + } /* Must be in the same order as MailConfigDisplayStyle */ |