aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@novell.com>2005-01-05 19:40:08 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2005-01-05 19:40:08 +0800
commit405a128ebd06be4a3628c4aa2413c8c44d07d7c6 (patch)
tree9eb2453ad7f2a35e13659aebd9bf36222c973f98
parent3fe558d643c7477f414cc9a8012d9f76df980bd7 (diff)
downloadgsoc2013-evolution-405a128ebd06be4a3628c4aa2413c8c44d07d7c6.tar
gsoc2013-evolution-405a128ebd06be4a3628c4aa2413c8c44d07d7c6.tar.gz
gsoc2013-evolution-405a128ebd06be4a3628c4aa2413c8c44d07d7c6.tar.bz2
gsoc2013-evolution-405a128ebd06be4a3628c4aa2413c8c44d07d7c6.tar.lz
gsoc2013-evolution-405a128ebd06be4a3628c4aa2413c8c44d07d7c6.tar.xz
gsoc2013-evolution-405a128ebd06be4a3628c4aa2413c8c44d07d7c6.tar.zst
gsoc2013-evolution-405a128ebd06be4a3628c4aa2413c8c44d07d7c6.zip
added a new argument to pass the calendar client, since it might happen to
2005-01-05 Rodrigo Moya <rodrigo@novell.com> * gui/e-day-view.c (e_day_view_find_event_from_uid): added a new argument to pass the calendar client, since it might happen to have events with the same UID on different calendars. (e_day_view_do_key_press, model_rows_deleted_cb): added new argument to e_day_view_find_event_from_uid. * gui/e-week-view.c (e_week_view_find_event_from_uid): same as e-day-view.c. (e_week_view_do_key_press, model_rows_deleted_cb): added new argument to e_week_view_find_event_from_uid. svn path=/trunk/; revision=28245
-rw-r--r--calendar/ChangeLog13
-rw-r--r--calendar/gui/e-day-view.c9
-rw-r--r--calendar/gui/e-week-view.c9
3 files changed, 27 insertions, 4 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 9276b09671..a1d789dad0 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,16 @@
+2005-01-05 Rodrigo Moya <rodrigo@novell.com>
+
+ * gui/e-day-view.c (e_day_view_find_event_from_uid): added a new
+ argument to pass the calendar client, since it might happen to have
+ events with the same UID on different calendars.
+ (e_day_view_do_key_press, model_rows_deleted_cb): added new argument
+ to e_day_view_find_event_from_uid.
+
+ * gui/e-week-view.c (e_week_view_find_event_from_uid): same as
+ e-day-view.c.
+ (e_week_view_do_key_press, model_rows_deleted_cb): added new argument
+ to e_week_view_find_event_from_uid.
+
2005-01-04 Rodrigo Moya <rodrigo@novell.com>
* gui/e-cal-component-preview.c (write_html): use the new e-categories
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index e350279cbb..f675d797ad 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -285,6 +285,7 @@ static ECalendarViewPosition e_day_view_convert_position_in_main_canvas (EDayVie
gint *row_return,
gint *event_num_return);
static gboolean e_day_view_find_event_from_uid (EDayView *day_view,
+ ECal *client,
const gchar *uid,
const gchar *rid,
gint *day_return,
@@ -622,7 +623,7 @@ model_rows_deleted_cb (ETableModel *etm, int row, int count, gpointer user_data)
rid = icaltime_as_ical_string (icalcomponent_get_recurrenceid (comp_data->icalcomp));
}
- if (e_day_view_find_event_from_uid (day_view, uid, rid, &day, &event_num))
+ if (e_day_view_find_event_from_uid (day_view, comp_data->client, uid, rid, &day, &event_num))
e_day_view_remove_event_cb (day_view, day, event_num, NULL);
}
@@ -1908,6 +1909,7 @@ e_day_view_find_event_from_item (EDayView *day_view,
see if any events with the uid exist. */
static gboolean
e_day_view_find_event_from_uid (EDayView *day_view,
+ ECal *client,
const gchar *uid,
const gchar *rid,
gint *day_return,
@@ -1926,6 +1928,9 @@ e_day_view_find_event_from_uid (EDayView *day_view,
event = &g_array_index (day_view->events[day],
EDayViewEvent, event_num);
+ if (event->comp_data->client != client)
+ continue;
+
u = icalcomponent_get_uid (event->comp_data->icalcomp);
if (u && !strcmp (uid, u)) {
if (rid && *rid) {
@@ -4812,7 +4817,7 @@ e_day_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
gtk_widget_queue_draw (day_view->top_canvas);
gtk_widget_queue_draw (day_view->main_canvas);
- if (e_day_view_find_event_from_uid (day_view, uid, NULL, &day, &event_num)) {
+ if (e_day_view_find_event_from_uid (day_view, ecal, uid, NULL, &day, &event_num)) {
e_day_view_start_editing_event (day_view, day, event_num,
initial_text);
} else {
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 50ff88f542..17ebc66370 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -161,6 +161,7 @@ static void e_week_view_on_editing_started (EWeekView *week_view,
static void e_week_view_on_editing_stopped (EWeekView *week_view,
GnomeCanvasItem *item);
static gboolean e_week_view_find_event_from_uid (EWeekView *week_view,
+ ECal *client,
const gchar *uid,
const gchar *rid,
gint *event_num_return);
@@ -417,7 +418,7 @@ model_rows_deleted_cb (ETableModel *etm, int row, int count, gpointer user_data)
rid = icaltime_as_ical_string (icalcomponent_get_recurrenceid (comp_data->icalcomp));
}
- if (e_week_view_find_event_from_uid (week_view, uid, rid, &event_num))
+ if (e_week_view_find_event_from_uid (week_view, comp_data->client, uid, rid, &event_num))
e_week_view_remove_event_cb (week_view, event_num, NULL);
}
@@ -3360,6 +3361,7 @@ e_week_view_find_event_from_item (EWeekView *week_view,
see if any events with the uid exist. */
static gboolean
e_week_view_find_event_from_uid (EWeekView *week_view,
+ ECal *client,
const gchar *uid,
const gchar *rid,
gint *event_num_return)
@@ -3378,6 +3380,9 @@ e_week_view_find_event_from_uid (EWeekView *week_view,
event = &g_array_index (week_view->events, EWeekViewEvent,
event_num);
+ if (event->comp_data->client != client)
+ continue;
+
u = icalcomponent_get_uid (event->comp_data->icalcomp);
if (u && !strcmp (uid, u)) {
if (rid && *rid) {
@@ -3725,7 +3730,7 @@ e_week_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
e_week_view_check_layout (week_view);
gtk_widget_queue_draw (week_view->main_canvas);
- if (e_week_view_find_event_from_uid (week_view, uid, NULL, &event_num)) {
+ if (e_week_view_find_event_from_uid (week_view, ecal, uid, NULL, &event_num)) {
EWeekViewEvent *event;
EWeekViewEventSpan *span;