Merge lp:~unity-team/unity/unity.oneiric-fixes into lp:unity

Proposed by Jason Smith
Status: Merged
Merged at revision: 1545
Proposed branch: lp:~unity-team/unity/unity.oneiric-fixes
Merge into: lp:unity
Diff against target: 148 lines (+26/-19)
6 files modified
plugins/unityshell/src/BFBLauncherIcon.cpp (+8/-12)
plugins/unityshell/src/BFBLauncherIcon.h (+5/-0)
plugins/unityshell/src/Launcher.cpp (+5/-5)
plugins/unityshell/src/SwitcherController.cpp (+4/-0)
plugins/unityshell/src/unityshell.cpp (+2/-2)
tests/CMakeLists.txt (+2/-0)
To merge this branch: bzr merge lp:~unity-team/unity/unity.oneiric-fixes
Reviewer Review Type Date Requested Status
Tim Penhey (community) Approve
Review via email: mp+75285@code.launchpad.net

Description of the change

Reverses scroll direction per design
Makes alt-tab close the dash properly when it is triggered
Fix bug where slow moving pointer would not trigger launcher edge reveal

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/BFBLauncherIcon.cpp'
2--- plugins/unityshell/src/BFBLauncherIcon.cpp 2011-09-08 04:49:34 +0000
3+++ plugins/unityshell/src/BFBLauncherIcon.cpp 2011-09-14 14:04:26 +0000
4@@ -20,11 +20,10 @@
5 #include "BFBLauncherIcon.h"
6 #include "Launcher.h"
7
8+#include "UBusMessages.h"
9+
10 #include <glib/gi18n-lib.h>
11
12-#include "ubus-server.h"
13-#include "UBusMessages.h"
14-
15 BFBLauncherIcon::BFBLauncherIcon(Launcher* IconManager)
16 : SimpleLauncherIcon(IconManager)
17 {
18@@ -34,28 +33,25 @@
19 SetQuirk(QUIRK_RUNNING, false);
20 SetIconType(TYPE_HOME);
21
22- mouse_enter.connect([&] () { ubus_server_send_message(ubus_server_get_default(),
23- UBUS_DASH_ABOUT_TO_SHOW, NULL); });
24+ _background_color = nux::Color (0xFF333333);
25+
26+ mouse_enter.connect([&] () { _ubus_manager.SendMessage(UBUS_DASH_ABOUT_TO_SHOW, NULL); });
27 }
28
29 nux::Color BFBLauncherIcon::BackgroundColor()
30 {
31- return nux::Color(0xFF333333);
32+ return _background_color;
33 }
34
35 nux::Color BFBLauncherIcon::GlowColor()
36 {
37- return nux::Color(0xFF333333);
38+ return _background_color;
39 }
40
41 void BFBLauncherIcon::ActivateLauncherIcon(ActionArg arg)
42 {
43 if (arg.button == 1)
44- {
45- UBusServer* ubus = ubus_server_get_default();
46- ubus_server_send_message(ubus, UBUS_PLACE_ENTRY_ACTIVATE_REQUEST,
47- g_variant_new("(sus)", "home.lens", 0, ""));
48- }
49+ _ubus_manager.SendMessage (UBUS_PLACE_ENTRY_ACTIVATE_REQUEST, g_variant_new("(sus)", "home.lens", 0, ""));
50
51 // dont chain down to avoid random dash close events
52 }
53
54=== modified file 'plugins/unityshell/src/BFBLauncherIcon.h'
55--- plugins/unityshell/src/BFBLauncherIcon.h 2011-08-03 14:25:30 +0000
56+++ plugins/unityshell/src/BFBLauncherIcon.h 2011-09-14 14:04:26 +0000
57@@ -22,6 +22,8 @@
58
59 #include "SimpleLauncherIcon.h"
60
61+#include "UBusWrapper.h"
62+
63 class BFBLauncherIcon : public SimpleLauncherIcon
64 {
65
66@@ -32,6 +34,9 @@
67 virtual nux::Color GlowColor();
68
69 void ActivateLauncherIcon(ActionArg arg);
70+private:
71+ unity::UBusManager _ubus_manager;
72+ nux::Color _background_color;
73 };
74
75 #endif // UNITYSHELL_BFBLAUNCHERICON_H
76
77=== modified file 'plugins/unityshell/src/Launcher.cpp'
78--- plugins/unityshell/src/Launcher.cpp 2011-09-08 11:23:14 +0000
79+++ plugins/unityshell/src/Launcher.cpp 2011-09-14 14:04:26 +0000
80@@ -2476,13 +2476,13 @@
81 if (wheel_delta < 0)
82 {
83 // scroll up
84+ _launcher_drag_delta -= 10;
85+ }
86+ else
87+ {
88+ // scroll down
89 _launcher_drag_delta += 10;
90 }
91- else
92- {
93- // scroll down
94- _launcher_drag_delta -= 10;
95- }
96
97 EnsureAnimation();
98 }
99
100=== modified file 'plugins/unityshell/src/SwitcherController.cpp'
101--- plugins/unityshell/src/SwitcherController.cpp 2011-09-01 04:56:04 +0000
102+++ plugins/unityshell/src/SwitcherController.cpp 2011-09-14 14:04:26 +0000
103@@ -90,6 +90,10 @@
104 {
105 detail_timer_ = g_timeout_add(detail_timeout_length, &SwitcherController::OnDetailTimer, this);
106 }
107+
108+ ubus_server_send_message(ubus_server_get_default(),
109+ UBUS_PLACE_VIEW_CLOSE_REQUEST,
110+ NULL);
111 }
112
113 void SwitcherController::Select(int index)
114
115=== modified file 'plugins/unityshell/src/unityshell.cpp'
116--- plugins/unityshell/src/unityshell.cpp 2011-09-14 09:48:47 +0000
117+++ plugins/unityshell/src/unityshell.cpp 2011-09-14 14:04:26 +0000
118@@ -961,7 +961,7 @@
119 {
120 UnityScreen* self = reinterpret_cast<UnityScreen*>(data);
121
122- if (pointerX == 0)
123+ if (pointerX <= 1)
124 {
125 if (abs(pointerY-self->_edge_pointerY) <= 5)
126 {
127@@ -1004,7 +1004,7 @@
128 if (_edge_trigger_handle)
129 g_source_remove(_edge_trigger_handle);
130
131- if (pointerX == 0)
132+ if (pointerX <= 1)
133 {
134 _edge_pointerY = pointerY;
135 _edge_trigger_handle = g_timeout_add(_edge_timeout,
136
137=== modified file 'tests/CMakeLists.txt'
138--- tests/CMakeLists.txt 2011-09-08 11:53:46 +0000
139+++ tests/CMakeLists.txt 2011-09-14 14:04:26 +0000
140@@ -282,6 +282,8 @@
141 ${UNITY_SRC}/QuicklistManager.cpp
142 ${UNITY_SRC}/QuicklistManager.h
143 ${UNITY_SRC}/UBusMessages.h
144+ ${UNITY_SRC}/UBusWrapper.cpp
145+ ${UNITY_SRC}/UBusWrapper.h
146 ${UNITY_SRC}/ubus-server.cpp
147 ${UNITY_SRC}/ubus-server.h
148 )