aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/em-account-editor.c14
-rw-r--r--mail/em-migrate.c37
-rw-r--r--mail/mail-config.glade1
4 files changed, 57 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 069f5910a9..44dd91a430 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,11 @@
+2007-08-13 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #352346
+
+ * em-migrate.c (em_update_accounts_2_11), (em_migrate):
+ Added function to change "spool" to "spooldir" for those
+ spools which points on directories.
+
2007-08-13 Johnny Jacob <jjohnny@novell.com>
** Fix for #458498 from Lucky Wankhede <wlakke@novell.com>
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)
diff --git a/mail/em-migrate.c b/mail/em-migrate.c
index 09aa497b61..82109a1f3c 100644
--- a/mail/em-migrate.c
+++ b/mail/em-migrate.c
@@ -2639,6 +2639,39 @@ em_migrate_1_4 (const char *evolution_dir, xmlDocPtr filters, xmlDocPtr vfolders
return 0;
}
+static void
+em_update_accounts_2_11 (void)
+{
+ EAccountList *accounts;
+ EIterator *iter;
+ gboolean changed = FALSE;
+
+ if (!(accounts = mail_config_get_accounts ()))
+ return;
+
+ iter = e_list_get_iterator ((EList *) accounts);
+ while (e_iterator_is_valid (iter)) {
+ EAccount *account = (EAccount *) e_iterator_get (iter);
+
+ if (g_str_has_prefix (account->source->url, "spool://")) {
+ if (g_file_test (account->source->url + 8, G_FILE_TEST_IS_DIR)) {
+ char *str = g_strdup_printf ("spooldir://%s", account->source->url + 8);
+
+ g_free (account->source->url);
+ account->source->url = str;
+ changed = TRUE;
+ }
+ }
+
+ e_iterator_next (iter);
+ }
+
+ g_object_unref (iter);
+
+ if (changed)
+ mail_config_save_accounts ();
+}
+
#endif
static int
@@ -2777,6 +2810,10 @@ em_migrate (const char *evolution_dir, int major, int minor, int revision, Camel
g_free (path);
}
+
+ if (major < 2 || (major == 2 && minor < 12)) {
+ em_update_accounts_2_11 ();
+ }
#endif /* !G_OS_WIN32 */
return 0;
}
diff --git a/mail/mail-config.glade b/mail/mail-config.glade
index fc8699093f..d5e336f8cf 100644
--- a/mail/mail-config.glade
+++ b/mail/mail-config.glade
@@ -1354,7 +1354,6 @@ For example: &quot;Work&quot; or &quot;Personal&quot;</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>