diff options
author | Lucas Rocha <lucasr@gnome.org> | 2007-05-14 21:38:47 +0000 |
---|---|---|
committer | Lucas Almeida Rocha <lucasr@src.gnome.org> | 2007-05-14 21:38:47 +0000 |
commit | f297dd91bd4e6a81d0b14562fccd615f2045bc48 (patch) | |
tree | 40f986175b0d403d3e84d9e40eb37461e75b02af /src | |
parent | adee9db56646cc297fd226db983d40f3ba0d4793 (diff) |
double-click on day results in dialog response (Fixes bug #395152). Patch
2007-05-15 Lucas Rocha <lucasr@gnome.org>
* src/calendar.c (zenity_calendar, zenity_calendar_double_click):
double-click on day results in dialog response (Fixes bug #395152).
Patch from Tom Tromey <tromey@redhat.com>.
svn path=/trunk/; revision=1209
Diffstat (limited to 'src')
-rw-r--r-- | src/calendar.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/calendar.c b/src/calendar.c index fd0eb7b..9c50c5a 100644 --- a/src/calendar.c +++ b/src/calendar.c @@ -33,6 +33,7 @@ static GtkWidget *calendar; static ZenityCalendarData *zen_cal_data; static void zenity_calendar_dialog_response (GtkWidget *widget, int response, gpointer data); +static void zenity_calendar_double_click (GtkCalendar *calendar, gpointer data); void zenity_calendar (ZenityData *data, ZenityCalendarData *cal_data) @@ -80,6 +81,9 @@ zenity_calendar (ZenityData *data, ZenityCalendarData *cal_data) if (cal_data->day > 0) gtk_calendar_select_day (GTK_CALENDAR (calendar), cal_data->day); + g_signal_connect (calendar, "day-selected-double-click", + G_CALLBACK (zenity_calendar_double_click), data); + gtk_label_set_mnemonic_widget (GTK_LABEL (text), calendar); zenity_util_show_dialog (dialog); gtk_main (); @@ -119,3 +123,9 @@ zenity_calendar_dialog_response (GtkWidget *widget, int response, gpointer data) } gtk_main_quit (); } + +static void +zenity_calendar_double_click (GtkCalendar *cal, gpointer data) +{ + zenity_calendar_dialog_response (NULL, GTK_RESPONSE_OK, data); +} |