summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--src/calendar.c10
2 files changed, 16 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 608af887..4cfd1cd3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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>.
+
2007-05-14 Lucas Rocha <lucasr@gnome.org>
* src/progress.c (zenity_progress_handle_stdin), src/option.c
diff --git a/src/calendar.c b/src/calendar.c
index fd0eb7b5..9c50c5ab 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);
+}
bgstack15