From ad588e68259e982b066b203eff0fc508e5bc27e3 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Mon, 3 May 2004 18:23:10 +0000 Subject: listen for double click signal (e_cal_list_view_on_table_double_click): 2004-05-03 JP Rosevear * 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 svn path=/trunk/; revision=25762 --- calendar/ChangeLog | 7 +++++++ calendar/gui/e-cal-list-view.c | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 66967a7c29..8cd9b1a3ca 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,10 @@ +2004-05-03 JP Rosevear + + * 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 * gui/calendar-component.c (set_info): set the info label 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); @@ -283,6 +285,8 @@ setup_e_table (ECalListView *cal_list_view) gtk_widget_set_style (GTK_WIDGET (canvas), style); /* 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); @@ -377,6 +381,20 @@ e_cal_list_view_popup_menu (GtkWidget *widget) return TRUE; } +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) -- cgit