diff options
author | Matthias Clasen <maclas@gmx.de> | 2004-06-10 04:37:11 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2004-06-10 04:37:11 +0000 |
commit | d0c98af5f80587f5f51dd9fcb09e7c2ca1beef66 (patch) | |
tree | b063c347c801e8a7e06518c60f18269eb15154ed /gtk/gtkcalendar.c | |
parent | bec6655a7c9f40d4112cb31a2c08f4676b06940c (diff) | |
download | gdk-pixbuf-d0c98af5f80587f5f51dd9fcb09e7c2ca1beef66.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.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index fa2bcdff3..2ca1e1077 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -1021,11 +1021,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) { @@ -3066,7 +3066,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)) |