diff options
author | Milan Crha <mcrha@src.gnome.org> | 2007-08-13 15:27:27 +0800 |
---|---|---|
committer | Milan Crha <mcrha@src.gnome.org> | 2007-08-13 15:27:27 +0800 |
commit | 7701d36a65aba3e183fe30e6a0818c5405eb1f46 (patch) | |
tree | 924b3a5c9f89d8505a700f3f356a5cd6e124c4d0 /mail/em-account-editor.c | |
parent | 861f9931f9a80cbe85105bdf5c2d11b0b18faf17 (diff) | |
download | gsoc2013-evolution-7701d36a65aba3e183fe30e6a0818c5405eb1f46.tar.gz 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.c | 14 |
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) |