Re: [Evolution-hackers] Error while trying to obtain ESource list
On Tue, 2006-07-25 at 19:19 -0400, Peter Colijn wrote: I think the issue here is that g_type_init() is not being called. Generally for gnome programs, the first thing main() should do is call gnome_program_init, which will call the init()s of a bunch of libraries and make sure that everything is happy. I can get e_source_list_new() to not complain with the following code: libgnome is being deprecated, so unless you have a massive requirement to use GnomeProgram, the gtk_init (argc, argv); will be sufficient. Ross -- Ross Burton mail: [EMAIL PROTECTED] jabber: [EMAIL PROTECTED] www: http://www.burtonini.com./ PGP Fingerprint: 1A21 F5B0 D8D0 CFE3 81D4 E25A 2D09 E447 D0B4 33DF signature.asc Description: This is a digitally signed message part ___ Evolution-hackers mailing list Evolution-hackers@gnome.org http://mail.gnome.org/mailman/listinfo/evolution-hackers
[Evolution-hackers] Creating objects in ECal
I am trying to add an event into my ECal, using the following code: ... // Convert vevent into iCalComponent icalcomponent* iCalComp = icalcomponent_new_from_string(Filecontents); // Create an object in calendar gboolean is_create = e_cal_create_object(ecal, iCalComp, (char **)uid, error); printf(%s%d,Did event add successfully? = ,is_create); printf(%s%s,\nError message = ,error-message); g_error_free (error); ...where my Filecontents is a (sample) string that contains the following:BEGIN:VEVENTUID:[EMAIL PROTECTED] DTSTAMP:20060901T1300ZDTSTART:20060401T163000ZDTEND:20060402T01ZSUMMARY:Claudia is in sensitivity awareness class.CLASS:PUBLICCATEGORIES:BUSINESS,HUMAN RESOURCESTRANSP:TRANSPARENTEND:VEVENT The first time I run the program, I get a pop-up box saying that the application has quit unexpectedly. But when I run it again, the GError contains the message that Object ID already exists. At the same time, I cannot see the event on my evolution calendar.It behaves similarly when I use the e_cal_remove_object() function. First time running, gives the pop-up box and after that GError contains the message that Object ID not found.Am I missing something? ___ Evolution-hackers mailing list Evolution-hackers@gnome.org http://mail.gnome.org/mailman/listinfo/evolution-hackers
[Evolution-hackers] Missing functions from libecal API reference doc
After days of playing around with ESources and ESourceLists, I realized that all I needed was the e_cal_open_default() function from e-cal.h. Unfortunately, this function seems to be missing from the API docs. Please do add it to the docs, as it is quite a useful function. It is declared around line 204 of e-cal.h ___ Evolution-hackers mailing list Evolution-hackers@gnome.org http://mail.gnome.org/mailman/listinfo/evolution-hackers
Re: [Evolution-hackers] Creating objects in ECal
To add to my previous question, the statementprintf(%d, icalcomponent_is_valid(iCalComp));prints a 1.What could be going wrong? On 7/26/06, Teresa Thomas [EMAIL PROTECTED] wrote: I am trying to add an event into my ECal, using the following code: ... // Convert vevent into iCalComponent icalcomponent* iCalComp = icalcomponent_new_from_string(Filecontents); // Create an object in calendar gboolean is_create = e_cal_create_object(ecal, iCalComp, (char **)uid, error); printf(%s%d,Did event add successfully? = ,is_create); printf(%s%s,\nError message = ,error-message); g_error_free (error); ...where my Filecontents is a (sample) string that contains the following:BEGIN:VEVENT UID:[EMAIL PROTECTED] DTSTAMP:20060901T1300ZDTSTART:20060401T163000ZDTEND:20060402T01ZSUMMARY:Claudia is in sensitivity awareness class.CLASS:PUBLICCATEGORIES:BUSINESS,HUMAN RESOURCESTRANSP:TRANSPARENTEND:VEVENT The first time I run the program, I get a pop-up box saying that the application has quit unexpectedly. But when I run it again, the GError contains the message that Object ID already exists. At the same time, I cannot see the event on my evolution calendar.It behaves similarly when I use the e_cal_remove_object() function. First time running, gives the pop-up box and after that GError contains the message that Object ID not found.Am I missing something? ___ Evolution-hackers mailing list Evolution-hackers@gnome.org http://mail.gnome.org/mailman/listinfo/evolution-hackers
Re: [Evolution-hackers] Creating objects in ECal
Hi Teresa, On 7/27/06, Teresa Thomas [EMAIL PROTECTED] wrote: printf(%d, icalcomponent_is_valid(iCalComp)); prints a 1. BEGIN:VEVENT UID:[EMAIL PROTECTED] DTSTAMP:20060901T1300Z DTSTART:20060401T163000Z DTEND:20060402T01Z SUMMARY:Claudia is in sensitivity awareness class. CLASS:PUBLIC CATEGORIES:BUSINESS,HUMAN RESOURCES TRANSP:TRANSPARENT END:VEVENT Hmm. I'm not entirely sure this is the issue, but I notice that your DTSTAMP is not a proper RFC2445 date-time value; you'd want DTSTAMP:20060901T13Z (i.e. you are missing 2 '0's) The other thing is that in RFC2445, commas need to be escaped with a backslash in values to avoid having them interpreted as a list (perhaps this is not a precisely correct interpretation; someone may well correct me). However, in CATEGORIES, you actually want a list, so in general there is no need to escape any commas. BUT evolution usually does anyway, so you might want to try that just in case :P Hope that helps.. these are just shots in the dark; I haven't tried either of them myself. Have fun, Peter ___ Evolution-hackers mailing list Evolution-hackers@gnome.org http://mail.gnome.org/mailman/listinfo/evolution-hackers