Re: [Evolution-hackers] Getting an appointment's summary info...



On Fri, 2005-03-04 at 14:27 -0500, Tom Copeland wrote:
> ...there seem to be a couple of ways to do it, assuming that you already
> have a handle on an ECalComponent:
> 
> - use the ECalComponentText widget
> 
> ECalComponentText summary;
> e_cal_component_get_summary(ev_appt, &summary);
> g_message("Summary is %s", summary.value);
> 
> - use the icalcomponent property stuff
> 
> icalcomponent* icc = e_cal_component_get_icalcomponent(ev_appt);
> icalproperty* prop = icalcomponent_get_first_property (icc,
> ICAL_SUMMARY_PROPERTY);
> g_message("Summary is %s", (char*)icalproperty_get_summary(prop));
> 
> Is there a preferred way to handle these things?  The first way strikes
> me as more readable... just wondering if that was the usual
> convention...

You should prefer the first.  The libical/e-cal-component stuff is a bit
of a mismash, but unless the e-cal-component is missing the API you
need, use it.

-JP
-- 
JP Rosevear <jpr novell com>
Novell, Inc.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]