diff options
author | Chenthill Palanisamy <pchen@src.gnome.org> | 2005-10-18 18:30:52 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchen@src.gnome.org> | 2005-10-18 18:30:52 +0800 |
commit | 2306d4b806323af7d0c1c3ca21cc712e69aa103e (patch) | |
tree | 48a0c7bdedf0693726863355bcd7a890c6e9c5b0 | |
parent | c9c7d379de1d9f7c2a219c5cd64df7a630e6519f (diff) | |
download | gsoc2013-evolution-2306d4b806323af7d0c1c3ca21cc712e69aa103e.tar.gz gsoc2013-evolution-2306d4b806323af7d0c1c3ca21cc712e69aa103e.tar.zst gsoc2013-evolution-2306d4b806323af7d0c1c3ca21cc712e69aa103e.zip |
fixes #308802.
svn path=/trunk/; revision=30526
-rw-r--r-- | calendar/gui/calendar-component.c | 6 | ||||
-rw-r--r-- | calendar/gui/dialogs/event-page.c | 12 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-page.c | 7 | ||||
-rw-r--r-- | calendar/gui/e-itip-control.c | 13 | ||||
-rw-r--r-- | calendar/gui/e-tasks.c | 15 | ||||
-rw-r--r-- | calendar/gui/gnome-cal.c | 7 | ||||
-rw-r--r-- | calendar/gui/itip-utils.c | 6 | ||||
-rw-r--r-- | calendar/gui/tasks-component.c | 5 |
8 files changed, 40 insertions, 31 deletions
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index 5893181847..ba48b577bd 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -1145,6 +1145,9 @@ setup_create_ecal (CalendarComponent *calendar_component, CalendarComponentView if (priv->create_ecal) { icaltimezone *zone; + + zone = calendar_config_get_icaltimezone (); + e_cal_set_default_timezone (priv->create_ecal, zone, NULL); if (!e_cal_open (priv->create_ecal, FALSE, NULL)) { GtkWidget *dialog; @@ -1159,9 +1162,6 @@ setup_create_ecal (CalendarComponent *calendar_component, CalendarComponentView return NULL; } - zone = calendar_config_get_icaltimezone (); - e_cal_set_default_timezone (priv->create_ecal, zone, NULL); - } else { GtkWidget *dialog; diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index 414aa5ecca..5609259cbe 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -1672,6 +1672,13 @@ source_changed_cb (GtkWidget *widget, ESource *source, gpointer data) ECal *client; client = auth_new_cal_from_source (source, E_CAL_SOURCE_TYPE_EVENT); + if (client) { + icaltimezone *zone; + + zone = calendar_config_get_icaltimezone (); + e_cal_set_default_timezone (client, zone, NULL); + } + if (!client || !e_cal_open (client, FALSE, NULL)) { GtkWidget *dialog; @@ -1688,11 +1695,6 @@ source_changed_cb (GtkWidget *widget, ESource *source, gpointer data) gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } else { - icaltimezone *zone; - - zone = calendar_config_get_icaltimezone (); - e_cal_set_default_timezone (client, zone, NULL); - comp_editor_notify_client_changed ( COMP_EDITOR (gtk_widget_get_toplevel (priv->main)), client); diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index 8b72bb589f..af3e207192 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -859,6 +859,13 @@ source_changed_cb (GtkWidget *widget, ESource *source, gpointer data) ECal *client; client = auth_new_cal_from_source (source, E_CAL_SOURCE_TYPE_TODO); + if (client) { + icaltimezone *zone; + + zone = calendar_config_get_icaltimezone (); + e_cal_set_default_timezone (client, zone, NULL); + } + if (!client || !e_cal_open (client, FALSE, NULL)) { GtkWidget *dialog; diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c index f2415aaf33..56979ed85b 100644 --- a/calendar/gui/e-itip-control.c +++ b/calendar/gui/e-itip-control.c @@ -149,7 +149,6 @@ cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data) EItipControlPrivate *priv; ESource *source; ECalSourceType source_type; - icaltimezone *zone; priv = itip->priv; @@ -164,9 +163,6 @@ cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data) return; } - zone = calendar_config_get_icaltimezone (); - e_cal_set_default_timezone (ecal, zone, NULL); - priv->current_ecal = ecal; set_ok_sens (itip); } @@ -178,6 +174,7 @@ start_calendar_server (EItipControl *itip, ESource *source, ECalSourceType type, { EItipControlPrivate *priv; ECal *ecal; + icaltimezone *zone; priv = itip->priv; @@ -189,6 +186,10 @@ start_calendar_server (EItipControl *itip, ESource *source, ECalSourceType type, } ecal = auth_new_cal_from_source (source, type); + + zone = calendar_config_get_icaltimezone (); + e_cal_set_default_timezone (ecal, zone, NULL); + g_signal_connect (G_OBJECT (ecal), "cal_opened", G_CALLBACK (func), data); g_hash_table_insert (priv->ecals[type], g_strdup (e_source_peek_uid (source)), ecal); @@ -246,7 +247,6 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data) ESource *source; ECalSourceType source_type; icalcomponent *icalcomp; - icaltimezone *zone; source_type = e_cal_get_source_type (ecal); source = e_cal_get_source (ecal); @@ -270,9 +270,6 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data) set_ok_sens (fd->itip); } - zone = calendar_config_get_icaltimezone (); - e_cal_set_default_timezone (ecal, zone, NULL); - cleanup: if (fd->count == 0) { if (fd->show_selector && !priv->current_ecal && priv->vbox) { diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c index 77dc1c4369..72b3ba9435 100644 --- a/calendar/gui/e-tasks.c +++ b/calendar/gui/e-tasks.c @@ -258,13 +258,11 @@ set_timezone (ETasks *tasks) zone = calendar_config_get_icaltimezone (); for (l = priv->clients_list; l != NULL; l = l->next) { ECal *client = l->data; - - if (e_cal_get_load_state (client) == E_CAL_LOAD_LOADED) - /* FIXME Error checking */ - e_cal_set_default_timezone (client, zone, NULL); + /* FIXME Error checking */ + e_cal_set_default_timezone (client, zone, NULL); } - if (priv->default_client && e_cal_get_load_state (priv->default_client) == E_CAL_LOAD_LOADED) + if (priv->default_client) /* FIXME Error checking */ e_cal_set_default_timezone (priv->default_client, zone, NULL); @@ -873,7 +871,6 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, ETasks *tasks) model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view)); e_cal_model_add_client (model, ecal); - set_timezone (tasks); set_status_message (tasks, NULL); break; case E_CALENDAR_STATUS_BUSY : @@ -916,7 +913,6 @@ default_client_cal_opened_cb (ECal *ecal, ECalendarStatus status, ETasks *tasks) g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, default_client_cal_opened_cb, NULL); model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view)); - set_timezone (tasks); e_cal_model_set_default_client (model, ecal); set_status_message (tasks, NULL); break; @@ -950,9 +946,14 @@ static gboolean open_ecal (ETasks *tasks, ECal *cal, gboolean only_if_exists, open_func of) { ETasksPrivate *priv; + icaltimezone *zone; priv = tasks->priv; + zone = calendar_config_get_icaltimezone (); + e_cal_set_default_timezone (priv->default_client, zone, NULL); + + set_status_message (tasks, _("Opening tasks at %s"), e_cal_get_uri (cal)); g_signal_connect (G_OBJECT (cal), "cal_opened", G_CALLBACK (of), tasks); diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index a013256744..5a203b31f8 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -2390,7 +2390,6 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal) g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, client_cal_opened_cb, NULL); - e_cal_set_default_timezone (ecal, priv->zone, NULL); switch (source_type) { case E_CAL_SOURCE_TYPE_EVENT : @@ -2484,7 +2483,6 @@ default_client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, default_client_cal_opened_cb, NULL); - e_cal_set_default_timezone (ecal, priv->zone, NULL); switch (source_type) { case E_CAL_SOURCE_TYPE_EVENT: @@ -2511,9 +2509,13 @@ open_ecal (GnomeCalendar *gcal, ECal *cal, gboolean only_if_exists, open_func of { GnomeCalendarPrivate *priv; char *msg; + icaltimezone *zone; priv = gcal->priv; + zone = calendar_config_get_icaltimezone (); + e_cal_set_default_timezone (cal, zone, NULL); + msg = g_strdup_printf (_("Opening %s"), e_cal_get_uri (cal)); switch (e_cal_get_source_type (cal)) { case E_CAL_SOURCE_TYPE_EVENT : @@ -2882,6 +2884,7 @@ gnome_calendar_set_default_source (GnomeCalendar *gcal, ECalSourceType source_ty if (!priv->default_client[source_type]) return FALSE; } + open_ecal (gcal, priv->default_client[source_type], FALSE, default_client_cal_opened_cb); diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c index b38f0abe12..2b203b98a8 100644 --- a/calendar/gui/itip-utils.c +++ b/calendar/gui/itip-utils.c @@ -205,10 +205,8 @@ itip_get_comp_attendee (ECalComponent *comp, ECal *client) /* We could not find the attendee in the component, so just give the default account address if the email address is not set in the backend */ /* FIXME do we have a better way ? */ - if (!(address && *address)) { - a = itip_addresses_get_default (); - address = g_strdup (a->id->address); - } + a = itip_addresses_get_default (); + address = g_strdup (a->id->address); e_cal_component_free_attendee_list (attendees); return address; diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c index 4dec0e6f00..185175ab65 100644 --- a/calendar/gui/tasks-component.c +++ b/calendar/gui/tasks-component.c @@ -863,6 +863,9 @@ setup_create_ecal (TasksComponent *component, TasksComponentView *component_view if (priv->create_ecal) { icaltimezone *zone; + + zone = calendar_config_get_icaltimezone (); + e_cal_set_default_timezone (priv->create_ecal, zone, NULL); if (!e_cal_open (priv->create_ecal, FALSE, NULL)) { GtkWidget *dialog; @@ -877,8 +880,6 @@ setup_create_ecal (TasksComponent *component, TasksComponentView *component_view return NULL; } - zone = calendar_config_get_icaltimezone (); - e_cal_set_default_timezone (priv->create_ecal, zone, NULL); } else { GtkWidget *dialog; |