[gtk+] path bar: Use GdkEvent API
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] path bar: Use GdkEvent API
- Date: Tue, 19 Sep 2017 17:17:21 +0000 (UTC)
commit 3b266de66cc9a2f286303aa3419065d6ebfd3dbf
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Aug 26 10:57:15 2017 -0400
path bar: Use GdkEvent API
gtk/gtkpathbar.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c
index 28c3e84..b51a452 100644
--- a/gtk/gtkpathbar.c
+++ b/gtk/gtkpathbar.c
@@ -713,7 +713,10 @@ static gboolean
gtk_path_bar_scroll (GtkWidget *widget,
GdkEventScroll *event)
{
- switch (event->direction)
+ GdkScrollDirection direction;
+
+ gdk_event_get_scroll_direction ((GdkEvent*)event, &direction);
+ switch (direction)
{
case GDK_SCROLL_RIGHT:
case GDK_SCROLL_DOWN:
@@ -1001,8 +1004,12 @@ gtk_path_bar_slider_button_press (GtkWidget *widget,
GdkEventButton *event,
GtkPathBar *path_bar)
{
+ guint button;
+
+ gdk_event_get_button ((GdkEvent*)event, &button);
+
if (gdk_event_get_event_type ((GdkEvent *) event) != GDK_BUTTON_PRESS ||
- event->button != GDK_BUTTON_PRIMARY)
+ button != GDK_BUTTON_PRIMARY)
return FALSE;
path_bar->priv->ignore_click = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]