Re: [Evolution-hackers] e_cal_new_system_calendar() -> creates a new calendar each time?

2011-04-07 Thread Matthew Barnes
On Thu, 2011-04-07 at 15:01 +0200, Milan Crha wrote: 
> "was a bug" is more accurate, same as all (or most) things Patrick found
> in his 2.32.2 (I hope it's .2). Check changes in e-source.c and related
> files in master git branch of evolution-data-server, you may find those
> fixes there.

Oh, good news!  Thanks for that.

I know this is a sore subject but it would be worth backporting that fix
to gnome-2-32 if we can, since MeeGo is apparently locked into that
version (or perhaps more accurately, gtk2?) for the time being.

I'll look into doing so later today unless you want to.

___
evolution-hackers mailing list
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
http://mail.gnome.org/mailman/listinfo/evolution-hackers


Re: [Evolution-hackers] e_cal_new_system_calendar() -> creates a new calendar each time?

2011-04-07 Thread Milan Crha
On Thu, 2011-04-07 at 06:40 -0400, Matthew Barnes wrote:
> The absolute URI for the "system" calendar is "local:system".  There
> should be no slash.  That's a bug.

Hi,
"was a bug" is more accurate, same as all (or most) things Patrick found
in his 2.32.2 (I hope it's .2). Check changes in e-source.c and related
files in master git branch of evolution-data-server, you may find those
fixes there.
Bye,
Milan

___
evolution-hackers mailing list
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
http://mail.gnome.org/mailman/listinfo/evolution-hackers


Re: [Evolution-hackers] e_cal_new_system_calendar() -> creates a new calendar each time?

2011-04-07 Thread Matthew Barnes
On Thu, 2011-04-07 at 10:47 +0200, Patrick Ohly wrote: 
> 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.

Perhaps it should be calling e_source_get_uri() instead, which either
returns the explicit absolute URI or constructs one from the group's
base URI + the source's relative URI.

The absolute URI for the "system" calendar is "local:system".  There
should be no slash.  That's a bug.

___
evolution-hackers mailing list
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
http://mail.gnome.org/mailman/listinfo/evolution-hackers


Re: [Evolution-hackers] e_cal_new_system_calendar() -> creates a new calendar each time?

2011-04-07 Thread Patrick Ohly
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:
> 
>  base_uri="local:" readonly="no"> uid="1300454894.7178.4@pohly-mobl1" name="Personal"
> relative_uri="system" color_spec="#BECEDD"/>
> 
> 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.o...@gmx.de
http://www.estamos.de/


___
evolution-hackers mailing list
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
http://mail.gnome.org/mailman/listinfo/evolution-hackers


[Evolution-hackers] e_cal_new_system_calendar() -> creates a new calendar each time?

2011-04-07 Thread Patrick Ohly
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:



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?

-- 
Bye, Patrick Ohly
--  
patrick.o...@gmx.de
http://www.estamos.de/


___
evolution-hackers mailing list
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
http://mail.gnome.org/mailman/listinfo/evolution-hackers