Add and hook in gtk_calendar_scroll, to let the mouse wheels select the
2003-08-09 Matthias Clasen <maclas@gmx.de> * gtk/gtkcalendar.c: Add and hook in gtk_calendar_scroll, to let the mouse wheels select the month. Scrolling down moves forward in time. (#53134, Abigail Brady)
This commit is contained in:
committed by
Matthias Clasen
parent
699e1c74ef
commit
35b3fd8915
10
ChangeLog
10
ChangeLog
@ -1,7 +1,13 @@
|
|||||||
|
2003-08-09 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* gtk/gtkcalendar.c: Add and hook in gtk_calendar_scroll,
|
||||||
|
to let the mouse wheels select the month. Scrolling down
|
||||||
|
moves forward in time. (#53134, Abigail Brady)
|
||||||
|
|
||||||
2003-08-08 Matthias Clasen <maclas@gmx.de>
|
2003-08-08 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* gdk/gdkregion-generic.c (gdk_region_spans_intersect_foreach): Fix a segfault. (#115284,
|
* gdk/gdkregion-generic.c (gdk_region_spans_intersect_foreach): Fix
|
||||||
Jan Kratochvil)
|
a segfault. (#115284, Jan Kratochvil)
|
||||||
|
|
||||||
2003-08-08 Tor Lillqvist <tml@iki.fi>
|
2003-08-08 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,13 @@
|
|||||||
|
2003-08-09 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* gtk/gtkcalendar.c: Add and hook in gtk_calendar_scroll,
|
||||||
|
to let the mouse wheels select the month. Scrolling down
|
||||||
|
moves forward in time. (#53134, Abigail Brady)
|
||||||
|
|
||||||
2003-08-08 Matthias Clasen <maclas@gmx.de>
|
2003-08-08 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* gdk/gdkregion-generic.c (gdk_region_spans_intersect_foreach): Fix a segfault. (#115284,
|
* gdk/gdkregion-generic.c (gdk_region_spans_intersect_foreach): Fix
|
||||||
Jan Kratochvil)
|
a segfault. (#115284, Jan Kratochvil)
|
||||||
|
|
||||||
2003-08-08 Tor Lillqvist <tml@iki.fi>
|
2003-08-08 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,13 @@
|
|||||||
|
2003-08-09 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* gtk/gtkcalendar.c: Add and hook in gtk_calendar_scroll,
|
||||||
|
to let the mouse wheels select the month. Scrolling down
|
||||||
|
moves forward in time. (#53134, Abigail Brady)
|
||||||
|
|
||||||
2003-08-08 Matthias Clasen <maclas@gmx.de>
|
2003-08-08 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* gdk/gdkregion-generic.c (gdk_region_spans_intersect_foreach): Fix a segfault. (#115284,
|
* gdk/gdkregion-generic.c (gdk_region_spans_intersect_foreach): Fix
|
||||||
Jan Kratochvil)
|
a segfault. (#115284, Jan Kratochvil)
|
||||||
|
|
||||||
2003-08-08 Tor Lillqvist <tml@iki.fi>
|
2003-08-08 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,13 @@
|
|||||||
|
2003-08-09 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* gtk/gtkcalendar.c: Add and hook in gtk_calendar_scroll,
|
||||||
|
to let the mouse wheels select the month. Scrolling down
|
||||||
|
moves forward in time. (#53134, Abigail Brady)
|
||||||
|
|
||||||
2003-08-08 Matthias Clasen <maclas@gmx.de>
|
2003-08-08 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* gdk/gdkregion-generic.c (gdk_region_spans_intersect_foreach): Fix a segfault. (#115284,
|
* gdk/gdkregion-generic.c (gdk_region_spans_intersect_foreach): Fix
|
||||||
Jan Kratochvil)
|
a segfault. (#115284, Jan Kratochvil)
|
||||||
|
|
||||||
2003-08-08 Tor Lillqvist <tml@iki.fi>
|
2003-08-08 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,13 @@
|
|||||||
|
2003-08-09 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* gtk/gtkcalendar.c: Add and hook in gtk_calendar_scroll,
|
||||||
|
to let the mouse wheels select the month. Scrolling down
|
||||||
|
moves forward in time. (#53134, Abigail Brady)
|
||||||
|
|
||||||
2003-08-08 Matthias Clasen <maclas@gmx.de>
|
2003-08-08 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* gdk/gdkregion-generic.c (gdk_region_spans_intersect_foreach): Fix a segfault. (#115284,
|
* gdk/gdkregion-generic.c (gdk_region_spans_intersect_foreach): Fix
|
||||||
Jan Kratochvil)
|
a segfault. (#115284, Jan Kratochvil)
|
||||||
|
|
||||||
2003-08-08 Tor Lillqvist <tml@iki.fi>
|
2003-08-08 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
|||||||
@ -313,6 +313,8 @@ static gint gtk_calendar_leave_notify (GtkWidget *widget,
|
|||||||
GdkEventCrossing *event);
|
GdkEventCrossing *event);
|
||||||
static gint gtk_calendar_key_press (GtkWidget *widget,
|
static gint gtk_calendar_key_press (GtkWidget *widget,
|
||||||
GdkEventKey *event);
|
GdkEventKey *event);
|
||||||
|
static gint gtk_calendar_scroll (GtkWidget *widget,
|
||||||
|
GdkEventScroll *event);
|
||||||
static void gtk_calendar_grab_notify (GtkWidget *widget,
|
static void gtk_calendar_grab_notify (GtkWidget *widget,
|
||||||
gboolean was_grabbed);
|
gboolean was_grabbed);
|
||||||
static void gtk_calendar_state_changed (GtkWidget *widget,
|
static void gtk_calendar_state_changed (GtkWidget *widget,
|
||||||
@ -400,6 +402,7 @@ gtk_calendar_class_init (GtkCalendarClass *class)
|
|||||||
widget_class->enter_notify_event = gtk_calendar_enter_notify;
|
widget_class->enter_notify_event = gtk_calendar_enter_notify;
|
||||||
widget_class->leave_notify_event = gtk_calendar_leave_notify;
|
widget_class->leave_notify_event = gtk_calendar_leave_notify;
|
||||||
widget_class->key_press_event = gtk_calendar_key_press;
|
widget_class->key_press_event = gtk_calendar_key_press;
|
||||||
|
widget_class->scroll_event = gtk_calendar_scroll;
|
||||||
widget_class->style_set = gtk_calendar_style_set;
|
widget_class->style_set = gtk_calendar_style_set;
|
||||||
widget_class->state_changed = gtk_calendar_state_changed;
|
widget_class->state_changed = gtk_calendar_state_changed;
|
||||||
widget_class->grab_notify = gtk_calendar_grab_notify;
|
widget_class->grab_notify = gtk_calendar_grab_notify;
|
||||||
@ -1203,7 +1206,7 @@ gtk_calendar_realize (GtkWidget *widget)
|
|||||||
attributes.wclass = GDK_INPUT_OUTPUT;
|
attributes.wclass = GDK_INPUT_OUTPUT;
|
||||||
attributes.window_type = GDK_WINDOW_CHILD;
|
attributes.window_type = GDK_WINDOW_CHILD;
|
||||||
attributes.event_mask = (gtk_widget_get_events (widget)
|
attributes.event_mask = (gtk_widget_get_events (widget)
|
||||||
| GDK_EXPOSURE_MASK |GDK_KEY_PRESS_MASK);
|
| GDK_EXPOSURE_MASK |GDK_KEY_PRESS_MASK | GDK_SCROLL_MASK);
|
||||||
attributes.visual = gtk_widget_get_visual (widget);
|
attributes.visual = gtk_widget_get_visual (widget);
|
||||||
attributes.colormap = gtk_widget_get_colormap (widget);
|
attributes.colormap = gtk_widget_get_colormap (widget);
|
||||||
|
|
||||||
@ -2895,6 +2898,30 @@ gtk_calendar_finalize (GObject *object)
|
|||||||
(* G_OBJECT_CLASS (parent_class)->finalize) (object);
|
(* G_OBJECT_CLASS (parent_class)->finalize) (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gtk_calendar_scroll (GtkWidget *widget,
|
||||||
|
GdkEventScroll *event)
|
||||||
|
{
|
||||||
|
GtkCalendar *calendar = GTK_CALENDAR (widget);
|
||||||
|
|
||||||
|
if (event->direction == GDK_SCROLL_UP)
|
||||||
|
{
|
||||||
|
if (!GTK_WIDGET_HAS_FOCUS (widget))
|
||||||
|
gtk_widget_grab_focus (widget);
|
||||||
|
gtk_calendar_set_month_prev (calendar);
|
||||||
|
}
|
||||||
|
else if (event->direction == GDK_SCROLL_DOWN)
|
||||||
|
{
|
||||||
|
if (!GTK_WIDGET_HAS_FOCUS (widget))
|
||||||
|
gtk_widget_grab_focus (widget);
|
||||||
|
gtk_calendar_set_month_next (calendar);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gtk_calendar_key_press (GtkWidget *widget,
|
gtk_calendar_key_press (GtkWidget *widget,
|
||||||
GdkEventKey *event)
|
GdkEventKey *event)
|
||||||
|
|||||||
Reference in New Issue
Block a user