From 27a3785511a04e425b4caeaf8a995c5036ad6ce5 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 10 Jun 2004 04:38:08 +0000 Subject: [PATCH] Start the drag before focusing the selected.day. Stop a beginning drag if Thu Jun 10 00:36:15 2004 Matthias Clasen * gtk/gtkcalendar.c (gtk_calendar_main_button): Start the drag before focusing the selected.day. * gtk/gtkcalendar.c (gtk_calendar_state_changed): Stop a beginning drag if the widget becomes insensitive. --- ChangeLog | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-6 | 7 +++++++ ChangeLog.pre-2-8 | 7 +++++++ gtk/gtkcalendar.c | 9 ++++++--- 5 files changed, 34 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2f8eea5de8..7c8c435fa7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Thu Jun 10 00:36:15 2004 Matthias Clasen + + * gtk/gtkcalendar.c (gtk_calendar_main_button): Start + the drag before focusing the selected.day. + * gtk/gtkcalendar.c (gtk_calendar_state_changed): Stop + a beginning drag if the widget becomes insensitive. + Thu Jun 10 00:09:06 2004 Matthias Clasen * gtk/gtkcalendar.c (gtk_calendar_button_press): Start diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 2f8eea5de8..7c8c435fa7 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +Thu Jun 10 00:36:15 2004 Matthias Clasen + + * gtk/gtkcalendar.c (gtk_calendar_main_button): Start + the drag before focusing the selected.day. + * gtk/gtkcalendar.c (gtk_calendar_state_changed): Stop + a beginning drag if the widget becomes insensitive. + Thu Jun 10 00:09:06 2004 Matthias Clasen * gtk/gtkcalendar.c (gtk_calendar_button_press): Start diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 2f8eea5de8..7c8c435fa7 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +Thu Jun 10 00:36:15 2004 Matthias Clasen + + * gtk/gtkcalendar.c (gtk_calendar_main_button): Start + the drag before focusing the selected.day. + * gtk/gtkcalendar.c (gtk_calendar_state_changed): Stop + a beginning drag if the widget becomes insensitive. + Thu Jun 10 00:09:06 2004 Matthias Clasen * gtk/gtkcalendar.c (gtk_calendar_button_press): Start diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 2f8eea5de8..7c8c435fa7 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +Thu Jun 10 00:36:15 2004 Matthias Clasen + + * gtk/gtkcalendar.c (gtk_calendar_main_button): Start + the drag before focusing the selected.day. + * gtk/gtkcalendar.c (gtk_calendar_state_changed): Stop + a beginning drag if the widget becomes insensitive. + Thu Jun 10 00:09:06 2004 Matthias Clasen * gtk/gtkcalendar.c (gtk_calendar_button_press): Start diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index 544775c1ae..331f3fe4bc 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -1024,11 +1024,11 @@ gtk_calendar_main_button (GtkWidget *widget, if (!GTK_WIDGET_HAS_FOCUS (widget)) gtk_widget_grab_focus (widget); - gtk_calendar_select_and_focus_day (calendar, day); - private_data->in_drag = 1; private_data->drag_start_x = x; private_data->drag_start_y = y; + + gtk_calendar_select_and_focus_day (calendar, day); } else if (event->type == GDK_2BUTTON_PRESS) { @@ -3084,7 +3084,10 @@ gtk_calendar_state_changed (GtkWidget *widget, private_data = GTK_CALENDAR_PRIVATE_DATA (widget); if (!GTK_WIDGET_IS_SENSITIVE (widget)) - stop_spinning (widget); + { + private_data->in_drag = 0; + stop_spinning (widget); + } for (i = 0; i < 4; i++) if (GTK_WIDGET_IS_SENSITIVE (widget))