New. Check that things that need to be in the config db are. Right now it
* e-setup.c (e_setup_check_db): New. Check that things that need to be in the config db are. Right now it sets up the default folders. * e-shell.c (e_shell_construct): Call e_setup_check_db after getting the config db. * e-shell-constants.h: Add E_SUMMARY_URI, E_LOCAL_INBOX_URI, etc. * e-shortcuts.c (e_shortcuts_add_default_group): Use E_LOCAL_INBOX_URI, etc. * e-shell-view.c: #define FALLBACK_URI to E_SUMMARY_URI svn path=/trunk/; revision=16405
This commit is contained in:
@ -1,11 +1,24 @@
|
||||
2002-04-09 Dan Winship <danw@ximian.com>
|
||||
|
||||
* e-setup.c (e_setup_check_db): New. Check that things that need
|
||||
to be in the config db are. Right now it sets up the default
|
||||
folders.
|
||||
|
||||
* e-shell.c (e_shell_construct): Call e_setup_check_db after
|
||||
getting the config db.
|
||||
(impl_Shell_handleURI): Handle "default:" URIs by looking up the
|
||||
default folders in the config db.
|
||||
|
||||
* main.c (idle_cb): Check for "default:" URIs and treat them the
|
||||
same way as "evolution:" URIs. If the shell fails to display all
|
||||
of the requested URIs, fall back to the default URI (Summary).
|
||||
|
||||
* e-shell.c (impl_Shell_handleURI): Handle "default:" URIs by
|
||||
looking up the default folders in the config db.
|
||||
* e-shell-constants.h: Add E_SUMMARY_URI, E_LOCAL_INBOX_URI, etc.
|
||||
|
||||
* e-shortcuts.c (e_shortcuts_add_default_group): Use
|
||||
E_LOCAL_INBOX_URI, etc.
|
||||
|
||||
* e-shell-view.c: #define FALLBACK_URI to E_SUMMARY_URI
|
||||
|
||||
2002-04-09 Dan Winship <danw@ximian.com>
|
||||
|
||||
|
||||
@ -41,6 +41,7 @@
|
||||
#include <gal/widgets/e-gui-utils.h>
|
||||
|
||||
#include "e-local-folder.h"
|
||||
#include "e-shell-constants.h"
|
||||
|
||||
#include "e-setup.h"
|
||||
|
||||
@ -413,3 +414,29 @@ e_setup (const char *evolution_directory)
|
||||
Check if it is up to date. */
|
||||
return check_evolution_directory (evolution_directory);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
e_setup_check_db (Bonobo_ConfigDatabase db)
|
||||
{
|
||||
gboolean def;
|
||||
|
||||
if (bonobo_config_get_string_with_default (db, "/DefaultFolder/mail_path", NULL, &def) == NULL) {
|
||||
bonobo_config_set_string (db, "/DefaultFolder/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",
|
||||
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",
|
||||
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",
|
||||
E_LOCAL_TASKS_URI, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,7 +24,10 @@
|
||||
#define _E_SETUP_H
|
||||
|
||||
#include <glib.h>
|
||||
#include <bonobo-conf/bonobo-config-database.h>
|
||||
|
||||
gboolean e_setup (const char *evolution_directory);
|
||||
gboolean e_setup (const char *evolution_directory);
|
||||
|
||||
void e_setup_check_db (Bonobo_ConfigDatabase db);
|
||||
|
||||
#endif /* _E_SETUP_H */
|
||||
|
||||
@ -38,4 +38,10 @@
|
||||
#define E_LOCAL_STORAGE_NAME "local"
|
||||
#define E_SUMMARY_STORAGE_NAME "summary"
|
||||
|
||||
#define E_SUMMARY_URI "evolution:/summary"
|
||||
#define E_LOCAL_INBOX_URI "evolution:/local/Inbox"
|
||||
#define E_LOCAL_CONTACTS_URI "evolution:/local/Contacts"
|
||||
#define E_LOCAL_CALENDAR_URI "evolution:/local/Calendar"
|
||||
#define E_LOCAL_TASKS_URI "evolution:/local/Tasks"
|
||||
|
||||
#endif
|
||||
|
||||
@ -169,7 +169,7 @@ static guint signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
/* URI to display when the currently displayed folder is removed from the
|
||||
storage. */
|
||||
#define FALLBACK_URI "evolution:/local/Inbox"
|
||||
#define FALLBACK_URI E_SUMMARY_URI
|
||||
|
||||
|
||||
/* The icons for the offline/online status. */
|
||||
|
||||
@ -57,6 +57,7 @@
|
||||
#include "e-corba-storage-registry.h"
|
||||
#include "e-folder-type-registry.h"
|
||||
#include "e-local-storage.h"
|
||||
#include "e-setup.h"
|
||||
#include "e-shell-constants.h"
|
||||
#include "e-shell-corba-icon-utils.h"
|
||||
#include "e-shell-folder-selection-dialog.h"
|
||||
@ -1244,6 +1245,7 @@ e_shell_construct (EShell *shell,
|
||||
CORBA_exception_free (&ev);
|
||||
return E_SHELL_CONSTRUCT_RESULT_NOCONFIGDB;
|
||||
}
|
||||
e_setup_check_db (priv->db);
|
||||
|
||||
CORBA_exception_free (&ev);
|
||||
|
||||
|
||||
@ -1028,19 +1028,19 @@ e_shortcuts_add_default_group (EShortcuts *shortcuts)
|
||||
/* FIXME: Inbox shortcut should point to something else for
|
||||
people who won't care about using /Local Folders/Inbox */
|
||||
utf = e_utf8_from_locale_string (_("Summary"));
|
||||
e_shortcuts_add_shortcut (shortcuts, 0, -1, "evolution:/summary", utf, 0, "summary");
|
||||
e_shortcuts_add_shortcut (shortcuts, 0, -1, E_SUMMARY_URI, utf, 0, "summary");
|
||||
g_free (utf);
|
||||
utf = e_utf8_from_locale_string (_("Inbox"));
|
||||
e_shortcuts_add_shortcut (shortcuts, 0, -1, "evolution:/local/Inbox", utf, 0, "mail");
|
||||
e_shortcuts_add_shortcut (shortcuts, 0, -1, E_LOCAL_INBOX_URI, utf, 0, "mail");
|
||||
g_free (utf);
|
||||
utf = e_utf8_from_locale_string (_("Calendar"));
|
||||
e_shortcuts_add_shortcut (shortcuts, 0, -1, "evolution:/local/Calendar", utf, 0, "calendar");
|
||||
e_shortcuts_add_shortcut (shortcuts, 0, -1, E_LOCAL_CALENDAR_URI, utf, 0, "calendar");
|
||||
g_free (utf);
|
||||
utf = e_utf8_from_locale_string (_("Tasks"));
|
||||
e_shortcuts_add_shortcut (shortcuts, 0, -1, "evolution:/local/Tasks", utf, 0, "tasks");
|
||||
e_shortcuts_add_shortcut (shortcuts, 0, -1, E_LOCAL_TASKS_URI, utf, 0, "tasks");
|
||||
g_free (utf);
|
||||
utf = e_utf8_from_locale_string (_("Contacts"));
|
||||
e_shortcuts_add_shortcut (shortcuts, 0, -1, "evolution:/local/Contacts", utf, 0, "contacts");
|
||||
e_shortcuts_add_shortcut (shortcuts, 0, -1, E_LOCAL_CONTACTS_URI, utf, 0, "contacts");
|
||||
g_free (utf);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user