Hello community, here is the log from the commit of package gnome-panel checked in at Tue Apr 18 16:03:54 CEST 2006. -------- --- GNOME/gnome-panel/gnome-panel.changes 2006-03-25 00:04:49.000000000 +0100 +++ STABLE/gnome-panel/gnome-panel.changes 2006-04-18 02:11:01.000000000 +0200 @@ -1,0 +2,5 @@ +Tue Apr 18 01:44:52 CEST 2006 - jpr@suse.de + +- Make sure all events are shown properly (#160200) + +------------------------------------------------------------------- New: ---- gnome-panel-cal-updates-160200.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gnome-panel.spec ++++++ --- /var/tmp/diff_new_pack.53BbUk/_old 2006-04-18 16:03:24.000000000 +0200 +++ /var/tmp/diff_new_pack.53BbUk/_new 2006-04-18 16:03:24.000000000 +0200 @@ -18,7 +18,7 @@ Group: System/GUI/GNOME Autoreqprov: on Version: 2.12.2 -Release: 29 +Release: 33 Summary: The GNOME 2.x Desktop Panel Source: ftp://ftp.gnome.org/pub/gnome/sources/gnome-panel/2.11/%{name}-%{version}.tar.bz2 URL: http://www.gnome.org @@ -54,6 +54,7 @@ Patch44: gnome-panel-transparency.patch Patch45: gnome-panel-recently-used-apps.patch Patch46: gnome-panel-missing-icon-no-dialog.patch +Patch47: gnome-panel-cal-updates-160200.patch Obsoletes: gnome-core %description @@ -244,6 +245,7 @@ %patch44 %patch45 %patch46 +%patch47 # this is for the gnome-panel-corners.patch # which has been temporarily removed for reworking #cd icons @@ -376,6 +378,8 @@ %{prefix}/share/gnome-2.0/ui/GNOME_FishApplet.xml %changelog -n gnome-panel +* Tue Apr 18 2006 - jpr@suse.de +- Make sure all events are shown properly (#160200) * Sat Mar 25 2006 - joeshaw@suse.de - Don't pop up a warning if we can't load an icon. Fixes bnc [#157121]. ++++++ gnome-panel-cal-updates-160200.patch ++++++ Index: applets/clock/calendar-client.c =================================================================== RCS file: /cvs/gnome/gnome-panel/applets/clock/calendar-client.c,v retrieving revision 1.11 diff -u -r1.11 calendar-client.c --- applets/clock/calendar-client.c 7 Jun 2005 15:30:47 -0000 1.11 +++ applets/clock/calendar-client.c 18 Apr 2006 13:07:49 -0000 @@ -506,6 +506,22 @@ } static char * +get_ical_rid (icalcomponent *ical) +{ + icalproperty *prop; + struct icaltimetype ical_time; + + prop = icalcomponent_get_first_property (ical, ICAL_RECURRENCEID_PROPERTY); + if (!prop) + return NULL; + + ical_time = icalproperty_get_recurrenceid (prop); + + return icaltime_is_valid_time (ical_time) && !icaltime_is_null_time (ical_time) ? + g_strdup (icaltime_as_ical_string (ical_time)) : NULL; +} + +static char * get_ical_summary (icalcomponent *ical) { icalproperty *prop; @@ -763,6 +779,7 @@ icaltimezone *default_zone) { appointment->uid = get_ical_uid (ical); + appointment->rid = get_ical_rid (ical); appointment->summary = get_ical_summary (ical); appointment->description = get_ical_description (ical); appointment->color_string = get_source_color (source->source); @@ -993,16 +1010,16 @@ return retval; } -static const char * +static char * calendar_event_get_uid (CalendarEvent *event) { switch (event->type) { case CALENDAR_EVENT_APPOINTMENT: - return CALENDAR_APPOINTMENT (event)->uid; + return g_strdup_printf ("%s%s", CALENDAR_APPOINTMENT (event)->uid, CALENDAR_APPOINTMENT (event)->rid ? CALENDAR_APPOINTMENT (event)->rid : ""); break; case CALENDAR_EVENT_TASK: - return CALENDAR_TASK (event)->uid; + return g_strdup (CALENDAR_TASK (event)->uid); break; default: g_assert_not_reached (); @@ -1210,14 +1227,14 @@ static void calendar_client_handle_query_result (CalendarClientSource *source, - GSList *objects, + GList *objects, ECalView *view) { CalendarClientQuery *query; CalendarClient *client; gboolean emit_signal; gboolean events_changed; - GSList *l; + GList *l; GTime month_begin; GTime month_end; @@ -1226,7 +1243,7 @@ query = goddamn_this_is_crack (source, view, &emit_signal); dprintf ("Query %p result: %d objects:\n", - query, g_slist_length (objects)); + query, g_list_length (objects)); month_begin = make_time_for_day_begin (1, client->priv->month, @@ -1242,7 +1259,8 @@ CalendarEvent *event; CalendarEvent *old_event; icalcomponent *ical = l->data; - + char *uid; + event = calendar_event_new (ical, source, client->priv->zone); calendar_event_generate_ocurrences (event, ical, @@ -1251,21 +1269,24 @@ month_end, client->priv->zone); - old_event = g_hash_table_lookup (query->events, - icalcomponent_get_uid (ical)); + uid = calendar_event_get_uid (event); + + old_event = g_hash_table_lookup (query->events, uid); if (!calendar_event_equal (event, old_event)) { - dprintf ("Event %s: ", old_event ? "modified" : "added"); + dprintf ("Event %s: ", old_event ? "modified" : "added"); calendar_event_debug_dump (event); - g_hash_table_replace (query->events, - (char *) calendar_event_get_uid (event), - event); + g_hash_table_replace (query->events, uid, event); events_changed = TRUE; } + else + { + g_free (uid); + } } if (emit_signal && events_changed) @@ -1274,25 +1295,55 @@ } } +static gboolean +check_object_remove (gpointer key, gpointer value, gpointer data) +{ + char *uid = data; + ssize_t len; + + len = strlen (uid); + + if (len <= strlen (key) && strncmp (uid, key, len) == 0) + { + dprintf ("Event removed: "); + + calendar_event_debug_dump (value); + + return TRUE; + } + + return FALSE; +} + static void calendar_client_handle_objects_removed (CalendarClientSource *source, - GSList *uids, + GList *ids, ECalView *view) { CalendarClientQuery *query; gboolean emit_signal; gboolean events_changed; - GSList *l; + GList *l; query = goddamn_this_is_crack (source, view, &emit_signal); events_changed = FALSE; - for (l = uids; l; l = l->next) + for (l = ids; l; l = l->next) { CalendarEvent *event; - const char *uid = l->data; + ECalComponentId *id = l->data; + char *uid = g_strdup_printf ("%s%s", id->uid, id->rid ? id->rid : ""); - if ((event = g_hash_table_lookup (query->events, uid))) + if (!id->rid || !(*id->rid)) + { + int size = g_hash_table_size (query->events); + + g_hash_table_foreach_remove (query->events, check_object_remove, id->uid); + + if (size != g_hash_table_size (query->events)) + events_changed = TRUE; + } + else if ((event = g_hash_table_lookup (query->events, uid))) { dprintf ("Event removed: "); @@ -1302,6 +1353,7 @@ events_changed = TRUE; } + g_free (uid); } if (emit_signal && events_changed) @@ -1377,7 +1429,7 @@ source->in_progress_query.events = g_hash_table_new_full (g_str_hash, g_str_equal, - NULL, + g_free, (GDestroyNotify) calendar_event_free); g_signal_connect_swapped (view, "objects-added", @@ -1416,10 +1468,8 @@ client->priv->month + 1, client->priv->year); - /* FIXME: occur-in-time-range should take recurrences into account */ - query = g_strdup_printf ("(or (occur-in-time-range? (make-time \"%s\") " - "(make-time \"%s\")) " - "(has-recurrences?))", + query = g_strdup_printf ("occur-in-time-range? (make-time \"%s\") " + "(make-time \"%s\")", month_begin, month_end); for (l = client->priv->appointment_sources; l; l = l->next) Index: applets/clock/calendar-client.h =================================================================== RCS file: /cvs/gnome/gnome-panel/applets/clock/calendar-client.h,v retrieving revision 1.5 diff -u -r1.5 calendar-client.h --- applets/clock/calendar-client.h 7 Jun 2005 15:30:47 -0000 1.5 +++ applets/clock/calendar-client.h 18 Apr 2006 13:07:50 -0000 @@ -73,6 +73,7 @@ typedef struct { char *uid; + char *rid; char *summary; char *description; char *color_string; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...