From 28009dd47c5a879ec598cc70021ab9e95694f3d9 Mon Sep 17 00:00:00 2001 From: Harish Krishnaswamy Date: Thu, 25 Nov 2004 14:51:18 +0000 Subject: Evo UI Hackfest : harish * gui/calendar-component.c: (new_calendar_cb), (edit_calendar_cb): Use modified_setup_edit_calendar call. (popup_event_cb): If source is null (Rt click on a source group), show the new calendar popup menu item. Else, do not show the new calendar option. * gui/dialogs/calendar-setup.[ch] (eccp_get_source_type): Compare the source_groups by their uid and not the pointers, so that the correct option is activated on the combo box. (calendar_setup_edit_calendar) : add a source_group parameter to the function. (calendar_setup_new_calendar): Use modified signature of the above function. * gui/e-calendar-view.c (on_edit_appointment): check the icalcomponent to see if it is a meeting and set the argument to e_calendar_view_edit_appointment correctly. svn path=/trunk/; revision=27991 --- calendar/gui/calendar-component.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'calendar/gui/calendar-component.c') diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index 70b9ccd22c..5362abbad8 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -363,7 +363,7 @@ delete_calendar_cb (EPopup *ep, EPopupItem *pitem, void *data) static void new_calendar_cb (EPopup *ep, EPopupItem *pitem, void *data) { - calendar_setup_new_calendar (GTK_WINDOW (gtk_widget_get_toplevel(ep->target->widget))); + calendar_setup_edit_calendar (GTK_WINDOW (gtk_widget_get_toplevel(ep->target->widget)), NULL, pitem->user_data); } static void @@ -376,7 +376,7 @@ edit_calendar_cb (EPopup *ep, EPopupItem *pitem, void *data) if (!selected_source) return; - calendar_setup_edit_calendar (GTK_WINDOW (gtk_widget_get_toplevel(ep->target->widget)), selected_source); + calendar_setup_edit_calendar (GTK_WINDOW (gtk_widget_get_toplevel(ep->target->widget)), selected_source, NULL); } static EPopupItem ecc_source_popups[] = { @@ -412,8 +412,19 @@ popup_event_cb(ESourceSelector *selector, ESource *insource, GdkEventButton *eve t = e_cal_popup_target_new_source(ep, selector); t->target.widget = (GtkWidget *)component_view->calendar; - for (i=0;i