Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 311510 Details for
Bug 454926
Clock applet freeze on click when evolution has Google calendar configured
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Upstream Patch
gnome-panel-GoogleCalendar.patch (text/plain), 10.18 KB, created by
Eric Moret
on 2008-07-10 20:02:44 UTC
(
hide
)
Description:
Upstream Patch
Filename:
MIME Type:
Creator:
Eric Moret
Created:
2008-07-10 20:02:44 UTC
Size:
10.18 KB
patch
obsolete
>Index: applets/clock/calendar-window.c >=================================================================== >--- applets/clock/calendar-window.c (revision 11148) >+++ applets/clock/calendar-window.c (working copy) >@@ -388,6 +388,8 @@ is_appointment (GtkTreeModel *model, > return (g_ascii_strcasecmp (uri, "file") == 0 || > g_ascii_strcasecmp (uri, "webcal") == 0 || > g_ascii_strcasecmp (uri, "caldav") == 0 || >+ g_ascii_strcasecmp (uri, "exchange") == 0 || >+ g_ascii_strcasecmp (uri, "groupwise") == 0 || > g_ascii_strcasecmp (uri, "google") == 0); > return FALSE; > } >Index: applets/clock/calendar-sources.c >=================================================================== >--- applets/clock/calendar-sources.c (revision 11148) >+++ applets/clock/calendar-sources.c (working copy) >@@ -311,14 +311,13 @@ auth_func_cb (ECal *ecal, > return e_passwords_get_password (component_name, key); > } > >+/* The clients are just created here but not loaded */ > static ECal * >-load_esource (ESource *esource, >+get_ecal_from_source (ESource *esource, > ECalSourceType source_type, > GSList *existing_clients) > { > ECal *retval; >- GError *error; >- > > if (existing_clients) > { >@@ -348,20 +347,6 @@ load_esource (ESource *esource, > > e_cal_set_auth_func (retval, auth_func_cb, NULL); > >- error = NULL; >- if (!e_cal_open (retval, TRUE, &error)) >- { >- g_assert (error != NULL); >- g_warning ("Cannot open calendar from uri '%s': %s\n", >- e_cal_get_uri (retval), error->message); >- g_error_free (error); >- g_object_unref (retval); >- return NULL; >- } >- >- dprintf (" Loaded calendar from uri '%s'\n", >- e_cal_get_uri (retval)); >- > return retval; > } > >@@ -466,7 +451,7 @@ backend_died_cb (ECal *client, CalendarS > static void > calendar_sources_load_esource_list (CalendarSourceData *source_data) > { >- GSList *loaded_clients = NULL; >+ GSList *clients = NULL; > GSList *groups, *l; > gboolean emit_signal = FALSE; > >@@ -496,16 +481,16 @@ calendar_sources_load_esource_list (Cale > e_source_peek_relative_uri (esource)); > > if (is_source_selected (esource, source_data->selected_sources) && >- (client = load_esource (esource, source_data->source_type, source_data->clients))) >+ (client = get_ecal_from_source (esource, source_data->source_type, source_data->clients))) > { >- loaded_clients = g_slist_prepend (loaded_clients, client); >+ clients = g_slist_prepend (clients, client); > } > } > } > dprintf ("\n"); > > if (source_data->loaded && >- !compare_ecal_lists (source_data->clients, loaded_clients)) >+ !compare_ecal_lists (source_data->clients, clients)) > emit_signal = TRUE; > > for (l = source_data->clients; l; l = l->next) >@@ -517,7 +502,7 @@ calendar_sources_load_esource_list (Cale > g_object_unref (l->data); > } > g_slist_free (source_data->clients); >- source_data->clients = g_slist_reverse (loaded_clients); >+ source_data->clients = g_slist_reverse (clients); > > /* connect to backend_died after we disconnected the previous signal > * handlers. If we do it before, we'll lose some handlers (for clients that >Index: applets/clock/ChangeLog >=================================================================== >--- applets/clock/ChangeLog (revision 11148) >+++ applets/clock/ChangeLog (working copy) >@@ -1,3 +1,17 @@ >+2008-06-23 Chenthill Palanisamy <pchenthill@novell.com> >+ >+ Fixes #515948 >+ * calendar-client.c: (calendar_client_set_timezone), >+ (cal_opened_cb), (load_calendars), (calendar_client_init), >+ (calendar_client_update_appointments), >+ (calendar_client_update_tasks), (calendar_client_source_finalize), >+ (calendar_client_appointment_sources_changed), >+ (calendar_client_task_sources_changed): >+ * calendar-sources.c: (get_ecal_from_source), >+ (calendar_sources_load_esource_list): Open the calendar asynchronously. >+ * calendar-window.c: (is_appointment): include groupwise and exchange >+ protocols to appointment filters. >+ > 2008-06-19 Vincent Untz <vuntz@gnome.org> > > * clock.c: (fill_time_settings_window): fix previous commit. Thanks to >Index: applets/clock/calendar-client.c >=================================================================== >--- applets/clock/calendar-client.c (revision 11148) >+++ applets/clock/calendar-client.c (working copy) >@@ -120,6 +120,11 @@ static void calendar_client_start_query > static void calendar_client_source_finalize (CalendarClientSource *source); > static void calendar_client_query_finalize (CalendarClientQuery *query); > >+static void >+calendar_client_update_appointments (CalendarClient *client); >+static void >+calendar_client_update_tasks (CalendarClient *client); >+ > enum > { > PROP_O, >@@ -269,9 +274,6 @@ calendar_client_set_timezone (CalendarCl > for (l = esources; l; l = l->next) { > ECal *source = l->data; > >- if (e_cal_get_load_state (source) != E_CAL_LOAD_LOADED) >- continue; >- > e_cal_set_default_timezone (source, client->priv->zone, NULL); > } > } >@@ -285,6 +287,62 @@ calendar_client_timezone_changed_cb (GCo > calendar_client_set_timezone (client); > } > >+static void >+cal_opened_cb (ECal *ecal, ECalendarStatus status, CalendarClientSource *cl_source) >+{ >+ ECalSourceType s_type; >+ CalendarClient *client = cl_source->client; >+ >+ s_type = e_cal_get_source_type (ecal); >+ >+ if (status == E_CALENDAR_STATUS_BUSY && e_cal_get_load_state (ecal) == E_CAL_LOAD_NOT_LOADED) { >+ e_cal_open_async (ecal, FALSE); >+ return; >+ } else if (status != E_CALENDAR_STATUS_OK) { >+ if (s_type == E_CAL_SOURCE_TYPE_EVENT) >+ client->priv->appointment_sources = g_slist_remove (client->priv->appointment_sources, cl_source); >+ else >+ client->priv->task_sources = g_slist_remove (client->priv->task_sources, cl_source); >+ calendar_client_source_finalize (cl_source); >+ g_free (cl_source); >+ } >+ g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, cal_opened_cb, NULL); >+ >+ if (status != E_CALENDAR_STATUS_OK) >+ return; >+ >+ if (s_type == E_CAL_SOURCE_TYPE_EVENT) >+ calendar_client_update_appointments (client); >+ else >+ calendar_client_update_tasks (client); >+ >+ return; >+} >+ >+static void >+load_calendars (CalendarClient *client, gboolean load_appointments) >+{ >+ GSList *l, *clients; >+ >+ if (load_appointments) >+ clients = client->priv->appointment_sources; >+ else >+ clients = client->priv->task_sources; >+ >+ for (l = clients; l != NULL; l = l->next) { >+ ECal *ecal; >+ CalendarClientSource *cl_source = l->data; >+ >+ ecal = cl_source->source; >+ >+ if (e_cal_get_load_state (ecal) == E_CAL_LOAD_LOADED) >+ continue; >+ >+ /* Set the default timezone before the client is loaded */ >+ g_signal_connect (G_OBJECT (ecal), "cal_opened", G_CALLBACK (cal_opened_cb), cl_source); >+ e_cal_open_async (ecal, TRUE); >+ } >+} > > static void > calendar_client_init (CalendarClient *client) >@@ -294,6 +352,8 @@ calendar_client_init (CalendarClient *cl > client->priv = CALENDAR_CLIENT_GET_PRIVATE (client); > > client->priv->calendar_sources = calendar_sources_get (); >+ client->priv->gconf_client = gconf_client_get_default (); >+ > > esources = calendar_sources_get_appointment_sources (client->priv->calendar_sources); > client->priv->appointment_sources = >@@ -302,6 +362,11 @@ calendar_client_init (CalendarClient *cl > esources = calendar_sources_get_task_sources (client->priv->calendar_sources); > client->priv->task_sources = > calendar_client_update_sources_list (client, NULL, esources, signals [TASKS_CHANGED]); >+ >+ /* set the timezone before loading the clients */ >+ calendar_client_set_timezone (client); >+ load_calendars (client, TRUE); >+ load_calendars (client, FALSE); > > g_signal_connect_swapped (client->priv->calendar_sources, > "appointment-sources-changed", >@@ -312,14 +377,12 @@ calendar_client_init (CalendarClient *cl > G_CALLBACK (calendar_client_task_sources_changed), > client); > >- client->priv->gconf_client = gconf_client_get_default (); > > gconf_client_add_dir (client->priv->gconf_client, > CALENDAR_CONFIG_PREFIX, > GCONF_CLIENT_PRELOAD_NONE, > NULL); > >- calendar_client_set_timezone (client); > client->priv->zone_listener = gconf_client_notify_add (client->priv->gconf_client, > CALENDAR_CONFIG_TIMEZONE, > (GConfClientNotifyFunc) calendar_client_timezone_changed_cb, >@@ -1496,8 +1559,14 @@ calendar_client_update_appointments (Cal > "(make-time \"%s\")", > month_begin, month_end); > >- for (l = client->priv->appointment_sources; l; l = l->next) >- calendar_client_start_query (client, l->data, query); >+ for (l = client->priv->appointment_sources; l; l = l->next) { >+ CalendarClientSource *cs = l->data; >+ >+ if (e_cal_get_load_state (cs->source) != E_CAL_LOAD_LOADED) >+ continue; >+ >+ calendar_client_start_query (client, cs, query); >+ } > > g_free (month_begin); > g_free (month_end); >@@ -1556,8 +1625,14 @@ calendar_client_update_tasks (CalendarCl > query = g_strdup ("#t"); > #endif /* FIX_BROKEN_TASKS_QUERY */ > >- for (l = client->priv->task_sources; l; l = l->next) >- calendar_client_start_query (client, l->data, query); >+ for (l = client->priv->task_sources; l; l = l->next) { >+ CalendarClientSource *cs = l->data; >+ >+ if (e_cal_get_load_state (cs->source) != E_CAL_LOAD_LOADED) >+ continue; >+ >+ calendar_client_start_query (client, cs, query); >+ } > > #ifdef FIX_BROKEN_TASKS_QUERY > g_free (day_begin); >@@ -1571,8 +1646,10 @@ calendar_client_source_finalize (Calenda > { > source->client = NULL; > >- if (source->source) >+ if (source->source) { >+ g_signal_handlers_disconnect_matched (source->source, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, cal_opened_cb, NULL); > g_object_unref (source->source); >+ } > source->source = NULL; > > calendar_client_query_finalize (&source->completed_query); >@@ -1661,6 +1738,7 @@ calendar_client_appointment_sources_chan > esources, > signals [APPOINTMENTS_CHANGED]); > >+ load_calendars (client, TRUE); > calendar_client_update_appointments (client); > } > >@@ -1678,7 +1756,8 @@ calendar_client_task_sources_changed (Ca > client->priv->task_sources, > esources, > signals [TASKS_CHANGED]); >- >+ >+ load_calendars (client, FALSE); > calendar_client_update_tasks (client); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 454926
: 311510