aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/publish-calendar/publish-calendar.c
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2007-09-10 05:05:57 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2007-09-10 05:05:57 +0800
commitff3ee70182b39c2f50b26ed096fd934de9497a60 (patch)
tree82dc18cec77b5ba1202577e0971d977387533d7d /plugins/publish-calendar/publish-calendar.c
parent0245574d7861af23f7d1cde9f3208f0eb7581c21 (diff)
downloadgsoc2013-evolution-ff3ee70182b39c2f50b26ed096fd934de9497a60.tar
gsoc2013-evolution-ff3ee70182b39c2f50b26ed096fd934de9497a60.tar.gz
gsoc2013-evolution-ff3ee70182b39c2f50b26ed096fd934de9497a60.tar.bz2
gsoc2013-evolution-ff3ee70182b39c2f50b26ed096fd934de9497a60.tar.lz
gsoc2013-evolution-ff3ee70182b39c2f50b26ed096fd934de9497a60.tar.xz
gsoc2013-evolution-ff3ee70182b39c2f50b26ed096fd934de9497a60.tar.zst
gsoc2013-evolution-ff3ee70182b39c2f50b26ed096fd934de9497a60.zip
Fixes #274048 (bnc)
svn path=/trunk/; revision=34207
Diffstat (limited to 'plugins/publish-calendar/publish-calendar.c')
-rw-r--r--plugins/publish-calendar/publish-calendar.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/plugins/publish-calendar/publish-calendar.c b/plugins/publish-calendar/publish-calendar.c
index 6e1e3f9cb6..742d64da3f 100644
--- a/plugins/publish-calendar/publish-calendar.c
+++ b/plugins/publish-calendar/publish-calendar.c
@@ -70,6 +70,8 @@ publish (EPublishUri *uri)
GnomeVFSResult result;
GnomeVFSHandle *handle;
gchar *password;
+ const char *username;
+ gboolean req_pass = FALSE;
if (g_slist_find (queued_publishes, uri))
queued_publishes = g_slist_remove (queued_publishes, uri);
@@ -80,6 +82,21 @@ publish (EPublishUri *uri)
vfs_uri = gnome_vfs_uri_new (uri->location);
password = e_passwords_get_password ("Calendar", uri->location);
+ username = gnome_vfs_uri_get_user_name (vfs_uri);
+ req_pass = ((username && *username) && !(uri->service_type == TYPE_ANON_FTP &&
+ !strcmp (username, "anonymous"))) ? TRUE:FALSE;
+
+ if (!password && req_pass) {
+ gboolean remember;
+ char *prompt = g_strdup_printf (_("Enter the password for %s"), uri->location);
+
+ password = e_passwords_ask_password (_("Enter password"), "", uri->location, prompt,
+ E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET|E_PASSWORDS_ONLINE,
+ &remember,
+ NULL);
+ g_free (prompt);
+ }
+
gnome_vfs_uri_set_password (vfs_uri, password);
if (vfs_uri == NULL) {