aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/gnome-cal.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2003-10-24 21:31:00 +0800
committerJP Rosevear <jpr@src.gnome.org>2003-10-24 21:31:00 +0800
commit98f0136ffa1428fb21c80dfa4568c88eebbdddc8 (patch)
tree0e2608838f9392539dff5ef3b75591d8d4c0d7bd /calendar/gui/gnome-cal.c
parent5146cded3b065817a0a203f5c71ffed3427d0fe4 (diff)
downloadgsoc2013-evolution-98f0136ffa1428fb21c80dfa4568c88eebbdddc8.tar
gsoc2013-evolution-98f0136ffa1428fb21c80dfa4568c88eebbdddc8.tar.gz
gsoc2013-evolution-98f0136ffa1428fb21c80dfa4568c88eebbdddc8.tar.bz2
gsoc2013-evolution-98f0136ffa1428fb21c80dfa4568c88eebbdddc8.tar.lz
gsoc2013-evolution-98f0136ffa1428fb21c80dfa4568c88eebbdddc8.tar.xz
gsoc2013-evolution-98f0136ffa1428fb21c80dfa4568c88eebbdddc8.tar.zst
gsoc2013-evolution-98f0136ffa1428fb21c80dfa4568c88eebbdddc8.zip
update protos
2003-10-24 JP Rosevear <jpr@ximian.com> * gui/gnome-cal.h: update protos * gui/gnome-cal.c (gnome_calendar_set_default_uri): set the default client based on uri * gui/calendar-component.c (add_uri_for_source): rename from load_uri_for_source and take a calendar (remove_uri_for_source): utility routine to remove the source's uri from the calendar (is_in_selection): checks to see if the uid of the given source matches any of those in the given selection (update_uris_for_selection): remove any uris no longer in the selection, add those that still exist (source_selection_changed_callback): call above (primary_source_selection_changed_callback): we have the calendar easily now; set the default by uri (control_activate_cb): handle activation and de-activation (impl_createControls): create the calendar control ourselves so we have access to the calendar (impl_dispose): release the source selection svn path=/trunk/; revision=23057
Diffstat (limited to 'calendar/gui/gnome-cal.c')
-rw-r--r--calendar/gui/gnome-cal.c67
1 files changed, 45 insertions, 22 deletions
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index b576365172..6e572484c8 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -2025,28 +2025,6 @@ gnome_calendar_get_default_client (GnomeCalendar *gcal)
}
/**
- * gnome_calendar_set_default_client
- * @gcal: A calendar view.
- * @client: The client to use as default.
- *
- * Set the default client on the given calendar view. The default calendar will
- * be used as the default when creating events in the view.
- */
-void
-gnome_calendar_set_default_client (GnomeCalendar *gcal, CalClient *client)
-{
- int i;
-
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
-
- for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) {
- e_cal_model_set_default_client (
- e_cal_view_get_model (E_CAL_VIEW (gcal->priv->views[i])),
- client);
- }
-}
-
-/**
* gnome_calendar_get_task_pad_cal_client:
* @gcal: A calendar view.
*
@@ -2214,6 +2192,51 @@ gnome_calendar_remove_event_uri (GnomeCalendar *gcal, const char *str_uri)
return TRUE;
}
+/**
+ * gnome_calendar_set_default_uri
+ * @gcal: A calendar view.
+ * @client: The client to use as default.
+ *
+ * Set the default client on the given calendar view. The default calendar will
+ * be used as the default when creating events in the view.
+ */
+
+/**
+ * gnome_calendar_set_default_uri:
+ * @gcal: A calendar view
+ * @uri: The uri to use as default
+ *
+ * Set the default uri on the given calendar view, the default uri
+ * will be used as the default when creating events in the view.
+
+ *
+ * Return value: TRUE if the uri was already added and is set, FALSE
+ * otherwise
+ **/
+gboolean
+gnome_calendar_set_default_uri (GnomeCalendar *gcal, const char *uri)
+{
+ GnomeCalendarPrivate *priv;
+ CalClient *client;
+ int i;
+
+ g_return_if_fail (GNOME_IS_CALENDAR (gcal));
+
+ priv = gcal->priv;
+
+ client = g_hash_table_lookup (priv->clients, uri);
+ if (!client)
+ return FALSE;
+
+ for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) {
+ e_cal_model_set_default_client (
+ e_cal_view_get_model (E_CAL_VIEW (priv->views[i])),
+ client);
+ }
+
+ return TRUE;
+}
+
/* Tells the calendar to reload all config settings.
If initializing is TRUE it sets the pane positions as well. (We don't
want to reset the pane positions after the user clicks 'Apply' in the