From 911659c6341a5376af81e7298219c0287c851ecc Mon Sep 17 00:00:00 2001 From: 4 Date: Thu, 4 Oct 2001 23:42:30 +0000 Subject: Do a better job of setting up the name. Also de-sensitise when we can't 2001-10-04 * 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. svn path=/trunk/; revision=13427 --- mail/ChangeLog | 6 ++++++ 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 + + * 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 * 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 */ -- cgit v1.2.3