aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-setup.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2002-04-11 03:01:14 +0800
committerDan Winship <danw@src.gnome.org>2002-04-11 03:01:14 +0800
commit8ded5c9c10e4079fded6889ec4b10c37226468d4 (patch)
tree46bc039454a21d53d478af5f069816b2e4f872a5 /shell/e-setup.c
parenteaeb675f415f5f672cdcd5b4774356d1ca383fa1 (diff)
downloadgsoc2013-evolution-8ded5c9c10e4079fded6889ec4b10c37226468d4.tar
gsoc2013-evolution-8ded5c9c10e4079fded6889ec4b10c37226468d4.tar.gz
gsoc2013-evolution-8ded5c9c10e4079fded6889ec4b10c37226468d4.tar.bz2
gsoc2013-evolution-8ded5c9c10e4079fded6889ec4b10c37226468d4.tar.lz
gsoc2013-evolution-8ded5c9c10e4079fded6889ec4b10c37226468d4.tar.xz
gsoc2013-evolution-8ded5c9c10e4079fded6889ec4b10c37226468d4.tar.zst
gsoc2013-evolution-8ded5c9c10e4079fded6889ec4b10c37226468d4.zip
Shell config page routines. Right now handles the default folders page.
* e-shell-config.c: Shell config page routines. Right now handles the default folders page. * glade/e-shell-config-default-folders.glade: New. * GNOME_Evolution_Shell.oaf.in: Add info for the default folders config page. * main.c (idle_cb): If we successfully registered the shell, register the config factory. * evolution-shell-client.c (evolution_shell_client_new): Note the fact that it frees the corba_shell when it is destroyed. * evolution-folder-selector-button.c (evolution_folder_selector_button_construct, destroy): Use bonobo_object_ref/unref on the shell client, not gtk. * e-shell.c (e_shell_construct): Pass local_directory to e_setup_check_db. (handle_default_uri): Fix the config db paths here to match the other routines. * e-setup.c (e_setup_check_db): Make this take the evolution directory path as well so we can properly set up file: URIs for the default folders. svn path=/trunk/; revision=16423
Diffstat (limited to 'shell/e-setup.c')
-rw-r--r--shell/e-setup.c46
1 files changed, 31 insertions, 15 deletions
diff --git a/shell/e-setup.c b/shell/e-setup.c
index 088aa010c2..b3d41509c4 100644
--- a/shell/e-setup.c
+++ b/shell/e-setup.c
@@ -41,6 +41,7 @@
#include <gal/widgets/e-gui-utils.h>
#include "e-local-folder.h"
+#include "e-shell-config.h"
#include "e-shell-constants.h"
#include "e-setup.h"
@@ -417,26 +418,41 @@ e_setup (const char *evolution_directory)
void
-e_setup_check_db (Bonobo_ConfigDatabase db)
+e_setup_check_db (Bonobo_ConfigDatabase db, const char *evolution_directory)
{
- gboolean def;
+ char *uri;
- if (bonobo_config_get_string_with_default (db, "/DefaultFolder/mail_path", NULL, &def) == NULL) {
- bonobo_config_set_string (db, "/DefaultFolder/mail_path",
+ if (bonobo_config_get_string_with_default (db, "/DefaultFolders/mail_path", NULL, NULL) == NULL) {
+ bonobo_config_set_string (db, "/DefaultFolders/mail_path",
E_LOCAL_INBOX_URI, NULL);
- bonobo_config_set_string (db, "/DefaultFolder/mail_uri",
- E_LOCAL_INBOX_URI, NULL);
- bonobo_config_set_string (db, "/DefaultFolder/contacts_path",
- E_LOCAL_CONTACTS_URI, NULL);
- bonobo_config_set_string (db, "/DefaultFolder/contacts_uri",
+ uri = g_strconcat ("file://", evolution_directory, "/local",
+ strrchr (E_LOCAL_INBOX_URI, '/'), NULL);
+ bonobo_config_set_string (db, "/DefaultFolders/mail_uri",
+ uri, NULL);
+ g_free (uri);
+
+ bonobo_config_set_string (db, "/DefaultFolders/contacts_path",
E_LOCAL_CONTACTS_URI, NULL);
- bonobo_config_set_string (db, "/DefaultFolder/calendar_path",
- E_LOCAL_CALENDAR_URI, NULL);
- bonobo_config_set_string (db, "/DefaultFolder/calendar_uri",
+ uri = g_strconcat ("file://", evolution_directory, "/local",
+ strrchr (E_LOCAL_CONTACTS_URI, '/'), NULL);
+ bonobo_config_set_string (db, "/DefaultFolders/contacts_uri",
+ uri, NULL);
+ g_free (uri);
+
+ bonobo_config_set_string (db, "/DefaultFolders/calendar_path",
E_LOCAL_CALENDAR_URI, NULL);
- bonobo_config_set_string (db, "/DefaultFolder/tasks_path",
- E_LOCAL_TASKS_URI, NULL);
- bonobo_config_set_string (db, "/DefaultFolder/tasks_uri",
+ uri = g_strconcat ("file://", evolution_directory, "/local",
+ strrchr (E_LOCAL_CALENDAR_URI, '/'), NULL);
+ bonobo_config_set_string (db, "/DefaultFolders/calendar_uri",
+ uri, NULL);
+ g_free (uri);
+
+ bonobo_config_set_string (db, "/DefaultFolders/tasks_path",
E_LOCAL_TASKS_URI, NULL);
+ uri = g_strconcat ("file://", evolution_directory, "/local",
+ strrchr (E_LOCAL_TASKS_URI, '/'), NULL);
+ bonobo_config_set_string (db, "/DefaultFolders/tasks_uri",
+ uri, NULL);
+ g_free (uri);
}
}