diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-07-29 04:47:39 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-07-29 04:47:39 +0800 |
commit | eb5afa335d683032c801981d936d8a8063675805 (patch) | |
tree | afd035d66fe9afed982e5f289aad8015a3da467a /shell/e-shell-migrate.c | |
parent | 125e67bfcb57de9a7b834475ac78ea3986e912a1 (diff) | |
download | gsoc2013-evolution-eb5afa335d683032c801981d936d8a8063675805.tar gsoc2013-evolution-eb5afa335d683032c801981d936d8a8063675805.tar.gz gsoc2013-evolution-eb5afa335d683032c801981d936d8a8063675805.tar.bz2 gsoc2013-evolution-eb5afa335d683032c801981d936d8a8063675805.tar.lz gsoc2013-evolution-eb5afa335d683032c801981d936d8a8063675805.tar.xz gsoc2013-evolution-eb5afa335d683032c801981d936d8a8063675805.tar.zst gsoc2013-evolution-eb5afa335d683032c801981d936d8a8063675805.zip |
More XDG base directory migration tweaks.
Diffstat (limited to 'shell/e-shell-migrate.c')
-rw-r--r-- | shell/e-shell-migrate.c | 50 |
1 files changed, 18 insertions, 32 deletions
diff --git a/shell/e-shell-migrate.c b/shell/e-shell-migrate.c index f8e7e21794..4e938ef1f6 100644 --- a/shell/e-shell-migrate.c +++ b/shell/e-shell-migrate.c @@ -229,6 +229,24 @@ shell_xdg_migrate_config_dir_common (EShell *shell, g_free (old_filename); g_free (new_filename); + /* This one only occurs in calendar and memos. + * For other backends this will just be a no-op. */ + old_filename = g_build_filename ( + old_config_dir, "config", "MemoPad", NULL); + new_filename = g_build_filename (new_config_dir, "MemoPad", NULL); + shell_xdg_migrate_rename (old_filename, new_filename); + g_free (old_filename); + g_free (new_filename); + + /* This one only occurs in calendar and tasks. + * For other backends this will just be a no-op. */ + old_filename = g_build_filename ( + old_config_dir, "config", "TaskPad", NULL); + new_filename = g_build_filename (new_config_dir, "TaskPad", NULL); + shell_xdg_migrate_rename (old_filename, new_filename); + g_free (old_filename); + g_free (new_filename); + /* Subtle name change: config/state --> state.ini */ old_filename = g_build_filename (old_config_dir, "config", "state", NULL); new_filename = g_build_filename (new_config_dir, "state.ini", NULL); @@ -270,37 +288,6 @@ shell_xdg_migrate_config_dir_common (EShell *shell, } static void -shell_xdg_migrate_config_dir_calendar (EShell *shell, - const gchar *old_base_dir) -{ - const gchar *user_config_dir; - gchar *old_config_dir; - gchar *new_config_dir; - gchar *old_filename; - gchar *new_filename; - - user_config_dir = e_get_user_config_dir (); - - old_config_dir = g_build_filename (old_base_dir, "calendar", NULL); - new_config_dir = g_build_filename (user_config_dir, "calendar", NULL); - - old_filename = g_build_filename (old_config_dir, "config", "TaskPad", NULL); - new_filename = g_build_filename (new_config_dir, "TaskPad", NULL); - shell_xdg_migrate_rename (old_filename, new_filename); - g_free (old_filename); - g_free (new_filename); - - old_filename = g_build_filename (old_config_dir, "config", "MemoPad", NULL); - new_filename = g_build_filename (new_config_dir, "MemoPad", NULL); - shell_xdg_migrate_rename (old_filename, new_filename); - g_free (old_filename); - g_free (new_filename); - - g_free (old_config_dir); - g_free (new_config_dir); -} - -static void shell_xdg_migrate_config_dir_mail (EShell *shell, const gchar *old_base_dir) { @@ -380,7 +367,6 @@ shell_xdg_migrate_config_dir (EShell *shell, shell, old_base_dir, shell_backend_names[ii]); /* Handle backend-specific files. */ - shell_xdg_migrate_config_dir_calendar (shell, old_base_dir); shell_xdg_migrate_config_dir_mail (shell, old_base_dir); /* Remove leftover "config" directories. */ |