aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/folder-browser-ui.c20
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 */