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/dialogs/calendar-setup.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'calendar/gui/dialogs/calendar-setup.c') diff --git a/calendar/gui/dialogs/calendar-setup.c b/calendar/gui/dialogs/calendar-setup.c index 1996cc6db1..f848504981 100644 --- a/calendar/gui/dialogs/calendar-setup.c +++ b/calendar/gui/dialogs/calendar-setup.c @@ -198,7 +198,7 @@ eccp_get_source_type (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidg gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, e_source_group_peek_name (group), 1, group, -1); - if (sdialog->source_group == group) + if (!strcmp (e_source_group_peek_uid (sdialog->source_group), e_source_group_peek_uid (group))) active = i; i++; } @@ -347,7 +347,7 @@ static ECalConfigItem ectp_items[] = { * Show calendar properties for @source. **/ void -calendar_setup_edit_calendar (struct _GtkWindow *parent, ESource *source) +calendar_setup_edit_calendar (struct _GtkWindow *parent, ESource *source, ESourceGroup *group) { CalendarSourceDialog *sdialog = g_new0 (CalendarSourceDialog, 1); char *xml; @@ -380,6 +380,8 @@ calendar_setup_edit_calendar (struct _GtkWindow *parent, ESource *source) sdialog->source_group = (ESourceGroup *)sdialog->menu_source_groups->data; g_object_unref (gconf); + if (group) + sdialog->source_group = (ESourceGroup *)group; } /* HACK: doesn't work if you don't do this */ @@ -407,7 +409,7 @@ calendar_setup_edit_calendar (struct _GtkWindow *parent, ESource *source) void calendar_setup_new_calendar (struct _GtkWindow *parent) { - calendar_setup_edit_calendar (parent, NULL); + calendar_setup_edit_calendar (parent, NULL, NULL); } void -- cgit v1.2.3