aboutsummaryrefslogtreecommitdiffstats
path: root/mail/folder-browser-ui.c
diff options
context:
space:
mode:
author4 <NotZed@Ximian.com>2001-10-05 07:42:30 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-10-05 07:42:30 +0800
commit911659c6341a5376af81e7298219c0287c851ecc (patch)
treee25e97fdae2076464266247d84324f819aa32c19 /mail/folder-browser-ui.c
parentbe961e47161f6db1b942db5816a06777a18e935b (diff)
downloadgsoc2013-evolution-911659c6341a5376af81e7298219c0287c851ecc.tar.gz
gsoc2013-evolution-911659c6341a5376af81e7298219c0287c851ecc.tar.zst
gsoc2013-evolution-911659c6341a5376af81e7298219c0287c851ecc.zip
Do a better job of setting up the name. Also de-sensitise when we can't
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. svn path=/trunk/; revision=13427
Diffstat (limited to 'mail/folder-browser-ui.c')
-rw-r--r--mail/folder-browser-ui.c20
1 files changed, 18 insertions, 2 deletions
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 */