aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-client/cal-client.c
diff options
context:
space:
mode:
authorDamon Chaplin <damon@ximian.com>2001-06-20 10:56:02 +0800
committerDamon Chaplin <damon@src.gnome.org>2001-06-20 10:56:02 +0800
commita5ae0a3c3d35bfde94385942a18c6026109cd648 (patch)
tree13182aea69f13c45bbd7b5deda7826dd56dbd8e5 /calendar/cal-client/cal-client.c
parentc9e9b9a7bd01883daf4ac57e83233aae40bf1439 (diff)
downloadgsoc2013-evolution-a5ae0a3c3d35bfde94385942a18c6026109cd648.tar.gz
gsoc2013-evolution-a5ae0a3c3d35bfde94385942a18c6026109cd648.tar.zst
gsoc2013-evolution-a5ae0a3c3d35bfde94385942a18c6026109cd648.zip
removed stuff to get builtin timezone info from the server.
2001-06-19 Damon Chaplin <damon@ximian.com> * pcs/cal.c: * idl/evolution-calendar.idl: * cal-client/cal-client.[hc]: removed stuff to get builtin timezone info from the server. svn path=/trunk/; revision=10322
Diffstat (limited to 'calendar/cal-client/cal-client.c')
-rw-r--r--calendar/cal-client/cal-client.c102
1 files changed, 0 insertions, 102 deletions
diff --git a/calendar/cal-client/cal-client.c b/calendar/cal-client/cal-client.c
index d761370c74..cd8c8713d6 100644
--- a/calendar/cal-client/cal-client.c
+++ b/calendar/cal-client/cal-client.c
@@ -50,11 +50,6 @@ struct _CalClientPrivate {
/* The calendar client interface object we are contacting */
GNOME_Evolution_Calendar_Cal cal;
-
- /* An array of CalTimezone structs containing information on builtin
- timezones. We cache this so we only request it once from the
- server. */
- GArray *timezone_info;
};
@@ -71,8 +66,6 @@ static void cal_client_class_init (CalClientClass *class);
static void cal_client_init (CalClient *client);
static void cal_client_destroy (GtkObject *object);
-static void cal_client_free_builtin_timezone_info (GArray *zones);
-
static guint cal_client_signals[LAST_SIGNAL];
static GtkObjectClass *parent_class;
@@ -162,7 +155,6 @@ cal_client_init (CalClient *client)
priv->load_state = CAL_CLIENT_LOAD_NOT_LOADED;
priv->uri = NULL;
priv->factory = CORBA_OBJECT_NIL;
- priv->timezone_info = NULL;
}
/* Gets rid of the factory that a client knows about */
@@ -277,11 +269,6 @@ cal_client_destroy (GtkObject *object)
priv->uri = NULL;
}
- if (priv->timezone_info) {
- cal_client_free_builtin_timezone_info (priv->timezone_info);
- priv->timezone_info = NULL;
- }
-
g_free (priv);
client->priv = NULL;
@@ -1519,95 +1506,6 @@ cal_client_remove_object (CalClient *client, const char *uid)
return retval;
}
-/* Builds a list of CalComponentAlarms structures */
-static GArray *
-build_timezone_info_array (GNOME_Evolution_Calendar_CalTimezoneInfoSeq *seq)
-{
- GArray *zones;
- CalTimezoneInfo zone;
- int i;
-
- zones = g_array_new (FALSE, FALSE, sizeof (CalTimezoneInfo));
-
- for (i = 0; i < seq->_length; i++) {
- GNOME_Evolution_Calendar_CalTimezoneInfo *tzinfo;
-
- tzinfo = seq->_buffer + i;
-
- zone.location = g_strdup (tzinfo->location);
- zone.latitude = tzinfo->latitude;
- zone.longitude = tzinfo->longitude;
-
- g_array_append_val (zones, zone);
- }
-
- return zones;
-}
-
-/**
- * cal_client_get_builtin_timezone_info:
- * @client: A calendar client.
- *
- * Returns information on the builtin timezones, i.e. their names and
- * locations. This is so we can use the map to select a timezone.
- *
- * Return value: An array of #CalTimezoneInfo structures. The caller should not
- * change or free this array. The CalClient will free it when it is destroyed.
- **/
-GArray *
-cal_client_get_builtin_timezone_info (CalClient *client)
-{
- CalClientPrivate *priv;
- CORBA_Environment ev;
- GNOME_Evolution_Calendar_CalTimezoneInfoSeq *seq;
-
- g_return_val_if_fail (client != NULL, NULL);
- g_return_val_if_fail (IS_CAL_CLIENT (client), NULL);
-
- priv = client->priv;
-
- /* If we have already got this data from the server just return it. */
- if (priv->timezone_info)
- return priv->timezone_info;
-
- CORBA_exception_init (&ev);
-
- seq = GNOME_Evolution_Calendar_Cal_getBuiltinTimezoneInfo (priv->cal,
- &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_message ("cal_client_get_builtin_timezone_info(): could not get the builtin timezone info");
- CORBA_exception_free (&ev);
- return NULL;
- }
- CORBA_exception_free (&ev);
-
- priv->timezone_info = build_timezone_info_array (seq);
- CORBA_free (seq);
-
- return priv->timezone_info;
-}
-
-/**
- * cal_client_free_builtin_timezone_info:
- * @zones: An array of timezone info returned from
- * cal_client_get_builtin_timezone_info().
- *
- * Frees the builtin timezone information structures.
- **/
-static void
-cal_client_free_builtin_timezone_info (GArray *zones)
-{
- CalTimezoneInfo *zone;
- int i;
-
- for (i = 0; i < zones->len; i++) {
- zone = &g_array_index (zones, CalTimezoneInfo, i);
- g_free (zone->location);
- }
-
- g_array_free (zones, TRUE);
-}
-
/**
* cal_client_get_query:
* @client: A calendar client.