[nautilus/wip/antoniof/switch-to-gtk4: 12/40] general: gdk_event_get_state -> gdk_event_get_modifier_state




commit 4dab6170c76e2d99fd98a0faf02395f8f258b1e9
Author: António Fernandes <antoniof gnome org>
Date:   Sun Dec 19 18:46:20 2021 +0000

    general: gdk_event_get_state -> gdk_event_get_modifier_state

 src/nautilus-list-view.c | 6 +++---
 src/nautilus-pathbar.c   | 2 +-
 src/nautilus-window.c    | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 1186c3f91..d410efbc0 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -233,7 +233,7 @@ button_event_modifies_selection (const GdkEvent *event)
 {
     GdkModifierType state;
 
-    gdk_event_get_state (event, &state);
+    state = gdk_event_get_modifier_state (event);
 
     return (state & (GDK_CONTROL_MASK | GDK_SHIFT_MASK)) != 0;
 }
@@ -619,7 +619,7 @@ on_tree_view_multi_press_gesture_pressed (GtkGestureMultiPress *gesture,
         g_autoptr (GtkTreePath) cursor = NULL;
         GList *selected_rows = NULL;
 
-        gdk_event_get_state (event, &state);
+        state = gdk_event_get_modifier_state (event);
 
         /* We cannot easily match the expected behavior of Shift+click, so we
          * must fall back to GtkTreeView's default event handling.
@@ -770,7 +770,7 @@ on_tree_view_multi_press_gesture_released (GtkGestureMultiPress *gesture,
         return;
     }
 
-    gdk_event_get_state (event, &state);
+    state = gdk_event_get_modifier_state (event);
 
     if ((button == GDK_BUTTON_PRIMARY || button == GDK_BUTTON_MIDDLE)
         && ((state & GDK_CONTROL_MASK) != 0 ||
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index b7fe3370a..480b537ea 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -577,7 +577,7 @@ on_multi_press_gesture_pressed (GtkGestureMultiPress *gesture,
     button_data = BUTTON_DATA (user_data);
     self = button_data->path_bar;
     current_button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture));
-    gtk_get_current_event_state (&state);
+    state = gtk_event_controller_get_current_event_state (GTK_EVENT_CONTROLLER (gesture));
 
     switch (current_button)
     {
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index f098c6657..e19007c2c 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -1808,7 +1808,7 @@ notebook_button_press_cb (GtkGestureMultiPress *gesture,
     button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture));
     sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
     event = gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);
-    gdk_event_get_state (event, &state);
+    state = gdk_event_get_modifier_state (event);
 
     if (button == GDK_BUTTON_SECONDARY &&
         (state & gtk_accelerator_get_default_mod_mask ()) == 0)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]