Merge lp:~flscogna/ubuntu-terminal-app/fix-1423536 into lp:~ubuntu-terminal-dev/ubuntu-terminal-app/reboot

Proposed by Filippo Scognamiglio
Status: Merged
Approved by: Alan Pope 🍺🐧🐱 πŸ¦„
Approved revision: 55
Merged at revision: 57
Proposed branch: lp:~flscogna/ubuntu-terminal-app/fix-1423536
Merge into: lp:~ubuntu-terminal-dev/ubuntu-terminal-app/reboot
Diff against target: 111 lines (+35/-7)
3 files modified
po/com.ubuntu.terminal.pot (+2/-2)
src/app/qml/TerminalInputArea.qml (+30/-5)
src/app/qml/TerminalPage.qml (+3/-0)
To merge this branch: bzr merge lp:~flscogna/ubuntu-terminal-app/fix-1423536
Reviewer Review Type Date Requested Status
Alan Pope 🍺🐧🐱 πŸ¦„ (community) Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+250443@code.launchpad.net

Commit message

This should fix 1423536.

Description of the change

This should fix 1423536 . Let me know if the thresholds need to be tweaked.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) :
review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

Looks like you need to merge trunk..

review: Needs Fixing
55. By Filippo Scognamiglio

Merge upstream changes.

Revision history for this message
Filippo Scognamiglio (flscogna) wrote :

Alan, I just merged reboot. Everything should be fine, but give it a go please.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

Tested on Nexus 7 and worked well, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'po/com.ubuntu.terminal.pot'
--- po/com.ubuntu.terminal.pot 2015-02-14 12:45:13 +0000
+++ po/com.ubuntu.terminal.pot 2015-02-26 10:58:44 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: \n"9"Project-Id-Version: \n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2015-02-14 13:41+0100\n"11"POT-Creation-Date: 2015-02-20 14:00+0100\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -81,7 +81,7 @@
81msgid "New tab"81msgid "New tab"
82msgstr ""82msgstr ""
8383
84#: ../src/app/qml/TerminalPage.qml:10884#: ../src/app/qml/TerminalPage.qml:111
85msgid "Selection Mode"85msgid "Selection Mode"
86msgstr ""86msgstr ""
8787
8888
=== modified file 'src/app/qml/TerminalInputArea.qml'
--- src/app/qml/TerminalInputArea.qml 2015-02-03 22:01:21 +0000
+++ src/app/qml/TerminalInputArea.qml 2015-02-26 10:58:44 +0000
@@ -18,6 +18,8 @@
18 signal touchRelease(int x, int y);18 signal touchRelease(int x, int y);
19 signal swipeUpDetected();19 signal swipeUpDetected();
20 signal swipeDownDetected();20 signal swipeDownDetected();
21 signal swipeLeftDetected();
22 signal swipeRightDetected();
21 signal twoFingerSwipeUp();23 signal twoFingerSwipeUp();
22 signal twoFingerSwipeDown();24 signal twoFingerSwipeDown();
2325
@@ -39,7 +41,17 @@
39 MultiPointTouchArea {41 MultiPointTouchArea {
40 property bool __moved: false42 property bool __moved: false
41 property point __pressPosition: Qt.point(0, 0);43 property point __pressPosition: Qt.point(0, 0);
42 property real __prevDragSteps: 044 property real __prevDragStepsY: 0
45 property real __prevDragStepsX: 0
46
47 // This enum represent the status of the dragging.
48 // It is used to avoid simultaneously dragging along both axies
49 // as it's very error prone.
50
51 readonly property int noDragging: 0
52 readonly property int yDragging: 1
53 readonly property int xDragging: 2
54 property real __dragging: noDragging
4355
44 id: singleTouchTouchArea56 id: singleTouchTouchArea
4557
@@ -61,7 +73,9 @@
61 onPressed: {73 onPressed: {
62 touchAreaPressed = true;74 touchAreaPressed = true;
63 __moved = false;75 __moved = false;
64 __prevDragSteps = 0.0;76 __prevDragStepsY = 0.0;
77 __prevDragStepsX = 0.0;
78 __dragging = noDragging;
65 __pressPosition = Qt.point(touchPoints[0].x, touchPoints[0].y);79 __pressPosition = Qt.point(touchPoints[0].x, touchPoints[0].y);
66 pressAndHoldTimer.start();80 pressAndHoldTimer.start();
6781
@@ -69,18 +83,29 @@
69 }83 }
70 onUpdated: {84 onUpdated: {
71 var dragValue = touchPoints[0].y - __pressPosition.y;85 var dragValue = touchPoints[0].y - __pressPosition.y;
86 var dragValueX = touchPoints[0].x - __pressPosition.x;
72 var dragSteps = dragValue / swipeDelta;87 var dragSteps = dragValue / swipeDelta;
88 var dragStepsX = dragValueX / swipeDelta;
7389
74 if (!__moved && distance(touchPoints[0], __pressPosition) > swipeDelta)90 if (!__moved && distance(touchPoints[0], __pressPosition) > swipeDelta)
75 __moved = true;91 __moved = true;
7692
77 if (absFloor(dragSteps) < absFloor(__prevDragSteps)) {93 if (__dragging !== xDragging && absFloor(dragSteps) < absFloor(__prevDragStepsY)) {
78 swipeUpDetected();94 swipeUpDetected();
79 } else if (absFloor(dragSteps) > absFloor(__prevDragSteps)) {95 __dragging = yDragging;
96 } else if (__dragging !== xDragging && absFloor(dragSteps) > absFloor(__prevDragStepsY)) {
80 swipeDownDetected();97 swipeDownDetected();
98 __dragging = yDragging;
99 } else if (__dragging !== yDragging && absFloor(dragStepsX) < absFloor(__prevDragStepsX)) {
100 swipeLeftDetected();
101 __dragging = xDragging;
102 } else if (__dragging !== yDragging && absFloor(dragStepsX) > absFloor(__prevDragStepsX)) {
103 swipeRightDetected();
104 __dragging = xDragging;
81 }105 }
82106
83 __prevDragSteps = dragSteps;107 __prevDragStepsY = dragSteps;
108 __prevDragStepsX = dragStepsX;
84 }109 }
85 onReleased: {110 onReleased: {
86 var timerRunning = pressAndHoldTimer.running;111 var timerRunning = pressAndHoldTimer.running;
87112
=== modified file 'src/app/qml/TerminalPage.qml'
--- src/app/qml/TerminalPage.qml 2015-01-19 16:21:42 +0000
+++ src/app/qml/TerminalPage.qml 2015-02-26 10:58:44 +0000
@@ -62,6 +62,9 @@
62 onTwoFingerSwipeDown: terminal.simulateKeyPress(Qt.Key_Down, Qt.NoModifier, true, 0, "");62 onTwoFingerSwipeDown: terminal.simulateKeyPress(Qt.Key_Down, Qt.NoModifier, true, 0, "");
63 onTouchPressAndHold: alternateAction(x, y);63 onTouchPressAndHold: alternateAction(x, y);
6464
65 onSwipeLeftDetected: terminal.simulateKeyPress(Qt.Key_Left, Qt.NoModifier, true, 0, "");
66 onSwipeRightDetected: terminal.simulateKeyPress(Qt.Key_Right, Qt.NoModifier, true, 0, "");
67
65 // Semantic actions68 // Semantic actions
66 onAlternateAction: {69 onAlternateAction: {
67 // Force the hiddenButton in the event position.70 // Force the hiddenButton in the event position.

Subscribers

People subscribed via source and target branches