diff options
author | Damon Chaplin <damon@ximian.com> | 2001-08-15 09:13:37 +0800 |
---|---|---|
committer | Damon Chaplin <damon@src.gnome.org> | 2001-08-15 09:13:37 +0800 |
commit | 6684b4627d4767f6ea5d2969d70ae6f2cf863a79 (patch) | |
tree | 89d7a6fba9713ff48fe44ed4bad3ee94471030e6 /calendar/gui/e-week-view-event-item.c | |
parent | 84f12a913e4a46c198a951dd2b10512fb87ce0a3 (diff) | |
download | gsoc2013-evolution-6684b4627d4767f6ea5d2969d70ae6f2cf863a79.tar.gz gsoc2013-evolution-6684b4627d4767f6ea5d2969d70ae6f2cf863a79.tar.zst gsoc2013-evolution-6684b4627d4767f6ea5d2969d70ae6f2cf863a79.zip |
added support for the Contacts field. Note that I'm not sure what we
2001-08-14 Damon Chaplin <damon@ximian.com>
* gui/dialogs/task-page.c:
* gui/dialogs/event-page.c: added support for the Contacts field.
Note that I'm not sure what we should put in the iCalendar CONTACT
properties. Currently we put "name <email>", but it isn't recognized
as a contact when we reopen the dialog, so we may need more info here.
Also we currently use a simple parser to parse the above format, and
we should maybe use some camel function.
* gui/dialogs/task-page.glade:
* gui/dialogs/event-page.glade: replaced the GtkEntry fields for the
Contacts with a GtkEventBox which we put the BonoboControl in at
runtime.
* gui/dialogs/meeting-page.c (invite_entry_changed): added FIXMEs
since it doesn't seem to be freeing the EDestination stuff. JP?
* gui/dialogs/comp-editor-util.c: added bunch of utility functions to
handle the Contacts field in the main Event and Task pages.
* gui/gnome-cal.c: added visible_start and visible_end fields, so we
only emit the 'dates-shown-changed' signal when really necessary.
Currently changing the folder title bar label results in a complete
redraw of the Evolution window (silly GtkLabel queueing a resize),
so we want to avoid that as much as possible.
(gnome_calendar_new_appointment_for): only move the event's end time
to the end of the day if it is not already 00:00:00.
* gui/e-week-view-event-item.c:
* gui/e-week-view.c:
* gui/e-day-view.c: added support for double-clicking on an event to
open it, and for double-clicking on the background to create a new
event. There is still a minor problem to sort out, but it basically
works.
* cal-util/cal-component.c: added support for CONTACT properties,
mainly by copying the code for COMMENT properties which are exactly
the same type.
* gui/e-day-view.c (e_day_view_realize): use the same color for the
top canvas background as the shortcut bar, to make it look a little
nicer (I think). Although we still have the theme problem with
hard-coded colors.
svn path=/trunk/; revision=12039
Diffstat (limited to 'calendar/gui/e-week-view-event-item.c')
-rw-r--r-- | calendar/gui/e-week-view-event-item.c | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c index f0b4a167b3..bf321b2bf3 100644 --- a/calendar/gui/e-week-view-event-item.c +++ b/calendar/gui/e-week-view-event-item.c @@ -83,6 +83,8 @@ static gboolean e_week_view_event_item_button_press (EWeekViewEventItem *wveitem GdkEvent *event); static gboolean e_week_view_event_item_button_release (EWeekViewEventItem *wveitem, GdkEvent *event); +static gboolean e_week_view_event_item_double_click (EWeekViewEventItem *wveitem, + GdkEvent *bevent); static EWeekViewPosition e_week_view_event_item_get_position (EWeekViewEventItem *wveitem, gdouble x, gdouble y); @@ -724,6 +726,8 @@ e_week_view_event_item_event (GnomeCanvasItem *item, GdkEvent *event) wveitem = E_WEEK_VIEW_EVENT_ITEM (item); switch (event->type) { + case GDK_2BUTTON_PRESS: + return e_week_view_event_item_double_click (wveitem, event); case GDK_BUTTON_PRESS: return e_week_view_event_item_button_press (wveitem, event); case GDK_BUTTON_RELEASE: @@ -812,7 +816,7 @@ e_week_view_event_item_button_release (EWeekViewEventItem *wveitem, week_view = E_WEEK_VIEW (GTK_WIDGET (item->canvas)->parent); g_return_val_if_fail (E_IS_WEEK_VIEW (week_view), FALSE); -#if 0 +#if 1 g_print ("In e_week_view_event_item_button_release\n"); #endif @@ -833,6 +837,33 @@ e_week_view_event_item_button_release (EWeekViewEventItem *wveitem, } +static gboolean +e_week_view_event_item_double_click (EWeekViewEventItem *wveitem, + GdkEvent *bevent) +{ + EWeekView *week_view; + EWeekViewEvent *event; + GnomeCanvasItem *item; + + item = GNOME_CANVAS_ITEM (wveitem); + + week_view = E_WEEK_VIEW (GTK_WIDGET (item->canvas)->parent); + g_return_val_if_fail (E_IS_WEEK_VIEW (week_view), FALSE); + + event = &g_array_index (week_view->events, EWeekViewEvent, + wveitem->event_num); + + e_week_view_stop_editing_event (week_view); + + if (week_view->calendar) + gnome_calendar_edit_object (week_view->calendar, event->comp); + else + g_warning ("Calendar not set"); + + return TRUE; +} + + static EWeekViewPosition e_week_view_event_item_get_position (EWeekViewEventItem *wveitem, gdouble x, |