diff options
author | JP Rosevear <jpr@ximian.com> | 2004-05-04 02:23:10 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2004-05-04 02:23:10 +0800 |
commit | ad588e68259e982b066b203eff0fc508e5bc27e3 (patch) | |
tree | 5c153792ecb60f9cf2673261c8df95479340b7e4 /calendar/gui | |
parent | 4fc19832d2d8d2856a5774dcf56961d429b4d1fe (diff) | |
download | gsoc2013-evolution-ad588e68259e982b066b203eff0fc508e5bc27e3.tar.gz gsoc2013-evolution-ad588e68259e982b066b203eff0fc508e5bc27e3.tar.zst gsoc2013-evolution-ad588e68259e982b066b203eff0fc508e5bc27e3.zip |
listen for double click signal (e_cal_list_view_on_table_double_click):
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
svn path=/trunk/; revision=25762
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/e-cal-list-view.c | 18 |
1 files changed, 18 insertions, 0 deletions
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) { |