[gnome-2048] Rename a variable.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-2048] Rename a variable.
- Date: Mon, 9 Mar 2020 23:20:20 +0000 (UTC)
commit 6401018c972d7cf7d8f567e5cbdef375326ecd49
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Thu Mar 5 17:43:11 2020 +0100
Rename a variable.
src/game-window.vala | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/src/game-window.vala b/src/game-window.vala
index 9deb780..b0f402f 100644
--- a/src/game-window.vala
+++ b/src/game-window.vala
@@ -342,16 +342,17 @@ private class GameWindow : ApplicationWindow
* * gestures
\*/
- private GestureSwipe gesture;
+ private GestureSwipe gesture_swipe;
+
private inline void _init_gestures ()
{
- gesture = new GestureSwipe (_embed); // _window works, but problems with headerbar; the main grid or
the aspectframe do as _embed
- gesture.set_propagation_phase (PropagationPhase.CAPTURE);
- gesture.set_button (/* all events */ 0);
- gesture.swipe.connect (_on_swipe);
+ gesture_swipe = new GestureSwipe (_embed); // _window works, but problems with headerbar; the main
grid or the aspectframe do as _embed
+ gesture_swipe.set_propagation_phase (PropagationPhase.CAPTURE);
+ gesture_swipe.set_button (/* all events */ 0);
+ gesture_swipe.swipe.connect (_on_swipe);
}
- private inline void _on_swipe (GestureSwipe gesture, double velocity_x, double velocity_y)
+ private inline void _on_swipe (GestureSwipe _gesture_swipe, double velocity_x, double velocity_y) //
do not make static, _gesture_swipe.get_wigdet () is _embed, not the window
{
if (_game.cannot_move ())
return;
@@ -376,8 +377,6 @@ private class GameWindow : ApplicationWindow
else if (velocity_y > 10.0)
_game.move (MoveRequest.DOWN);
}
- else
- return;
}
/*\
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]