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
This commit is contained in:
parent
adee9db566
commit
f297dd91bd
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user