summaryrefslogtreecommitdiff
path: root/gtk/gtkcalendar.c
diff options
context:
space:
mode:
authorMatthias Clasen <maclas@gmx.de>2004-06-10 04:38:08 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-06-10 04:38:08 +0000
commit27a3785511a04e425b4caeaf8a995c5036ad6ce5 (patch)
tree2d6dbc35c0e88489e08dd58a361c5ef20a0e8c03 /gtk/gtkcalendar.c
parent7d09e23bc8ea468482efac118ddbc68f1961b401 (diff)
downloadgtk+-27a3785511a04e425b4caeaf8a995c5036ad6ce5.tar.gz
Start the drag before focusing the selected.day. Stop a beginning drag if
Thu Jun 10 00:36:15 2004 Matthias Clasen <maclas@gmx.de> * 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.
Diffstat (limited to 'gtk/gtkcalendar.c')
-rw-r--r--gtk/gtkcalendar.c9
1 files changed, 6 insertions, 3 deletions
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))