diff options
author | Daniel Gryniewicz <dang@gentoo.org> | 2006-11-28 02:49:11 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2006-11-28 02:49:11 +0800 |
commit | 6395ec0243694ee6677e65c4d5fef0731d7c7e86 (patch) | |
tree | 35b199198b2bcd4b31c2883feb8ab408c12b2ce6 /e-util/e-util.c | |
parent | 97585dc9f97faf21762939ef107eba756a47ef63 (diff) | |
download | gsoc2013-evolution-6395ec0243694ee6677e65c4d5fef0731d7c7e86.tar.gz gsoc2013-evolution-6395ec0243694ee6677e65c4d5fef0731d7c7e86.tar.zst gsoc2013-evolution-6395ec0243694ee6677e65c4d5fef0731d7c7e86.zip |
** Fix for bug #349966
2006-11-28 Daniel Gryniewicz <dang@gentoo.org>
** Fix for bug #349966
svn path=/trunk/; revision=33026
Diffstat (limited to 'e-util/e-util.c')
-rw-r--r-- | e-util/e-util.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/e-util/e-util.c b/e-util/e-util.c index d213296041..5d854e0d51 100644 --- a/e-util/e-util.c +++ b/e-util/e-util.c @@ -1187,4 +1187,45 @@ get_font_options () return font_options; } +/** + * e_file_update_save_path: + * @uri: URI to store + * @free: If TRUE, free uri + * + * Save the save_dir path for evolution. If free is TRUE, uri gets freed when + * done. Genearally, this should be called with the output of + * gtk_file_chooser_get_current_folder_uri() The URI must be a path URI, not a + * file URI. + **/ +void +e_file_update_save_path(char *uri, gboolean free) +{ + GConfClient *gconf = gconf_client_get_default(); + + gconf_client_set_string(gconf, "/apps/evolution/mail/save_dir", uri, NULL); + g_object_unref(gconf); + if (free) + g_free(uri); +} + +/** + * e_file_get_save_path: + * + * Return the save_dir path for evolution. If there isn't a save_dir, returns + * the users home directory. Returns an allocated URI that should be freed by + * the caller. + **/ +char * +e_file_get_save_path(void) +{ + GConfClient *gconf = gconf_client_get_default(); + char *uri; + + uri = gconf_client_get_string(gconf, "/apps/evolution/mail/save_dir", NULL); + g_object_unref(gconf); + + if (uri == NULL) + uri = gnome_vfs_get_uri_from_local_path(g_get_home_dir()); + return (uri); +} |