aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2002-04-09 23:54:24 +0800
committerDan Winship <danw@src.gnome.org>2002-04-09 23:54:24 +0800
commita1720426f1682646f5c355f044d7fa20883d6fb5 (patch)
treecd322a7f5f0a3073223b2049fd7c329ef7498a66
parentc10d63c7c2449982993a9579a9f0b951632b9401 (diff)
downloadgsoc2013-evolution-a1720426f1682646f5c355f044d7fa20883d6fb5.tar.gz
gsoc2013-evolution-a1720426f1682646f5c355f044d7fa20883d6fb5.tar.zst
gsoc2013-evolution-a1720426f1682646f5c355f044d7fa20883d6fb5.zip
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
-rw-r--r--shell/ChangeLog17
-rw-r--r--shell/e-setup.c27
-rw-r--r--shell/e-setup.h5
-rw-r--r--shell/e-shell-constants.h6
-rw-r--r--shell/e-shell-view.c2
-rw-r--r--shell/e-shell.c2
-rw-r--r--shell/e-shortcuts.c10
7 files changed, 60 insertions, 9 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index a8323cd1e4..4be49021f9 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -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>
diff --git a/shell/e-setup.c b/shell/e-setup.c
index 31c16eca2b..088aa010c2 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-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);
+ }
+}
diff --git a/shell/e-setup.h b/shell/e-setup.h
index 3355dc90ad..37144eadc7 100644
--- a/shell/e-setup.h
+++ b/shell/e-setup.h
@@ -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 */
diff --git a/shell/e-shell-constants.h b/shell/e-shell-constants.h
index b7382bed67..0d5e5f37d4 100644
--- a/shell/e-shell-constants.h
+++ b/shell/e-shell-constants.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
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 901e599a3d..0125004d8a 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -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. */
diff --git a/shell/e-shell.c b/shell/e-shell.c
index a05e53e665..0284318910 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -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);
diff --git a/shell/e-shortcuts.c b/shell/e-shortcuts.c
index b231bc4df2..fffedfbaf3 100644
--- a/shell/e-shortcuts.c
+++ b/shell/e-shortcuts.c
@@ -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);
}
d>11-16/+13 * Remove expired portskris2005-11-0512-591/+0 * Bump PORTREVISION to chase the glib20 shared library update.marcus2005-11-051-1/+1 * Unbreak port by using pkg-install and pkg-deinstall scripts.edwin2005-11-043-8/+39 * Unbreak port by fixing pkg-plist and adding pkg-install andedwin2005-11-044-13/+52 * Remove all the secondary port of editors/ooodict-allmaho2005-11-012-23/+0 * BROKEN: Incorrect pkg-plistkris2005-10-291-0/+2 * Make it respect X11BASE.novel2005-10-221-1/+1 * Upgrade to 1.15.4ache2005-10-223-16/+16 * Upgrade to 1.5.1ache2005-10-172-3/+5 * Reset bouncing maintainer address, mark as BROKEN since it no longer fetches.linimon2005-10-101-4/+5 * Remove unnecessary setting of DISTNAME.fenner2005-10-071-2/+1 * This port has been deprecated for 3 months.yar2005-10-052-27/+0 * - Change my e-mailaz2005-10-031-1/+1 * - Fix fetching problem [1]novel2005-09-261-3/+1 * unbreak OSSP mm based ports after library version bumprse2005-09-091-1/+1 * - RIP russian version of nagios. It's too old. No new one available.sem2005-08-3020-827/+0 * Fix index build by moving openoffice.org-1.1 ports.maho2005-08-291-1/+1 * Update to KDE 3.4.2 / KOffice 1.4.1lofi2005-08-018-13/+13 * This port is scheduled for deletion on 2005-09-22 if it is still brokenkris2005-07-234-0/+8 * Update to KOffice 1.4.0a.lofi2005-07-069-87/+126 * Remove openoffice.org localized ports as I announced:maho2005-06-293-44/+0 * Update to KDE 3.4.1lofi2005-06-268-48/+60 * Upgrade to 0.99f9ache2005-06-062-3/+3 * - Follow the new teTeX structuresem2005-06-065-51/+54 * - Unbreak and general updatepav2005-06-061-2/+3 * Disable building packages from this portyar2005-05-301-0/+2 * - Match the reality of bogofilter 0.94.13.yar2005-05-301-2/+6 * - Remove linux-mozillafirebird and it's language spinoffs. This port ispav2005-05-284-40/+0 * - Update CONFLICTSpav2005-05-261-1/+1 * Mark ru-bogofilter port as broken to prevent people from upgradingyar2005-05-231-0/+2 * Added slave port of lang/php_doc for the Russian languageedwin2005-05-232-0/+14 * Fix CONFLICTS (again - don't blame me!):skv2005-05-131-1/+1 * Fix CONFLICTS:skv2005-05-131-1/+1 * Add unzip , unzip with CP866 and KOI8-R support.skv2005-05-133-0/+98 * - update to 3.2.1novel2005-04-202-5/+5 * At Kris's request, back out the MACHINE_ARCH spelling correction untilobrien2005-04-122-2/+2 * Assist getting more ports working on AMD64 by obeying theobrien2005-04-112-2/+2 * Remove myself from maintainerache2005-04-081-1/+1 * Fix a typo in the kio translation, which causes all Open File / Save Filelofi2005-03-284-0/+24 * Update to KDE 3.4lofi2005-03-214-62/+522 * Bump PORTREVISION to chase the glib20 shared lib version change.marcus2005-03-121-1/+1 * Upgrade to 0.99f8ache2005-03-112-4/+3 * Use @freebsd.org address for my ports.novel2005-03-082-2/+2 * BROKEN: Incorrect pkg-plistkris2005-02-282-0/+4 * BROKEN: Changes permissions of installed directorykris2005-02-281-0/+2 * Update to version 7.0rc12krion2005-02-138-20/+140 * BROKEN: Removes pine.conf upon deinstallationkris2005-02-121-0/+2 * - don't create httpd.conf.bakclement2005-02-124-0/+32 * Split the postgresql ports into a server and a client part.girgen2005-01-311-1/+1 * [ maintainer ] russian/prawda: try to fix build on 6.x/i386 and 6.x/sparc64edwin2005-01-124-10/+36 * - Fix pkg-plistsem2005-01-081-1/+1 * Say hello to the linux mega patch, it consolidates our linux bits anetchild2005-01-011-3/+0 * Add i18nized doc subdirs to kdehier and adjust i18n port plists accordingly.lofi2004-12-235-5/+0 * Drop maintainership.krion2004-12-221-1/+1 * Remove myself from MAINTAINERache2004-12-141-1/+1 * Update to KDE 3.3.2lofi2004-12-1412-32/+134 * Remove myself from MAINTAINERache2004-12-141-1/+1 * - Update to 7.1rc4pav2004-11-1626-212/+422 * Update to KDE 3.3.1lofi2004-11-0810-13/+489 * Add artwiz-ru, a russian version of the artwiz fonts.pav2004-11-076-0/+82 * Update to 1.3.33 + 2.8.22 + PL30.21lev2004-11-063-14/+11 * Update to 1.3.33+PL30.21. It fixes all security problems, found in 1.3.31 a...lev2004-11-063-11/+8 * - Finish ports/73231, I forgot to commit this part last night.pav2004-11-031-1/+0 * Clean up time for email addresses MIA!edwin2004-10-251-1/+1 * Shift my manitainer address to FreeBSD.org domain.marck2004-10-191-1/+1 * Update CONFLICTS and fix portlint warnings.krion2004-10-141-3/+3 * - Remove russian/gaim port, it's functionality was merged into original Gaimpav2004-10-123-93/+0 * Update to KDE 3.3lofi2004-08-319-55/+579 * Fix build with gcc-3.4krion2004-08-221-0/+15 * fix build on 4.x.sem2004-08-171-2/+2 * Update to 1.2.sem2004-08-1613-343/+509 * Factor out all but one of the build switches of the KDE main module portslofi2004-08-119-12/+9 * Shorten COMMENT to satisfy portlint.sem2004-08-101-1/+1 * Client for the OpenNAP network with Russian koi8 <> win1251 encoding patch.sem2004-08-103-0/+192 * Change maintainer's email.krion2004-08-081-1/+1 * Distfile was modified by author. Minor changes.sem2004-08-031-2/+2 * Add prawda 0.3.0, english-Russian translator.sem2004-07-318-0/+423 * Utilize DATADIR macro.osa2004-07-282-17/+17 * Change maintainer's email.krion2004-07-221-1/+1 * Gaim with underclared charsets support for oscar protocol.sem2004-07-173-0/+93 * nagios v 1.1 with Russian language patchessem2004-07-1513-0/+657 * Establish a correct master-slave relationship betweenlinimon2004-06-241-1/+2 * fix ircd-hybrid-7 low-bandwidth DoSeik2004-06-214-2/+24 * Add a new port russian/bogofilter (ru-bogofilter), which isyar2004-06-182-0/+19 * Update to version 3.2.3lofi2004-06-104-6/+174 * Don't remove www/ now that it is created by the system.kris2004-06-093-5/+0 * Update to latest mod_ssl 2.8.18: security fix.lev2004-06-072-4/+3 * Add `www/apache2' port with non-default MPMs to CONFLICTS.lev2004-05-242-0/+4 * Make CONFLICTS more specific: conflicts with apache-[0-9]*, not with apache-*lev2004-05-242-2/+2 * Update to latest, 1.3.31 based, version.lev2004-05-234-124/+20 * Update to latest, 1.3.31 based, version.lev2004-05-234-123/+17 * - Fix typokrion2004-05-212-2/+2 * - Unregister the old UID/GID and register the new one in thekrion2004-05-216-8/+14 * BROKEN: Uses unregistered, out-of-range uidkris2004-05-212-0/+4 * clean up after various repocopieseik2004-05-185-74/+0 * - Fix MASTER_SITESkrion2004-05-172-2/+2 * Move port to better category:vs2004-05-121-1/+0 * Oops. Forgot the language categories.lofi2004-05-079-9/+12 * - remove obsolte ports of gd1 and realativesdinoex2004-05-0510-29031/+0 * - disconnect obsolete ports gd1 and relativesdinoex2004-05-051-1/+0 * - Fix WWW:krion2004-05-041-1/+1 * Update to KDE 3.2.2lofi2004-04-204-40/+22 * - Change maintainer's emailkrion2004-04-162-2/+2 * - Fix MASTER_SITESkrion2004-04-141-2/+1 * Fix LATEST_LINK conflictsmaho2004-04-121-0/+1 * Tidy up whitespace.trevor2004-04-111-2/+2 * Cram into 80 columns by 24 rows.trevor2004-04-111-8/+4 * Chase the glib20 update, and bump all affected ports' PORTREVISIONs.marcus2004-04-051-1/+1 * Remove category pkg/COMMENT files in favour of a COMMENT variable in thekris2004-04-022-1/+2 * SIZEify (maintainer timeout)trevor2004-03-3112-0/+16 * - mark DEPRECATEDdinoex2004-03-301-0/+3 * - use INSTALLS_SHLIBdinoex2004-03-302-5/+1 * Add size data, approved by maintainers.trevor2004-03-214-0/+6 * SIZEifyerwin2004-03-202-0/+2 * - extend CONFLICTSdinoex2004-03-192-1/+11 * Add size data.trevor2004-03-191-0/+1 * E-mail to the maintainer bounced:trevor2004-03-181-1/+1 * bump PORTREVISION for the netmask fixeik2004-03-121-0/+1