diff options
-rw-r--r-- | calendar/ChangeLog | 7 | ||||
-rw-r--r-- | calendar/gui/e-cal-list-view.c | 18 |
2 files changed, 25 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 66967a7c29..8cd9b1a3ca 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,5 +1,12 @@ 2004-05-03 JP Rosevear <jpr@ximian.com> + * gui/e-cal-list-view.c (setup_e_table): listen for double click + signal + (e_cal_list_view_on_table_double_click): edit the appointment that + was double clicked on + +2004-05-03 JP Rosevear <jpr@ximian.com> + * gui/calendar-component.c (set_info): set the info label (calendar_dates_changed_cb): call back for when the dates of the calendar change diff --git a/calendar/gui/e-cal-list-view.c b/calendar/gui/e-cal-list-view.c index 73e10e0065..ab1feefa7c 100644 --- a/calendar/gui/e-cal-list-view.c +++ b/calendar/gui/e-cal-list-view.c @@ -83,6 +83,8 @@ static gboolean e_cal_list_view_popup_menu (GtkWidget *widget); static void e_cal_list_view_show_popup_menu (ECalListView *cal_list_view, gint row, GdkEvent *gdk_event); +static gboolean e_cal_list_view_on_table_double_click (GtkWidget *table, gint row, gint col, + GdkEvent *event, gpointer data); static gboolean e_cal_list_view_on_table_right_click (GtkWidget *table, gint row, gint col, GdkEvent *event, gpointer data); @@ -284,6 +286,8 @@ setup_e_table (ECalListView *cal_list_view) /* Connect signals */ g_signal_connect (e_table_scrolled_get_table (cal_list_view->table_scrolled), + "double_click", G_CALLBACK (e_cal_list_view_on_table_double_click), cal_list_view); + g_signal_connect (e_table_scrolled_get_table (cal_list_view->table_scrolled), "right-click", G_CALLBACK (e_cal_list_view_on_table_right_click), cal_list_view); /* Attach and show widget */ @@ -378,6 +382,20 @@ e_cal_list_view_popup_menu (GtkWidget *widget) } static gboolean +e_cal_list_view_on_table_double_click (GtkWidget *table, gint row, gint col, GdkEvent *event, + gpointer data) +{ + ECalListView *cal_list_view = E_CAL_LIST_VIEW (data); + ECalModelComponent *comp_data; + + comp_data = e_cal_model_get_component_at (e_calendar_view_get_model (E_CALENDAR_VIEW (cal_list_view)), row); + e_calendar_view_edit_appointment (E_CALENDAR_VIEW (cal_list_view), comp_data->client, + comp_data->icalcomp, FALSE); + + return TRUE; +} + +static gboolean e_cal_list_view_on_table_right_click (GtkWidget *table, gint row, gint col, GdkEvent *event, gpointer data) { |