aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-config.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2002-05-08 04:17:07 +0800
committerJP Rosevear <jpr@src.gnome.org>2002-05-08 04:17:07 +0800
commit65d69a92f1ee494743b9207a38ff7285848f37d3 (patch)
tree9d48dadc2138ce3a878ea289162f5a7192fc56e6 /calendar/gui/calendar-config.c
parent2017b2dcec910cc90d771fc2c124828e3c122014 (diff)
downloadgsoc2013-evolution-65d69a92f1ee494743b9207a38ff7285848f37d3.tar
gsoc2013-evolution-65d69a92f1ee494743b9207a38ff7285848f37d3.tar.gz
gsoc2013-evolution-65d69a92f1ee494743b9207a38ff7285848f37d3.tar.bz2
gsoc2013-evolution-65d69a92f1ee494743b9207a38ff7285848f37d3.tar.lz
gsoc2013-evolution-65d69a92f1ee494743b9207a38ff7285848f37d3.tar.xz
gsoc2013-evolution-65d69a92f1ee494743b9207a38ff7285848f37d3.tar.zst
gsoc2013-evolution-65d69a92f1ee494743b9207a38ff7285848f37d3.zip
start a server a uri (start_default_server): start a default server
2002-05-07 JP Rosevear <jpr@ximian.com> * gui/e-itip-control.c (start_calendar_server): start a server a uri (start_default_server): start a default server (get_servers): get all clients for all folders of the given type(s) (find_server): locate a server for a particular uid (init): get_servers, listen for object_requested signal (destroy): destroy all clients (write_html): put options is there own cell (get_publish_options): place selector in if param is true (get_request_options): ditto (get_real_item): only try and look up the item if we know its in the server (show_current_event): find the server (if any) for the current comp (show_current_todo): ditto (update_attendee_status): if there is no server for the comp, it doesn't exist (remove_item): ditto (button_selected_cb): get a client for the selected folder (object_requested_cb): draw the folder button in * gui/calendar-config.h: new protos * gui/calendar-config.c (calendar_config_default_tasks_folder): get default tasks uri (calendar_config_default_calendar_folder): get default calendar uri * cal-client/cal-client.c (get_default_uri): use cal_util_expand_uri * cal-util/cal-util.h: new proto * cal-util/cal-util.c (cal_util_expand_uri): tack on the file name if its a file uri svn path=/trunk/; revision=16709
Diffstat (limited to 'calendar/gui/calendar-config.c')
-rw-r--r--calendar/gui/calendar-config.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c
index 0237766ea8..572db1fe2c 100644
--- a/calendar/gui/calendar-config.c
+++ b/calendar/gui/calendar-config.c
@@ -1146,3 +1146,58 @@ calendar_config_get_hide_completed_tasks_sexp (void)
return sexp;
}
+
+char *
+calendar_config_default_calendar_folder (void)
+{
+ Bonobo_ConfigDatabase db;
+ char *uri;
+ CORBA_Environment ev;
+
+ CORBA_exception_init (&ev);
+
+ db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev);
+
+ if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
+ CORBA_exception_free (&ev);
+ return NULL;
+ }
+
+ uri = bonobo_config_get_string (db, "/DefaultFolders/calendar_uri", &ev);
+ bonobo_object_release_unref (db, NULL);
+
+ if (BONOBO_EX (&ev)) {
+ CORBA_exception_free (&ev);
+ return NULL;
+ }
+
+ return uri;
+}
+
+char *
+calendar_config_default_tasks_folder (void)
+{
+ Bonobo_ConfigDatabase db;
+ char *uri;
+ CORBA_Environment ev;
+
+ CORBA_exception_init (&ev);
+
+ db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev);
+
+ if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
+ CORBA_exception_free (&ev);
+ return NULL;
+ }
+
+ uri = bonobo_config_get_string (db, "/DefaultFolders/tasks_uri", &ev);
+ bonobo_object_release_unref (db, NULL);
+
+ if (BONOBO_EX (&ev)) {
+ CORBA_exception_free (&ev);
+ return NULL;
+ }
+
+ return uri;
+}
+