@@ -1,9 +1,6 @@
2 * Copyright (C) 2014 Canonical, Ltd.
2 * Copyright (C) 2014 Canonical, Ltd.
5− * Josh Arenson <joshua.arenson@canonical.com>
7 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 3.
6 * the Free Software Foundation; version 3.
@@ -54,19 +51,14 @@ QtObject {
54 function onKeyPressed(key) {
51 function onKeyPressed(key) {
55 /* Determine what key was pressed */
52 /* Determine what key was pressed */
58 if (key == Qt.Key_PowerDown || key == Qt.Key_PowerOff) {
54 if (key == Qt.Key_PowerDown || key == Qt.Key_PowerOff) {
59 powerPressed();
55 powerPressed();
60 eventAccepted = true;
56 eventAccepted = true;
61 powerKeyPressed = true;
57 powerKeyPressed = true;
65− else if (key == Qt.Key_VolumeDown) {
58+ } else if (key == Qt.Key_VolumeDown) {
66 eventAccepted = true;
59 eventAccepted = true;
67 volumeDownKeyPressed = true;
60 volumeDownKeyPressed = true;
69− else if (key == Qt.Key_VolumeUp) {
61+ } else if (key == Qt.Key_VolumeUp) {
70 eventAccepted = true;
62 eventAccepted = true;
71 volumeUpKeyPressed = true;
63 volumeUpKeyPressed = true;
@@ -77,8 +69,7 @@ QtObject {
77 bothVolumeKeysPressed();
69 bothVolumeKeysPressed();
79 aVolumeKeyWasReleased = false;
71 aVolumeKeyWasReleased = false;
81− else if (volumeDownKeyPressed) {
72+ } else if (volumeDownKeyPressed) {
82 if (powerKeyPressed && aPowerKeyWasReleased) {
73 if (powerKeyPressed && aPowerKeyWasReleased) {
83 screenshotPressed();
74 screenshotPressed();
84 aPowerKeyWasReleased = false;
75 aPowerKeyWasReleased = false;
@@ -86,8 +77,7 @@ QtObject {
86 } else if (aPowerKeyWasReleased){
77 } else if (aPowerKeyWasReleased){
87 volumeDownPressed();
78 volumeDownPressed();
90− else if (volumeUpKeyPressed) {
80+ } else if (volumeUpKeyPressed) {
91 volumeUpPressed();
81 volumeUpPressed();
@@ -99,13 +89,11 @@ QtObject {
99 eventAccepted = true;
89 eventAccepted = true;
100 powerKeyPressed = false;
90 powerKeyPressed = false;
101 aPowerKeyWasReleased = true;
91 aPowerKeyWasReleased = true;
103− else if (key == Qt.Key_VolumeDown) {
92+ } else if (key == Qt.Key_VolumeDown) {
104 eventAccepted = true;
93 eventAccepted = true;
105 volumeDownKeyPressed = false;
94 volumeDownKeyPressed = false;
106 aVolumeKeyWasReleased = false;
95 aVolumeKeyWasReleased = false;
108− else if (key == Qt.Key_VolumeUp) {
96+ } else if (key == Qt.Key_VolumeUp) {
109 eventAccepted = true;
97 eventAccepted = true;
110 volumeUpKeyPressed = false;
98 volumeUpKeyPressed = false;
111 aVolumeKeyWasReleased = true;
99 aVolumeKeyWasReleased = true;