From 7146e58b6af71dd0b07db0c3ec454c19aee0ac1e Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Wed, 14 Jan 2004 17:56:13 +0000 Subject: use get_selected_objects() instead of get_selected_comp(). 2004-01-14 Rodrigo Moya * gui/e-calendar-table.c (e_calendar_table_show_popup_menu): use get_selected_objects() instead of get_selected_comp(). svn path=/trunk/; revision=24223 --- calendar/gui/e-calendar-table.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'calendar/gui') diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c index 4226628b35..786f97504a 100644 --- a/calendar/gui/e-calendar-table.c +++ b/calendar/gui/e-calendar-table.c @@ -1098,21 +1098,20 @@ e_calendar_table_show_popup_menu (ETable *table, int disable_mask = 0; GtkMenu *gtk_menu; icalproperty *prop; + GSList *selection; ECalModelComponent *comp_data; gboolean read_only = TRUE; - - n_selected = e_table_selected_count (table); - if (n_selected <= 0) - return TRUE; - comp_data = get_selected_comp (cal_table); - g_assert (comp_data != NULL); + selection = get_selected_objects (cal_table); + if (!selection) + return TRUE; + comp_data = selection->data; + n_selected = g_slist_length (selection); if (n_selected == 1) { hide_mask = MASK_MULTIPLE; /* See if the task has the URL property set */ - prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_URL_PROPERTY); if (!prop) disable_mask |= MASK_LACKS_URL; @@ -1132,6 +1131,8 @@ e_calendar_table_show_popup_menu (ETable *table, e_popup_menu (gtk_menu, gdk_event); + g_slist_free (selection); + return TRUE; } -- cgit v1.2.3