aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-account-editor.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@src.gnome.org>2007-08-13 15:27:27 +0800
committerMilan Crha <mcrha@src.gnome.org>2007-08-13 15:27:27 +0800
commit7701d36a65aba3e183fe30e6a0818c5405eb1f46 (patch)
tree924b3a5c9f89d8505a700f3f356a5cd6e124c4d0 /mail/em-account-editor.c
parent861f9931f9a80cbe85105bdf5c2d11b0b18faf17 (diff)
downloadgsoc2013-evolution-7701d36a65aba3e183fe30e6a0818c5405eb1f46.tar
gsoc2013-evolution-7701d36a65aba3e183fe30e6a0818c5405eb1f46.tar.gz
gsoc2013-evolution-7701d36a65aba3e183fe30e6a0818c5405eb1f46.tar.bz2
gsoc2013-evolution-7701d36a65aba3e183fe30e6a0818c5405eb1f46.tar.lz
gsoc2013-evolution-7701d36a65aba3e183fe30e6a0818c5405eb1f46.tar.xz
gsoc2013-evolution-7701d36a65aba3e183fe30e6a0818c5405eb1f46.tar.zst
gsoc2013-evolution-7701d36a65aba3e183fe30e6a0818c5405eb1f46.zip
2007-08-13 mcrha Fix for bug #352346
svn path=/trunk/; revision=33995
Diffstat (limited to 'mail/em-account-editor.c')
-rw-r--r--mail/em-account-editor.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index ce82449fa7..5fd986d938 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -1665,8 +1665,18 @@ emae_setup_service(EMAccountEditor *emae, EMAccountEditorService *service, Glade
}
if (url->user)
gtk_entry_set_text(service->username, url->user);
- if (service->pathentry && url->path)
- gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (service->pathentry), url->path);
+ if (service->pathentry) {
+ GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER;
+
+ if (service->provider && (service->provider->url_flags & CAMEL_URL_NEED_PATH_DIR) == 0)
+ action = GTK_FILE_CHOOSER_ACTION_OPEN;
+
+ if (action != gtk_file_chooser_get_action (GTK_FILE_CHOOSER (service->pathentry)))
+ gtk_file_chooser_set_action (GTK_FILE_CHOOSER (service->pathentry), action);
+
+ if (url->path)
+ gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (service->pathentry), url->path);
+ }
tmp = camel_url_get_param(url, "use_ssl");
if (tmp == NULL)