Re: [Evolution-hackers] e_cal_new_system_calendar() -> creates a new calendar each time?
- From: Patrick Ohly <patrick ohly gmx de>
- To: Evolution Hackers <evolution-hackers gnome org>
- Subject: Re: [Evolution-hackers] e_cal_new_system_calendar() -> creates a new calendar each time?
- Date: Thu, 07 Apr 2011 11:27:28 +0200
On Do, 2011-04-07 at 10:47 +0200, Patrick Ohly wrote:
> Hello!
>
> I noticed that in 2.32/MeeGo, e_cal_new_system_calendar() always creates
> a new calendar, although there is already one.
>
> It is defined in gconf as:
>
> <group uid="1300454894.7178.0@pohly-mobl1" name="On This Computer"
> base_uri="local:" readonly="no"><source
> uid="1300454894.7178.4@pohly-mobl1" name="Personal"
> relative_uri="system" color_spec="#BECEDD"/></group>
>
> The sequence of events is this:
> 1. e_cal_new_system_calendar()
> 2. e_cal_new_from_uri("local:system", ...
> 3. get source list
> 4. search_known_sources() by comparing e_source_peek_absolute_uri()
> against "local:system"
> 5. no source found, create anew
>
> Step 4 fails because there is no absolute URI:
>
> (gdb) p source->priv->absolute_uri
> $11 = (gchar *) 0x0
> (gdb) p source->priv->relative_uri
> $12 = (gchar *) 0x8079450 "system"
>
> Therefore e_source_peek_absolute_uri() returns NULL and the comparison
> fails.
>
> What is the root cause for this issue, and how should it be fixed?
absolute_uri is taken from the "uri" property, so adding that to the
gconf sources works around the issue.
Perhaps dump_common_to_xml_node() and the code after
/* do not store absolute uris for local:system sources */
is to blame?
Or if "uri" is correctly not set, then
e_cal_new_system_calendar()/e_cal_new_from_uri() must be fixed to cope
with that?
One more oddity: on the client side, e_source_get_uri() for the system
calendar returns "local:/system". What is the correct absolute URI for
the local system calendar?
--
Bye, Patrick Ohly
--
Patrick Ohly gmx de
http://www.estamos.de/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]