aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog22
-rw-r--r--calendar/cal-client/cal-client.c102
-rw-r--r--calendar/cal-client/cal-client.h10
-rw-r--r--calendar/idl/evolution-calendar.idl15
-rw-r--r--calendar/pcs/cal.c41
5 files changed, 22 insertions, 168 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index c1658cb098..b44bd6f9e5 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,25 @@
+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.
+
+2001-06-19 Damon Chaplin <damon@ximian.com>
+
+ * gui/dialogs/cal-prefs-dialog.c: added a 'Time zone' setting. Also
+ rearranged a little, adding a new 'General' page, since we had too
+ many settings on the 'Calendar' page.
+
+ * gui/e-timezone-entry.[hc]:
+ * gui/dialogs/e-timezone-dialog.[hc]:
+ * gui/dialogs/comp-editor.c:
+ * gui/dialogs/comp-editor-page.[hc]:
+ * gui/dialogs/event-page.c:
+ * gui/dialogs/task-details-page.c:
+ * gui/dialogs/task-page.c: removed CalClient stuff. The timezone dialog
+ now uses the timezone data directly from the client's libical library.
+
2001-06-19 JP Rosevear <jpr@ximian.com>
* gui/dialogs/task-editor.c (task_editor_init): add ui
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.
diff --git a/calendar/cal-client/cal-client.h b/calendar/cal-client/cal-client.h
index 6d5891f7e1..3c6570e5be 100644
--- a/calendar/cal-client/cal-client.h
+++ b/calendar/cal-client/cal-client.h
@@ -65,14 +65,6 @@ typedef enum {
CAL_CLIENT_LOAD_LOADED
} CalClientLoadState;
-/* A timezone name and its coordinates in the world. */
-typedef struct _CalTimezoneInfo CalTimezoneInfo;
-struct _CalTimezoneInfo {
- char *location;
- double latitude;
- double longitude;
-};
-
struct _CalClient {
GtkObject object;
@@ -133,8 +125,6 @@ gboolean cal_client_remove_object (CalClient *client, const char *uid);
CalQuery *cal_client_get_query (CalClient *client, const char *sexp);
-GArray *cal_client_get_builtin_timezone_info (CalClient *client);
-
END_GNOME_DECLS
diff --git a/calendar/idl/evolution-calendar.idl b/calendar/idl/evolution-calendar.idl
index cec986210a..ee8f91edcd 100644
--- a/calendar/idl/evolution-calendar.idl
+++ b/calendar/idl/evolution-calendar.idl
@@ -99,17 +99,6 @@ module Calendar {
typedef sequence<CalComponentAlarms> CalComponentAlarmsSeq;
- /* Used to transfer builtin timezone information. */
- struct CalTimezoneInfo {
- string location;
- double latitude;
- double longitude;
- };
-
- /* Used to transfer a list of timezone info */
- typedef sequence<CalTimezoneInfo> CalTimezoneInfoSeq;
-
-
interface Query;
interface Listener;
@@ -175,10 +164,6 @@ module Calendar {
*/
Query getQuery (in string sexp, in QueryListener ql)
raises (CouldNotCreate);
-
- /* Returns information about all the builtin timezones. */
- CalTimezoneInfoSeq getBuiltinTimezoneInfo ()
- raises (NotFound);
};
/* Listener for changes in a calendar */
diff --git a/calendar/pcs/cal.c b/calendar/pcs/cal.c
index a76d3a7f38..42ccbf3cee 100644
--- a/calendar/pcs/cal.c
+++ b/calendar/pcs/cal.c
@@ -378,46 +378,6 @@ impl_Cal_get_query (PortableServer_Servant servant,
return query_copy;
}
-/* Cal::getBuiltinTimezoneInfo method */
-static GNOME_Evolution_Calendar_CalTimezoneInfoSeq *
-impl_Cal_get_builtin_timezone_info (PortableServer_Servant servant,
- CORBA_Environment *ev)
-{
- GNOME_Evolution_Calendar_CalTimezoneInfoSeq *seq;
- icalarray *zones;
- icaltimezone *zone;
- int n, i;
- char *location;
-
- zones = icaltimezone_get_builtin_timezones ();
- if (!zones) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_GNOME_Evolution_Calendar_Cal_NotFound,
- NULL);
- return CORBA_OBJECT_NIL;
- }
-
- n = zones->num_elements;
-
- seq = GNOME_Evolution_Calendar_CalTimezoneInfoSeq__alloc ();
- CORBA_sequence_set_release (seq, TRUE);
- seq->_length = n;
- seq->_buffer = CORBA_sequence_GNOME_Evolution_Calendar_CalTimezoneInfo_allocbuf (n);
-
- /* Fill the sequence */
-
- for (i = 0; i < n; i++) {
- zone = icalarray_element_at (zones, i);
- location = icaltimezone_get_location (zone);
-
- seq->_buffer[i].location = CORBA_string_dup (location);
- seq->_buffer[i].latitude = icaltimezone_get_latitude (zone);
- seq->_buffer[i].longitude = icaltimezone_get_longitude (zone);
- }
-
- return seq;
-}
-
/**
* cal_construct:
* @cal: A calendar client interface.
@@ -548,7 +508,6 @@ cal_class_init (CalClass *klass)
epv->updateObject = impl_Cal_update_object;
epv->removeObject = impl_Cal_remove_object;
epv->getQuery = impl_Cal_get_query;
- epv->getBuiltinTimezoneInfo = impl_Cal_get_builtin_timezone_info;
}