Merge lp:~unity-team/unity/trunk-cherrypicks-for-6.0 into lp:unity/6.0

Proposed by Michal Hruby
Status: Merged
Approved by: Brandon Schaefer
Approved revision: 2766
Merged at revision: 2745
Proposed branch: lp:~unity-team/unity/trunk-cherrypicks-for-6.0
Merge into: lp:unity/6.0
Diff against target: 1075 lines (+353/-175)
30 files modified
dash/DashView.cpp (+0/-5)
dash/DashView.h (+0/-3)
dash/ResultViewGrid.cpp (+14/-2)
dash/previews/ActionButton.cpp (+0/-5)
dash/previews/PreviewInfoHintWidget.cpp (+0/-1)
launcher/BamfLauncherIcon.cpp (+24/-21)
launcher/FavoriteStoreGSettings.cpp (+3/-3)
launcher/StandaloneSwitcher.cpp (+2/-2)
launcher/SwitcherController.cpp (+1/-2)
launcher/SwitcherController.h (+1/-1)
launcher/VolumeImp.cpp (+4/-1)
manual-tests/Switcher.txt (+1/-0)
plugins/unityshell/resources/emblem_apps.svg (+90/-19)
plugins/unityshell/resources/emblem_others.svg (+12/-0)
plugins/unityshell/resources/emblem_video.svg (+58/-17)
plugins/unityshell/resources/lens-nav-gwibber.svg (+6/-8)
plugins/unityshell/src/unityshell.cpp (+10/-4)
plugins/unityshell/src/unityshell.h (+3/-1)
tests/autopilot/unity/emulators/icons.py (+4/-0)
tests/autopilot/unity/tests/test_home_lens.py (+4/-1)
tests/gmockvolume.c (+18/-0)
tests/gmockvolume.h (+2/-0)
tests/test_switcher_controller.cpp (+3/-3)
tests/test_volume_imp.cpp (+5/-2)
unity-shared/CoverArt.cpp (+2/-2)
unity-shared/DashStyle.cpp (+1/-1)
unity-shared/IconLoader.cpp (+57/-40)
unity-shared/PluginAdapter.h (+2/-0)
unity-shared/PluginAdapterCompiz.cpp (+25/-30)
unity-shared/SearchBar.cpp (+1/-1)
To merge this branch: bzr merge lp:~unity-team/unity/trunk-cherrypicks-for-6.0
Reviewer Review Type Date Requested Status
Brandon Schaefer (community) Approve
Didier Roche Approve
Review via email: mp+127017@code.launchpad.net

Commit message

Cherrypicks from unity's trunk for 6.8.0

Description of the change

Distro-approved cherrypicks from lp:unity to go into the 6.8.0 release.

To post a comment you must log in.
Revision history for this message
Didier Roche (didrocks) wrote :

I trust Michal that it's the full branches we discussed about :)
It seems to be those from the revisions.

review: Approve
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Looks good.

review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Cool, but what are the bug numbers being fixed here?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

OK I've linked the bugs to this branch, best I can tell.

Please link or document the bugs being fixed next time.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'dash/DashView.cpp'
2--- dash/DashView.cpp 2012-09-20 10:18:18 +0000
3+++ dash/DashView.cpp 2012-09-28 21:43:21 +0000
4@@ -37,8 +37,6 @@
5 #include "unity-shared/UBusMessages.h"
6 #include "unity-shared/PreviewStyle.h"
7
8-#include "Nux/NuxTimerTickSource.h"
9-
10 namespace unity
11 {
12 namespace dash
13@@ -96,9 +94,6 @@
14 , opening_row_y_(-1)
15 , opening_row_height_(0)
16 {
17- //tick_source_.reset(new nux::NuxTimerTickSource);
18- //animation_controller_.reset(new na::AnimationController(*tick_source_));
19-
20 renderer_.SetOwner(this);
21 renderer_.need_redraw.connect([this] () {
22 QueueDraw();
23
24=== modified file 'dash/DashView.h'
25--- dash/DashView.h 2012-09-19 13:58:01 +0000
26+++ dash/DashView.h 2012-09-28 21:43:21 +0000
27@@ -23,7 +23,6 @@
28 #include <Nux/PaintLayer.h>
29 #include <Nux/View.h>
30 #include <Nux/VLayout.h>
31-#include <Nux/NuxTimerTickSource.h>
32
33 #include <UnityCore/FilesystemLenses.h>
34 #include <UnityCore/HomeLens.h>
35@@ -165,8 +164,6 @@
36
37 float fade_out_value_;
38 float fade_in_value_;
39- std::unique_ptr<nux::NuxTimerTickSource> tick_source_;
40- std::unique_ptr<na::AnimationController> animation_controller_;
41 na::AnimateValue<float> animation_;
42
43 void FadeOutCallBack(float const& fade_out_value);
44
45=== modified file 'dash/ResultViewGrid.cpp'
46--- dash/ResultViewGrid.cpp 2012-09-18 13:59:06 +0000
47+++ dash/ResultViewGrid.cpp 2012-09-28 21:43:21 +0000
48@@ -26,6 +26,7 @@
49 #include <NuxGraphics/GdkGraphics.h>
50 #include <gtk/gtk.h>
51 #include <gdk/gdk.h>
52+#include <unity-protocol.h>
53
54 #include "unity-shared/IntrospectableWrappers.h"
55 #include "unity-shared/Timer.h"
56@@ -844,8 +845,19 @@
57
58 if (G_IS_ICON(icon))
59 {
60- info = gtk_icon_theme_lookup_by_gicon(theme, icon, size, (GtkIconLookupFlags)0);
61- g_object_unref(icon);
62+ if (UNITY_PROTOCOL_IS_ANNOTATED_ICON(icon))
63+ {
64+ UnityProtocolAnnotatedIcon *anno;
65+ anno = UNITY_PROTOCOL_ANNOTATED_ICON(icon);
66+
67+ GIcon *base_icon = unity_protocol_annotated_icon_get_icon(anno);
68+ info = gtk_icon_theme_lookup_by_gicon(theme, base_icon, size, (GtkIconLookupFlags)0);
69+ }
70+ else
71+ {
72+ info = gtk_icon_theme_lookup_by_gicon(theme, icon, size, (GtkIconLookupFlags)0);
73+ }
74+ g_object_unref(icon);
75 }
76 else
77 {
78
79=== modified file 'dash/previews/ActionButton.cpp'
80--- dash/previews/ActionButton.cpp 2012-09-19 17:21:06 +0000
81+++ dash/previews/ActionButton.cpp 2012-09-28 21:43:21 +0000
82@@ -77,11 +77,6 @@
83 {
84 InitTheme();
85
86- key_nav_focus_change.connect([&] (nux::Area*, bool, nux::KeyNavDirection)
87- {
88- QueueDraw();
89- });
90-
91 key_nav_focus_activate.connect([&](nux::Area*)
92 {
93 if (GetInputEventSensitivity())
94
95=== modified file 'dash/previews/PreviewInfoHintWidget.cpp'
96--- dash/previews/PreviewInfoHintWidget.cpp 2012-08-30 16:02:55 +0000
97+++ dash/previews/PreviewInfoHintWidget.cpp 2012-09-28 21:43:21 +0000
98@@ -221,7 +221,6 @@
99 }
100 if (info_hint.second)
101 {
102- info_hint.second->SetMinimumWidth(info_value_width);
103 info_hint.second->SetMaximumWidth(info_value_width);
104 }
105 }
106
107=== modified file 'launcher/BamfLauncherIcon.cpp'
108--- launcher/BamfLauncherIcon.cpp 2012-09-28 11:32:04 +0000
109+++ launcher/BamfLauncherIcon.cpp 2012-09-28 21:43:21 +0000
110@@ -630,35 +630,38 @@
111 std::vector<Window> windows;
112 GList* children;
113
114- BamfView *focusable_child = BAMF_VIEW (bamf_application_get_focusable_child (_bamf_app.RawPtr()));
115+ BamfView *focusable_child = BAMF_VIEW(bamf_application_get_focusable_child(_bamf_app.RawPtr()));
116
117 if (focusable_child != NULL)
118- {
119- Window xid;
120-
121- if (BAMF_IS_WINDOW (focusable_child))
122- xid = bamf_window_get_xid (BAMF_WINDOW(focusable_child));
123- else if (BAMF_IS_TAB (focusable_child))
124- {
125- BamfTab *focusable_tab = BAMF_TAB (focusable_child);
126-
127- xid = bamf_tab_get_xid (focusable_tab);
128-
129- bamf_tab_raise (focusable_tab);
130- }
131-
132+ {
133+ Window xid = 0;
134+
135+ if (BAMF_IS_WINDOW(focusable_child))
136+ {
137+ xid = bamf_window_get_xid(BAMF_WINDOW(focusable_child));
138+ }
139+ else if (BAMF_IS_TAB(focusable_child))
140+ {
141+ BamfTab *focusable_tab = BAMF_TAB(focusable_child);
142+ xid = bamf_tab_get_xid(focusable_tab);
143+ bamf_tab_raise(focusable_tab);
144+ }
145+
146+ if (xid)
147+ {
148 windows.push_back(xid);
149 return windows;
150 }
151+ }
152 else
153+ {
154+ if (g_strcmp0(bamf_application_get_application_type(_bamf_app.RawPtr()), "webapp") == 0)
155 {
156- if (g_strcmp0 (bamf_application_get_application_type (_bamf_app.RawPtr()), "webapp") == 0)
157- {
158- OpenInstanceLauncherIcon(arg);
159+ OpenInstanceLauncherIcon(arg);
160
161- return windows;
162- }
163+ return windows;
164 }
165+ }
166
167 children = bamf_view_get_children(BAMF_VIEW(_bamf_app.RawPtr()));
168
169@@ -704,7 +707,7 @@
170 }
171
172 g_list_free(children);
173-
174+
175 return windows;
176
177 }
178
179=== modified file 'launcher/FavoriteStoreGSettings.cpp'
180--- launcher/FavoriteStoreGSettings.cpp 2012-09-14 10:27:12 +0000
181+++ launcher/FavoriteStoreGSettings.cpp 2012-09-28 21:43:21 +0000
182@@ -65,11 +65,11 @@
183 void FavoriteStoreGSettings::FillList()
184 {
185 favorites_.clear();
186- std::shared_ptr<gchar*> favs(g_settings_get_strv(settings_, SETTINGS_KEY.c_str()));
187+ std::unique_ptr<gchar*[], void(*)(gchar**)> favs(g_settings_get_strv(settings_, SETTINGS_KEY.c_str()), g_strfreev);
188
189- for (int i = 0; favs.get()[i]; ++i)
190+ for (int i = 0; favs[i]; ++i)
191 {
192- std::string const& fav = ParseFavoriteFromUri(favs.get()[i]);
193+ std::string const& fav = ParseFavoriteFromUri(favs[i]);
194
195 if (!fav.empty())
196 favorites_.push_back(fav);
197
198=== modified file 'launcher/StandaloneSwitcher.cpp'
199--- launcher/StandaloneSwitcher.cpp 2012-08-13 20:16:28 +0000
200+++ launcher/StandaloneSwitcher.cpp 2012-09-28 21:43:21 +0000
201@@ -104,7 +104,7 @@
202 for (int i = 0; i < self->GetValue (); i++)
203 icons.push_back(nux::ObjectPtr<AbstractLauncherIcon>(new MockLauncherIcon()));
204
205- view->Show(ShowMode::ALL, SortMode::FOCUS_ORDER, false, icons);
206+ view->Show(ShowMode::ALL, SortMode::FOCUS_ORDER, icons);
207 }
208
209 void OnNextClicked (nux::View *sender)
210@@ -138,7 +138,7 @@
211 for (int i = 0; i < 9; i++)
212 icons.push_back(nux::ObjectPtr<AbstractLauncherIcon>(new MockLauncherIcon()));
213
214- view->Show(ShowMode::ALL, SortMode::FOCUS_ORDER, false, icons);
215+ view->Show(ShowMode::ALL, SortMode::FOCUS_ORDER, icons);
216
217 view->GetView ()->render_boxes = true;
218
219
220=== modified file 'launcher/SwitcherController.cpp'
221--- launcher/SwitcherController.cpp 2012-09-13 10:56:42 +0000
222+++ launcher/SwitcherController.cpp 2012-09-28 21:43:21 +0000
223@@ -77,8 +77,7 @@
224 return (!empty && !WindowManager::Default()->IsWallActive());
225 }
226
227-void Controller::Show(ShowMode show, SortMode sort, bool reverse,
228- std::vector<AbstractLauncherIcon::Ptr> results)
229+void Controller::Show(ShowMode show, SortMode sort, std::vector<AbstractLauncherIcon::Ptr> results)
230 {
231 if (results.empty())
232 return;
233
234=== modified file 'launcher/SwitcherController.h'
235--- launcher/SwitcherController.h 2012-08-20 14:59:10 +0000
236+++ launcher/SwitcherController.h 2012-09-28 21:43:21 +0000
237@@ -67,7 +67,7 @@
238 nux::Property<int> detail_timeout_length;
239 nux::Property<int> initial_detail_timeout_length;
240
241- void Show(ShowMode show, SortMode sort, bool reverse, std::vector<launcher::AbstractLauncherIcon::Ptr> results);
242+ void Show(ShowMode show, SortMode sort, std::vector<launcher::AbstractLauncherIcon::Ptr> results);
243 void Hide(bool accept_state=true);
244
245 bool CanShowSwitcher(const std::vector<launcher::AbstractLauncherIcon::Ptr>& resutls) const;
246
247=== modified file 'launcher/VolumeImp.cpp'
248--- launcher/VolumeImp.cpp 2012-08-28 17:39:44 +0000
249+++ launcher/VolumeImp.cpp 2012-09-28 21:43:21 +0000
250@@ -89,7 +89,10 @@
251
252 std::string GetIdentifier() const
253 {
254- return glib::String(g_volume_get_identifier(volume_, G_VOLUME_IDENTIFIER_KIND_UUID)).Str();
255+ glib::String label(g_volume_get_identifier(volume_, G_VOLUME_IDENTIFIER_KIND_LABEL));
256+ glib::String uuid(g_volume_get_identifier(volume_, G_VOLUME_IDENTIFIER_KIND_UUID));
257+
258+ return uuid.Str() + "-" + label.Str();
259 }
260
261 bool HasSiblings() const
262
263=== modified file 'manual-tests/Switcher.txt'
264--- manual-tests/Switcher.txt 2012-09-26 18:06:13 +0000
265+++ manual-tests/Switcher.txt 2012-09-28 21:43:21 +0000
266@@ -104,6 +104,7 @@
267 Expected Result:
268 The assertions from above hold.
269
270+
271 Alt+Tab doesn't lose window focus
272 ---------------------------------
273 This tests ensures that a racing condition is not possible anymore when alt+tabing.
274
275=== modified file 'plugins/unityshell/resources/emblem_apps.svg'
276--- plugins/unityshell/resources/emblem_apps.svg 2012-09-05 18:32:32 +0000
277+++ plugins/unityshell/resources/emblem_apps.svg 2012-09-28 21:43:21 +0000
278@@ -1,19 +1,90 @@
279-<?xml version="1.0" encoding="utf-8"?>
280-<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
281-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
282-<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
283- width="14px" height="14px" viewBox="0 0 14 14" enable-background="new 0 0 14 14" xml:space="preserve">
284-<path fill="#DC4A26" d="M8.5,4.504v7.997c0,0.55-0.469,0.999-1.018,0.999H6.498c-0.55,0-0.998-0.449-0.998-0.999V4.504H8.5z"/>
285-<g>
286- <path fill="#DC4A26" d="M4.5,4.504h-2v-1h2V1.505c0-0.55-0.45-1-1-1H1.501c-0.55,0-1,0.45-1,1L0.5,12.501
287- c0,0.55,0.45,0.999,1,0.999h1.999c0.55,0,1-0.449,1-0.999V10.5L2.5,10.502v-1L4.499,9.5V7.503H2.5v-1h2"/>
288-</g>
289-<path fill="#DC4A26" d="M4.5,6.503v-1l0,0V6.503L4.5,6.503z"/>
290-<path fill="#DC4A26" d="M4.5,9.502v-1h0L4.5,9.502L4.5,9.502z"/>
291-<path fill="#DC4A26" d="M4.5,12.499L4.5,12.499L4.5,12.499L4.5,12.499L4.5,12.499z"/>
292-<path fill="#DC4A26" d="M11.866,0.508v1.237C12.102,1.856,12.3,2.052,12.3,2.286c0,0.354-0.358,0.64-0.8,0.64s-0.8-0.286-0.8-0.64
293- c0-0.234,0.198-0.43,0.433-0.541V0.508C10.66,0.972,9.5,2.321,9.5,2.917c0,0.884,1.116,1.6,2,1.6s2-0.716,2-1.6
294- C13.5,2.321,12.34,0.972,11.866,0.508z"/>
295-<path fill="#DC4A26" d="M5.501,3.499L7.047,0.5L8.5,3.499H5.501z"/>
296-<path fill="#DC4A26" d="M13.5,5.503v6.998c0,0.55-0.45,0.999-1,0.999h-2c-0.55,0-1-0.449-1-0.999V5.503H13.5z"/>
297-</svg>
298+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
299+<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
300+
301+<svg
302+ xmlns:dc="http://purl.org/dc/elements/1.1/"
303+ xmlns:cc="http://creativecommons.org/ns#"
304+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
305+ xmlns:svg="http://www.w3.org/2000/svg"
306+ xmlns="http://www.w3.org/2000/svg"
307+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
308+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
309+ version="1.1"
310+ id="Layer_1"
311+ x="0px"
312+ y="0px"
313+ width="14px"
314+ height="14px"
315+ viewBox="0 0 14 14"
316+ enable-background="new 0 0 14 14"
317+ xml:space="preserve"
318+ inkscape:version="0.48.3.1 r9886"
319+ sodipodi:docname="emblem_apps.svg"><metadata
320+ id="metadata25"><rdf:RDF><cc:Work
321+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
322+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
323+ id="defs23" /><sodipodi:namedview
324+ pagecolor="#ffffff"
325+ bordercolor="#666666"
326+ borderopacity="1"
327+ objecttolerance="10"
328+ gridtolerance="10"
329+ guidetolerance="10"
330+ inkscape:pageopacity="0"
331+ inkscape:pageshadow="2"
332+ inkscape:window-width="879"
333+ inkscape:window-height="476"
334+ id="namedview21"
335+ showgrid="false"
336+ inkscape:zoom="16.857143"
337+ inkscape:cx="7.0207628"
338+ inkscape:cy="7.0000001"
339+ inkscape:window-x="65"
340+ inkscape:window-y="24"
341+ inkscape:window-maximized="0"
342+ inkscape:current-layer="Layer_1" />
343+<path
344+ d="m 9,5 v 8.000556 C 9,13.5508 8.531,14 7.982,14 H 6.998 C 6.448,14 6,13.5508 6,13.000556 V 5 h 3 z"
345+ id="path3"
346+ inkscape:connector-curvature="0"
347+ style="fill:#dc4a26" />
348+<g
349+ id="g5"
350+ transform="matrix(1,0,0,1.0003848,0.5,0.49480569)">
351+ <path
352+ d="m 4.5,4.504 h -2 v -1 h 2 V 1.505 c 0,-0.55 -0.45,-1 -1,-1 H 1.501 c -0.55,0 -1,0.45 -1,1 L 0.5,12.501 c 0,0.55 0.45,0.999 1,0.999 h 1.999 c 0.55,0 1,-0.449 1,-0.999 V 10.5 L 2.5,10.502 v -1 L 4.499,9.5 V 7.503 H 2.5 v -1 h 2"
353+ id="path7"
354+ inkscape:connector-curvature="0"
355+ style="fill:#dc4a26" />
356+</g>
357+<path
358+ d="m 5,7.003 v -1 l 0,0 v 1 l 0,0 z"
359+ id="path9"
360+ inkscape:connector-curvature="0"
361+ style="fill:#dc4a26" />
362+<path
363+ d="m 5,10.002 v -1 h 0 l 0,1 0,0 z"
364+ id="path11"
365+ inkscape:connector-curvature="0"
366+ style="fill:#dc4a26" />
367+<path
368+ d="m 5,12.999 0,0 0,0 0,0 0,0 z"
369+ id="path13"
370+ inkscape:connector-curvature="0"
371+ style="fill:#dc4a26" />
372+<path
373+ d="m 12.366,1 v 1.234223 c 0.236,0.1107508 0.434,0.3063108 0.434,0.5397855 0,0.3532053 -0.358,0.6385632 -0.8,0.6385632 -0.442,0 -0.8,-0.2853579 -0.8,-0.6385632 0,-0.2334747 0.198,-0.4290347 0.433,-0.5397855 V 1 C 11.16,1.4629583 10,2.8089299 10,3.4035919 10,4.2856074 11.116,5 12,5 12.884,5 14,4.2856074 14,3.4035919 14,2.8089299 12.84,1.4629583 12.366,1 z"
374+ id="path15"
375+ inkscape:connector-curvature="0"
376+ style="fill:#dc4a26" />
377+<path
378+ d="M 6,4 7.5465155,1 9,4 H 6 z"
379+ id="path17"
380+ inkscape:connector-curvature="0"
381+ style="fill:#dc4a26" />
382+<path
383+ d="m 14,6 v 7.000625 C 14,13.550832 13.55,14 13,14 h -2 c -0.55,0 -1,-0.449168 -1,-0.999375 V 6 h 4 z"
384+ id="path19"
385+ inkscape:connector-curvature="0"
386+ style="fill:#dc4a26" />
387+</svg>
388\ No newline at end of file
389
390=== added file 'plugins/unityshell/resources/emblem_others.svg'
391--- plugins/unityshell/resources/emblem_others.svg 1970-01-01 00:00:00 +0000
392+++ plugins/unityshell/resources/emblem_others.svg 2012-09-28 21:43:21 +0000
393@@ -0,0 +1,12 @@
394+<?xml version="1.0" encoding="utf-8"?>
395+<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
396+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
397+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
398+ width="14px" height="14px" viewBox="0 0 14 14" enable-background="new 0 0 14 14" xml:space="preserve">
399+<g>
400+ <path fill="#DC4A26" d="M1.667,5C1.298,5,1,5.298,1,5.667v6.667C1,12.702,1.298,13,1.667,13h10.667C12.702,13,13,12.702,13,12.334
401+ V5.667C13,5.298,12.702,5,12.334,5H10.5C10.097,3.775,8.947,1,7,1C5.054,1,3.902,3.775,3.5,5H1.667z M4.5,5C4.923,3.757,5.84,2,7,2
402+ s2.076,1.757,2.5,3H4.5z M4.001,8C3.446,8,3,7.555,3,7c0-0.551,0.446-1,1.001-1C4.554,6,5,6.449,5,7C5,7.555,4.554,8,4.001,8z
403+ M10,8.001C9.447,8.001,9,7.554,9,7c0-0.553,0.447-1.001,1-1.001S11,6.447,11,7C11,7.554,10.553,8.001,10,8.001z"/>
404+</g>
405+</svg>
406
407=== modified file 'plugins/unityshell/resources/emblem_video.svg'
408--- plugins/unityshell/resources/emblem_video.svg 2012-09-05 18:32:32 +0000
409+++ plugins/unityshell/resources/emblem_video.svg 2012-09-28 21:43:21 +0000
410@@ -1,17 +1,58 @@
411-<?xml version="1.0" encoding="utf-8"?>
412-<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
413-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
414-<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
415- width="14px" height="14px" viewBox="0 0 14 14" enable-background="new 0 0 14 14" xml:space="preserve">
416-<g>
417- <g>
418- <path fill="#DC4A26" d="M12.301,2.5H1.7C1.315,2.5,1,2.813,1,3.196v7.608C1,11.188,1.315,11.5,1.7,11.5h10.601
419- c0.385,0,0.699-0.312,0.699-0.696V3.196C13,2.813,12.686,2.5,12.301,2.5z M2.989,10.455H1.994V9.498h0.996V10.455z M2.989,8.49
420- H1.994V7.5h0.996V8.49z M2.989,6.494H1.994V5.535h0.996V6.494z M2.989,4.496H1.994V3.538h0.996V4.496z M8.006,7.841
421- C7.659,8.126,7.308,8.404,6.954,8.677C6.6,8.947,6.255,9.197,5.92,9.426c-0.335,0.229-0.64,0.422-0.913,0.579V4.026
422- c0.261,0.158,0.559,0.35,0.894,0.578c0.335,0.229,0.68,0.476,1.034,0.74c0.354,0.265,0.708,0.54,1.061,0.825
423- c0.355,0.286,0.687,0.565,0.998,0.836C8.684,7.276,8.354,7.555,8.006,7.841z M11.992,10.455h-0.996V9.498h0.996V10.455z
424- M11.992,8.49h-0.996V7.5h0.996V8.49z M11.992,6.494h-0.996V5.535h0.996V6.494z M11.992,4.496h-0.996V3.538h0.996V4.496z"/>
425- </g>
426-</g>
427-</svg>
428+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
429+<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
430+
431+<svg
432+ xmlns:dc="http://purl.org/dc/elements/1.1/"
433+ xmlns:cc="http://creativecommons.org/ns#"
434+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
435+ xmlns:svg="http://www.w3.org/2000/svg"
436+ xmlns="http://www.w3.org/2000/svg"
437+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
438+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
439+ version="1.1"
440+ id="Layer_1"
441+ x="0px"
442+ y="0px"
443+ width="14px"
444+ height="14px"
445+ viewBox="0 0 14 14"
446+ enable-background="new 0 0 14 14"
447+ xml:space="preserve"
448+ inkscape:version="0.48.3.1 r9886"
449+ sodipodi:docname="emblem_video.svg"><metadata
450+ id="metadata13"><rdf:RDF><cc:Work
451+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
452+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
453+ id="defs11" /><sodipodi:namedview
454+ pagecolor="#ffffff"
455+ bordercolor="#666666"
456+ borderopacity="1"
457+ objecttolerance="10"
458+ gridtolerance="10"
459+ guidetolerance="10"
460+ inkscape:pageopacity="0"
461+ inkscape:pageshadow="2"
462+ inkscape:window-width="1215"
463+ inkscape:window-height="776"
464+ id="namedview9"
465+ showgrid="false"
466+ inkscape:zoom="16.857143"
467+ inkscape:cx="7"
468+ inkscape:cy="7"
469+ inkscape:window-x="65"
470+ inkscape:window-y="24"
471+ inkscape:window-maximized="1"
472+ inkscape:current-layer="Layer_1" />
473+<g
474+ id="g3"
475+ transform="translate(0,0.5)">
476+ <g
477+ id="g5">
478+ <path
479+ d="M 12.301,2.5 H 1.7 C 1.315,2.5 1,2.813 1,3.196 v 7.608 C 1,11.188 1.315,11.5 1.7,11.5 H 12.301 C 12.686,11.5 13,11.188 13,10.804 V 3.196 C 13,2.813 12.686,2.5 12.301,2.5 z M 2.989,10.455 H 1.994 V 9.498 H 2.99 v 0.957 z m 0,-1.965 H 1.994 V 7.5 H 2.99 v 0.99 z m 0,-1.996 H 1.994 V 5.535 H 2.99 v 0.959 z m 0,-1.998 H 1.994 V 3.538 H 2.99 V 4.496 z M 8.006,7.841 C 7.659,8.126 7.308,8.404 6.954,8.677 6.6,8.947 6.255,9.197 5.92,9.426 5.585,9.655 5.28,9.848 5.007,10.005 V 4.026 c 0.261,0.158 0.559,0.35 0.894,0.578 0.335,0.229 0.68,0.476 1.034,0.74 0.354,0.265 0.708,0.54 1.061,0.825 0.355,0.286 0.687,0.565 0.998,0.836 -0.31,0.271 -0.64,0.55 -0.988,0.836 z m 3.986,2.614 H 10.996 V 9.498 h 0.996 v 0.957 z m 0,-1.965 H 10.996 V 7.5 h 0.996 v 0.99 z m 0,-1.996 H 10.996 V 5.535 h 0.996 v 0.959 z m 0,-1.998 H 10.996 V 3.538 h 0.996 v 0.958 z"
480+ id="path7"
481+ inkscape:connector-curvature="0"
482+ style="fill:#dc4a26" />
483+ </g>
484+</g>
485+</svg>
486\ No newline at end of file
487
488=== modified file 'plugins/unityshell/resources/lens-nav-gwibber.svg'
489--- plugins/unityshell/resources/lens-nav-gwibber.svg 2012-09-11 13:12:50 +0000
490+++ plugins/unityshell/resources/lens-nav-gwibber.svg 2012-09-28 21:43:21 +0000
491@@ -3,12 +3,10 @@
492 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
493 <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
494 width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
495-<path fill="#FFFFFF" d="M23,11.38c-0.774,0.14-1.897-0.005-2.492-0.267c1.236-0.108,2.073-0.701,2.396-1.505
496- c-0.445,0.29-1.829,0.604-2.593,0.304c-0.038-0.189-0.078-0.369-0.121-0.533c-0.581-2.256-2.576-4.074-4.663-3.854
497- c0.169-0.073,0.34-0.139,0.512-0.2c0.229-0.087,1.577-0.318,1.365-0.82c-0.179-0.442-1.828,0.332-2.138,0.435
498- c0.41-0.162,1.087-0.441,1.159-0.939c-0.627,0.091-1.243,0.404-1.72,0.86c0.173-0.195,0.304-0.432,0.331-0.689
499- c-1.675,1.129-2.652,3.405-3.443,5.613c-0.621-0.637-1.173-1.136-1.667-1.416C8.541,7.584,6.883,6.766,4.282,5.746
500- c-0.08,0.909,0.426,2.118,1.881,2.92C5.848,8.621,5.271,8.722,4.811,8.838c0.188,1.042,0.801,1.899,2.463,2.312
501- c-0.759,0.053-1.153,0.237-1.508,0.629c0.346,0.725,1.191,1.576,2.708,1.401c-1.689,0.769-0.688,2.19,0.686,1.979
502- C6.817,17.715,3.122,17.525,1,15.39c5.539,7.969,17.581,4.712,19.374-2.963C21.721,12.438,22.51,11.936,23,11.38z"/>
503+<path fill="#FFFFFF" d="M12.635,13.608c-0.849,0.836-2.011,1.265-3.272,1.204l0,0c-0.413-0.02-0.826-0.091-1.229-0.215
504+ c-0.368-0.112-0.665-0.404-0.778-0.769c-0.509-1.623-0.123-3.323,1.009-4.437c0.85-0.836,2.011-1.264,3.272-1.205
505+ c0.411,0.02,0.826,0.093,1.228,0.215c0.368,0.113,0.665,0.405,0.778,0.769C14.153,10.794,13.766,12.492,12.635,13.608z M15.5,7
506+ C15.224,7,15,6.775,15,6.499C15,6.224,15.224,6,15.5,6S16,6.224,16,6.499C16,6.775,15.776,7,15.5,7z M19.986,5.999 M20,6
507+ c0.552,0,1-0.447,1-1c0-0.552-0.449-1-1-1h-9c-4.418,0-8,3.582-8,8c0,4.418,3.582,8,8,8c4.417,0,8-3.576,8-7.994V7
508+ c0-0.01,0.001-0.019,0.001-0.028C19.001,6.436,19.448,6,20,6"/>
509 </svg>
510
511=== modified file 'plugins/unityshell/src/unityshell.cpp'
512--- plugins/unityshell/src/unityshell.cpp 2012-09-28 10:41:06 +0000
513+++ plugins/unityshell/src/unityshell.cpp 2012-09-28 21:43:21 +0000
514@@ -24,7 +24,6 @@
515 #include <Nux/HLayout.h>
516 #include <Nux/BaseWindow.h>
517 #include <Nux/WindowCompositor.h>
518-#include <Nux/NuxTimerTickSource.h>
519
520 #include <UnityCore/Variant.h>
521
522@@ -131,6 +130,7 @@
523 , panel_texture_has_changed_(true)
524 , paint_panel_(false)
525 , scale_just_activated_(false)
526+ , big_tick_(0)
527 , screen_introspection_(screen)
528 {
529 Timer timer;
530@@ -234,7 +234,7 @@
531 this));
532 #endif
533
534- tick_source_.reset(new nux::NuxTimerTickSource);
535+ tick_source_.reset(new na::TickSource);
536 animation_controller_.reset(new na::AnimationController(*tick_source_));
537
538 wt->RedrawRequested.connect(sigc::mem_fun(this, &UnityScreen::onRedrawRequested));
539@@ -1283,6 +1283,9 @@
540 {
541 cScreen->preparePaint(ms);
542
543+ big_tick_ += ms*1000;
544+ tick_source_->tick(big_tick_);
545+
546 for (ShowdesktopHandlerWindowInterface *wi : ShowdesktopHandler::animating_windows)
547 wi->HandleAnimations (ms);
548
549@@ -1304,6 +1307,9 @@
550 if (didShellRepaint)
551 wt->ClearDrawList();
552
553+ if (animation_controller_->HasRunningAnimations())
554+ nuxDamageCompiz();
555+
556 std::list <ShowdesktopHandlerWindowInterface *> remove_windows;
557
558 for (ShowdesktopHandlerWindowInterface *wi : ShowdesktopHandler::animating_windows)
559@@ -1425,7 +1431,7 @@
560 * stop it. Then maybe we can revert back to the old code below #else.
561 */
562 std::vector<nux::Geometry> const& dirty = wt->GetDrawList();
563- if (!dirty.empty())
564+ if (!dirty.empty() || animation_controller_->HasRunningAnimations())
565 {
566 cScreen->damageRegionSetEnabled(this, false);
567 cScreen->damageScreen();
568@@ -1867,7 +1873,7 @@
569 switcher_controller_->IsShowDesktopDisabled());
570
571 if (switcher_controller_->CanShowSwitcher(results))
572- switcher_controller_->Show(show_mode, switcher::SortMode::FOCUS_ORDER, false, results);
573+ switcher_controller_->Show(show_mode, switcher::SortMode::FOCUS_ORDER, results);
574 }
575
576 bool UnityScreen::altTabTerminateCommon(CompAction* action,
577
578=== modified file 'plugins/unityshell/src/unityshell.h'
579--- plugins/unityshell/src/unityshell.h 2012-09-28 10:41:06 +0000
580+++ plugins/unityshell/src/unityshell.h 2012-09-28 21:43:21 +0000
581@@ -246,7 +246,7 @@
582 bool TopPanelBackgroundTextureNeedsUpdate() const;
583 void UpdateTopPanelBackgroundTexture();
584
585- std::unique_ptr<nux::NuxTimerTickSource> tick_source_;
586+ std::unique_ptr<na::TickSource> tick_source_;
587 std::unique_ptr<na::AnimationController> animation_controller_;
588
589 Settings dash_settings_;
590@@ -331,6 +331,8 @@
591 bool scale_just_activated_;
592 WindowMinimizeSpeedController minimize_speed_controller_;
593
594+ long long big_tick_;
595+
596 debug::ScreenIntrospection screen_introspection_;
597
598 UBusManager ubus_manager_;
599
600=== modified file 'tests/autopilot/unity/emulators/icons.py'
601--- tests/autopilot/unity/emulators/icons.py 2012-09-24 04:19:23 +0000
602+++ tests/autopilot/unity/emulators/icons.py 2012-09-28 21:43:21 +0000
603@@ -67,6 +67,10 @@
604 """Represents the BFB button in the launcher."""
605
606
607+class ExpoLauncherIcon(SimpleLauncherIcon):
608+ """Represents the Expo button in the launcher."""
609+
610+
611 class HudLauncherIcon(SimpleLauncherIcon):
612 """Represents the HUD button in the launcher."""
613
614
615=== modified file 'tests/autopilot/unity/tests/test_home_lens.py'
616--- tests/autopilot/unity/tests/test_home_lens.py 2012-05-08 16:13:17 +0000
617+++ tests/autopilot/unity/tests/test_home_lens.py 2012-09-28 21:43:21 +0000
618@@ -26,7 +26,10 @@
619 super(HomeLensSearchTests, self).tearDown()
620
621 def test_quick_run_app(self):
622- """Hitting enter runs an application even though a search might not have fully finished yet."""
623+ """Hitting enter runs an application even though a search might not have fully
624+ finished yet.
625+
626+ """
627 if self.app_is_running("Text Editor"):
628 self.close_all_app("Text Editor")
629 sleep(1)
630
631=== modified file 'tests/gmockvolume.c'
632--- tests/gmockvolume.c 2012-09-12 10:58:57 +0000
633+++ tests/gmockvolume.c 2012-09-28 21:43:21 +0000
634@@ -61,6 +61,12 @@
635 self->uuid = NULL;
636 }
637
638+ if (self->label)
639+ {
640+ g_free(self->label);
641+ self->label = NULL;
642+ }
643+
644 if (self->mount)
645 {
646 g_object_unref(self->mount);
647@@ -86,6 +92,7 @@
648 guint32 uuid = g_random_int();
649 mock_volume->name = g_strdup_printf("MockVolume %u", uuid);
650 mock_volume->icon = g_icon_new_for_string("", NULL);
651+ mock_volume->label = g_strdup("");
652 mock_volume->uuid = g_strdup_printf("%u", uuid);
653 mock_volume->mount = NULL;
654 }
655@@ -153,6 +160,15 @@
656 return g_strdup (self->uuid);
657 }
658
659+void
660+g_mock_volume_set_label (GMockVolume *volume, const char* label)
661+{
662+ if (volume->label)
663+ g_free(volume->label);
664+
665+ volume->label = g_strdup (label);
666+}
667+
668 static GDrive *
669 g_mock_volume_get_drive (GVolume *volume)
670 {
671@@ -254,6 +270,8 @@
672
673 if (!g_strcmp0 (kind, G_VOLUME_IDENTIFIER_KIND_UUID))
674 return g_strdup (self->uuid);
675+ else if (!g_strcmp0 (kind, G_VOLUME_IDENTIFIER_KIND_LABEL))
676+ return g_strdup (self->label);
677
678 return NULL;
679 }
680
681=== modified file 'tests/gmockvolume.h'
682--- tests/gmockvolume.h 2012-08-17 15:53:06 +0000
683+++ tests/gmockvolume.h 2012-09-28 21:43:21 +0000
684@@ -43,6 +43,7 @@
685 char *name;
686 GIcon *icon;
687 char *uuid;
688+ char *label;
689 GMount *mount;
690 };
691
692@@ -56,6 +57,7 @@
693 void g_mock_volume_set_can_eject (GMockVolume* volume, gboolean can_eject);
694 void g_mock_volume_set_name (GMockVolume *volume, const char *name);
695 void g_mock_volume_set_icon (GMockVolume *volume, GIcon *icon);
696+void g_mock_volume_set_label (GMockVolume *volume, const char *label);
697 void g_mock_volume_set_uuid (GMockVolume *volume, const char *uuid);
698 void g_mock_volume_set_mount (GMockVolume *volume, GMount *mount);
699
700
701=== modified file 'tests/test_switcher_controller.cpp'
702--- tests/test_switcher_controller.cpp 2012-08-02 02:30:51 +0000
703+++ tests/test_switcher_controller.cpp 2012-09-28 21:43:21 +0000
704@@ -135,7 +135,7 @@
705 controller.detail_timeout_length = 20000;
706 clock_gettime(CLOCK_MONOTONIC, &current);
707
708- controller.Show(ShowMode::ALL, SortMode::LAUNCHER_ORDER, false, results);
709+ controller.Show(ShowMode::ALL, SortMode::LAUNCHER_ORDER, results);
710
711 Utils::WaitUntil(controller.detail_timeout_reached_, 3);
712 ASSERT_TRUE(controller.detail_timeout_reached_);
713@@ -164,7 +164,7 @@
714 std::vector<unity::launcher::AbstractLauncherIcon::Ptr> results;
715 results.push_back(unity::launcher::AbstractLauncherIcon::Ptr(new unity::launcher::DesktopLauncherIcon()));
716
717- controller.Show(ShowMode::ALL, SortMode::LAUNCHER_ORDER, false, results);
718+ controller.Show(ShowMode::ALL, SortMode::LAUNCHER_ORDER, results);
719
720 Utils::WaitUntil(controller.view_shown_, 2);
721 ASSERT_TRUE(controller.view_shown_);
722@@ -185,7 +185,7 @@
723 controller.SetShowDesktopDisabled(true);
724 std::vector<unity::launcher::AbstractLauncherIcon::Ptr> results;
725
726- controller.Show(ShowMode::CURRENT_VIEWPORT, SortMode::FOCUS_ORDER, false, results);
727+ controller.Show(ShowMode::CURRENT_VIEWPORT, SortMode::FOCUS_ORDER, results);
728
729 ASSERT_FALSE(controller.Visible());
730 }
731
732=== modified file 'tests/test_volume_imp.cpp'
733--- tests/test_volume_imp.cpp 2012-08-28 17:28:02 +0000
734+++ tests/test_volume_imp.cpp 2012-09-28 21:43:21 +0000
735@@ -98,10 +98,13 @@
736
737 TEST_F(TestVolumeImp, TestGetIdentifier)
738 {
739- std::string const uuid("0123456789abc");
740+ std::string const uuid = "uuid";
741+ std::string const label = "label";
742
743 g_mock_volume_set_uuid(gvolume_, uuid.c_str());
744- EXPECT_EQ(volume_->GetIdentifier(), uuid);
745+ g_mock_volume_set_label(gvolume_, label.c_str());
746+
747+ EXPECT_EQ(volume_->GetIdentifier(), uuid + "-" + label);
748 }
749
750 TEST_F(TestVolumeImp, TestIsMounted)
751
752=== modified file 'unity-shared/CoverArt.cpp'
753--- unity-shared/CoverArt.cpp 2012-09-14 23:28:40 +0000
754+++ unity-shared/CoverArt.cpp 2012-09-28 21:43:21 +0000
755@@ -334,7 +334,7 @@
756 gfx_engine.GetRenderStates().GetBlend(alpha, src, dest);
757 gfx_engine.GetRenderStates().SetBlend(true, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
758
759- if (texture_screenshot_)
760+ if (IsFullRedraw() && texture_screenshot_)
761 {
762 nux::Geometry imageDest = base;
763 nux::TexCoordXForm texxform;
764@@ -376,7 +376,7 @@
765 texxform,
766 nux::color::White);
767 }
768- else
769+ else if (IsFullRedraw())
770 {
771 if (waiting_)
772 {
773
774=== modified file 'unity-shared/DashStyle.cpp'
775--- unity-shared/DashStyle.cpp 2012-09-20 12:52:02 +0000
776+++ unity-shared/DashStyle.cpp 2012-09-28 21:43:21 +0000
777@@ -2375,7 +2375,7 @@
778
779 int Style::GetCategoryHeaderLeftPadding() const
780 {
781- return 20;
782+ return 19;
783 }
784
785 int Style::GetCategorySeparatorLeftPadding() const
786
787=== modified file 'unity-shared/IconLoader.cpp'
788--- unity-shared/IconLoader.cpp 2012-09-17 18:33:54 +0000
789+++ unity-shared/IconLoader.cpp 2012-09-28 21:43:21 +0000
790@@ -302,6 +302,7 @@
791 {
792 const int SHADOW_BOTTOM_PADDING = 2;
793 const int SHADOW_SIDE_PADDING = 1;
794+ const int EMBLEM_PADDING = 2;
795 int icon_w = gdk_pixbuf_get_width(result);
796 int icon_h = gdk_pixbuf_get_height(result);
797
798@@ -335,9 +336,16 @@
799 pango_layout_set_font_description(layout, desc.get());
800 pango_layout_set_alignment(layout, PANGO_ALIGN_CENTER);
801
802- // magic constant for the text width based on the white curve
803- double max_text_width = has_emblem ?
804- pixbuf_width * 0.72 : pixbuf_width;
805+ double belt_w = static_cast<double>(pixbuf_width - SHADOW_SIDE_PADDING * 2);
806+ double belt_h = static_cast<double>(pixbuf_height - SHADOW_BOTTOM_PADDING);
807+
808+ double max_text_width = belt_w;
809+ if (has_emblem)
810+ {
811+ const double CURVE_MID_X = 0.4 * (belt_h / 20.0 * 24.0);
812+ const int category_pb_w = gdk_pixbuf_get_width(category_pixbuf);
813+ max_text_width = belt_w - CURVE_MID_X - category_pb_w - EMBLEM_PADDING;
814+ }
815
816 pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);
817 pango_layout_set_ellipsize(layout, PANGO_ELLIPSIZE_END);
818@@ -352,7 +360,7 @@
819 dpi == -1 ? 96.0f : dpi/(float) PANGO_SCALE);
820 pango_layout_context_changed(layout);
821
822- // find proper font size (can we do this before the rotation?)
823+ // find proper font size
824 int text_width, text_height;
825 pango_layout_get_pixel_size(layout, &text_width, nullptr);
826 while (text_width > max_text_width && font_size > MIN_FONT_SIZE)
827@@ -374,23 +382,23 @@
828 const double ORANGE_G = 0.28235;
829 const double ORANGE_B = 0.07843;
830
831- double belt_w = static_cast<double>(pixbuf_width - SHADOW_SIDE_PADDING * 2);
832- double belt_h = static_cast<double>(pixbuf_height - SHADOW_BOTTOM_PADDING);
833-
834 // translate to make space for the shadow
835 cairo_save(cr.get());
836 cairo_translate(cr.get(), 1.0, 1.0);
837
838 cairo_set_source_rgba(cr.get(), ORANGE_R, ORANGE_G, ORANGE_B, 1.0);
839
840+ // base ribbon
841 cairo_rectangle(cr.get(), 0.0, 0.0, belt_w, belt_h);
842 cairo_fill_preserve(cr.get());
843
844+ // hightlight on left edge
845 std::shared_ptr<cairo_pattern_t> pattern(
846 cairo_pattern_create_linear(0.0, 0.0, belt_w, 0.0),
847 cairo_pattern_destroy);
848 cairo_pattern_add_color_stop_rgba(pattern.get(), 0.0, 1.0, 1.0, 1.0, 0.235294);
849 cairo_pattern_add_color_stop_rgba(pattern.get(), 0.02, 1.0, 1.0, 1.0, 0.0);
850+ // and on right one
851 if (!has_emblem)
852 {
853 cairo_pattern_add_color_stop_rgba(pattern.get(), 0.98, 1.0, 1.0, 1.0, 0.0);
854@@ -403,27 +411,38 @@
855
856 if (has_emblem)
857 {
858- // paint the curve
859- const double CURVE_START_XPOS = 0.631163; // 0.651163
860- const double CURVE_CP1_XPOS = CURVE_START_XPOS + 0.068023;
861- const double CURVE_CP2_XPOS = CURVE_START_XPOS + 0.07;
862- const double CURVE_CP3_XPOS = CURVE_START_XPOS + 0.102965;
863- const double CURVE_CP4_XPOS = CURVE_START_XPOS + 0.161511;
864- const double CURVE_CP5_XPOS = CURVE_START_XPOS + 0.197093;
865- const double CURVE_END_XPOS = CURVE_START_XPOS + 0.265779;
866-
867- const double CURVE_START_X = CURVE_START_XPOS * belt_w;
868+ // size of the emblem
869+ const int category_pb_w = gdk_pixbuf_get_width(category_pixbuf);
870+ const int category_pb_h = gdk_pixbuf_get_height(category_pixbuf);
871+
872+ // control and end points for the two bezier curves
873+ const double CURVE_X_MULT = belt_h / 20.0 * 24.0;
874+ const double CURVE_CP1_X = 0.25 * CURVE_X_MULT;
875+ const double CURVE_CP2_X = 0.2521 * CURVE_X_MULT;
876+ const double CURVE_CP3_X = 0.36875 * CURVE_X_MULT;
877+ const double CURVE_CP4_X = 0.57875 * CURVE_X_MULT;
878+ const double CURVE_CP5_X = 0.705417 * CURVE_X_MULT;
879+ const double CURVE_CP6_X = 0.723333 * CURVE_X_MULT;
880+ const double CURVE_CP7_X = 0.952375 * CURVE_X_MULT;
881+
882+ const double CURVE_Y1 = 0.9825;
883+ const double CURVE_Y2 = 0.72725;
884+ const double CURVE_Y3 = 0.27275;
885+
886+ const double CURVE_START_X = belt_w - category_pb_w - CURVE_CP5_X - EMBLEM_PADDING;
887+ //const double CURVE_END_X = CURVE_START_X + CURVE_X_MULT;
888
889 cairo_set_source_rgba(cr.get(), 1.0, 1.0, 1.0, 1.0);
890
891- cairo_move_to(cr.get(), CURVE_START_XPOS * belt_w, belt_h);
892- cairo_curve_to(cr.get(), CURVE_CP1_XPOS * belt_w, belt_h,
893- CURVE_CP2_XPOS * belt_w, 0.9825 * belt_h,
894- CURVE_CP3_XPOS * belt_w, 0.72725 * belt_h);
895- cairo_line_to(cr.get(), CURVE_CP4_XPOS * belt_w, 0.27275 * belt_h);
896- cairo_curve_to(cr.get(), CURVE_CP5_XPOS * belt_w, 0.0,
897- CURVE_CP5_XPOS * belt_w, 0.0,
898- CURVE_END_XPOS * belt_w, 0.0);
899+ // paint the curved area
900+ cairo_move_to(cr.get(), CURVE_START_X, belt_h);
901+ cairo_curve_to(cr.get(), CURVE_START_X + CURVE_CP1_X, belt_h,
902+ CURVE_START_X + CURVE_CP2_X, CURVE_Y1 * belt_h,
903+ CURVE_START_X + CURVE_CP3_X, CURVE_Y2 * belt_h);
904+ cairo_line_to(cr.get(), CURVE_START_X + CURVE_CP4_X, CURVE_Y3 * belt_h);
905+ cairo_curve_to(cr.get(), CURVE_START_X + CURVE_CP5_X, 0.0,
906+ CURVE_START_X + CURVE_CP6_X, 0.0,
907+ CURVE_START_X + CURVE_CP7_X, 0.0);
908 cairo_line_to(cr.get(), belt_w, 0.0);
909 cairo_line_to(cr.get(), belt_w, belt_h);
910 cairo_close_path(cr.get());
911@@ -440,16 +459,13 @@
912 cairo_fill(cr.get());
913
914 // paint the emblem
915- int category_pb_w = gdk_pixbuf_get_width(category_pixbuf);
916- int category_pb_h = gdk_pixbuf_get_height(category_pixbuf);
917- double category_pb_x =
918- belt_w - category_pb_w > CURVE_CP4_XPOS * belt_w ?
919- CURVE_CP4_XPOS * belt_w + ((1 - CURVE_CP4_XPOS) * belt_w - category_pb_w) / 2 : CURVE_CP4_XPOS * belt_w;
920+ double category_pb_x = belt_w - category_pb_w - EMBLEM_PADDING - 1;
921 gdk_cairo_set_source_pixbuf(cr.get(), category_pixbuf,
922 category_pb_x, (belt_h - category_pb_h) / 2);
923 cairo_paint(cr.get());
924 }
925
926+ // paint the text
927 cairo_set_source_rgba(cr.get(), 1.0, 1.0, 1.0, 1.0);
928 cairo_move_to(cr.get(), 0.0, belt_h / 2);
929 pango_layout_get_pixel_size(layout, nullptr, &text_height);
930@@ -463,7 +479,7 @@
931
932 pattern.reset(cairo_pattern_create_linear(0.0, belt_h, 0.0, belt_h + SHADOW_BOTTOM_PADDING),
933 cairo_pattern_destroy);
934- cairo_pattern_add_color_stop_rgba(pattern.get(), 0.0, 0.0, 0.0, 0.0, 0.2);
935+ cairo_pattern_add_color_stop_rgba(pattern.get(), 0.0, 0.0, 0.0, 0.0, 0.235294);
936 cairo_pattern_add_color_stop_rgba(pattern.get(), 1.0, 0.0, 0.0, 0.0, 0.0);
937
938 cairo_set_source(cr.get(), pattern.get());
939@@ -472,13 +488,11 @@
940 cairo_fill(cr.get());
941
942 cairo_set_source_rgba(cr.get(), 0.0, 0.0, 0.0, 0.1);
943- cairo_move_to(cr.get(), 0.0, 1.0);
944- cairo_line_to(cr.get(), 0.0, belt_h);
945- cairo_stroke(cr.get());
946+ cairo_rectangle(cr.get(), 0.0, 1.0, 1.0, belt_h);
947+ cairo_fill(cr.get());
948
949- cairo_move_to(cr.get(), belt_w, 1.0);
950- cairo_line_to(cr.get(), belt_w, belt_h);
951- cairo_stroke(cr.get());
952+ cairo_rectangle(cr.get(), belt_w, 1.0, 1.0, belt_h);
953+ cairo_fill(cr.get());
954
955 // FIXME: going from image_surface to pixbuf, and then to texture :(
956 glib::Object<GdkPixbuf> detail_pb(
957@@ -533,6 +547,10 @@
958 unsigned cat_size = max_font_height * 9 / 8;
959 switch (category)
960 {
961+ case UNITY_PROTOCOL_CATEGORY_TYPE_NONE:
962+ // rest of the processing is the CategoryIconLoaded, lets invoke it
963+ helper_slot("", -1, cat_size, glib::Object<GdkPixbuf>());
964+ break;
965 case UNITY_PROTOCOL_CATEGORY_TYPE_APPLICATION:
966 helper_handle =
967 impl->LoadFromFilename(PKGDATADIR"/emblem_apps.svg", -1, cat_size, helper_slot);
968@@ -574,9 +592,8 @@
969 case UNITY_PROTOCOL_CATEGORY_TYPE_TOOLS:
970 case UNITY_PROTOCOL_CATEGORY_TYPE_CAR:
971 default:
972- // rest of the processing is the CategoryIconLoaded, lets invoke it
973- glib::Object<GdkPixbuf> null_pixbuf;
974- helper_slot("", -1, cat_size, null_pixbuf);
975+ helper_handle =
976+ impl->LoadFromFilename(PKGDATADIR"/emblem_others.svg", -1, cat_size, helper_slot);
977 break;
978 }
979 }
980
981=== modified file 'unity-shared/PluginAdapter.h'
982--- unity-shared/PluginAdapter.h 2012-09-10 22:44:29 +0000
983+++ unity-shared/PluginAdapter.h 2012-09-28 21:43:21 +0000
984@@ -180,6 +180,8 @@
985 bool CheckWindowIntersection(nux::Geometry const& region, CompWindow* window) const;
986 void SetMwmWindowHints(Window xid, MotifWmHints* new_hints);
987
988+ Window GetTopMostValidWindowInViewport() const;
989+
990 std::string GetTextProperty(guint32 xid, Atom atom) const;
991 std::string GetUtf8Property(guint32 xid, Atom atom) const;
992
993
994=== modified file 'unity-shared/PluginAdapterCompiz.cpp'
995--- unity-shared/PluginAdapterCompiz.cpp 2012-09-10 22:44:29 +0000
996+++ unity-shared/PluginAdapterCompiz.cpp 2012-09-28 21:43:21 +0000
997@@ -538,40 +538,35 @@
998 bool
999 PluginAdapter::IsWindowOnTop(guint32 xid) const
1000 {
1001- Window win = xid;
1002- CompWindow* window = m_Screen->findWindow(win);
1003-
1004- if (window)
1005+ if (xid == GetTopMostValidWindowInViewport())
1006+ return true;
1007+
1008+ return false;
1009+}
1010+
1011+Window PluginAdapter::GetTopMostValidWindowInViewport() const
1012+{
1013+ CompWindow* window;
1014+ CompPoint screen_vp = m_Screen->vp();
1015+ std::vector<Window> const& our_xids = nux::XInputWindow::NativeHandleList();
1016+
1017+ auto const& windows = m_Screen->windows();
1018+ for (auto it = windows.rbegin(); it != windows.rend(); ++it)
1019 {
1020- if (window->inShowDesktopMode() || !window->isMapped() || !window->isViewable() || window->minimized())
1021- return false;
1022-
1023- CompPoint window_vp = window->defaultViewport();
1024- nux::Geometry const& window_vp_geo = GetWorkAreaGeometry(window->id());
1025- std::vector<Window> const& our_xids = nux::XInputWindow::NativeHandleList();
1026-
1027- for (CompWindow* sibling = window->next; sibling; sibling = sibling->next)
1028+ window = *it;
1029+ if (window->defaultViewport() == screen_vp &&
1030+ window->isViewable() && window->isMapped() &&
1031+ !window->minimized() && !window->inShowDesktopMode() &&
1032+ !(window->state() & CompWindowStateAboveMask) &&
1033+ !(window->type() & CompWindowTypeSplashMask) &&
1034+ !(window->type() & CompWindowTypeDockMask) &&
1035+ !window->overrideRedirect() &&
1036+ std::find(our_xids.begin(), our_xids.end(), window->id()) == our_xids.end())
1037 {
1038- if (sibling->defaultViewport() == window_vp && !sibling->minimized() &&
1039- sibling->isMapped() && sibling->isViewable() && !sibling->inShowDesktopMode() &&
1040- !(sibling->state() & CompWindowStateAboveMask) &&
1041- !(sibling->type() & CompWindowTypeSplashMask) &&
1042- !(sibling->type() & CompWindowTypeDockMask) &&
1043- /* FIXME: This should be included by the above defaultViewport() check,
1044- * but it doesn't seem to work correctly when there's only one workspace
1045- * enabled, so please drop the line above when bug #996604 is fixed in
1046- * Compiz. */
1047- !window_vp_geo.Intersect(GetWindowGeometry(sibling->id())).IsNull() &&
1048- std::find(our_xids.begin(), our_xids.end(), sibling->id()) == our_xids.end())
1049- {
1050- return false;
1051- }
1052+ return window->id();
1053 }
1054-
1055- return true;
1056 }
1057-
1058- return false;
1059+ return 0;
1060 }
1061
1062 bool
1063
1064=== modified file 'unity-shared/SearchBar.cpp'
1065--- unity-shared/SearchBar.cpp 2012-09-16 12:39:42 +0000
1066+++ unity-shared/SearchBar.cpp 2012-09-28 21:43:21 +0000
1067@@ -40,7 +40,7 @@
1068
1069 const int SPACE_BETWEEN_SPINNER_AND_TEXT = 5;
1070 const int SPACE_BETWEEN_ENTRY_AND_HIGHLIGHT = 10;
1071-const int LEFT_INTERNAL_PADDING = 6;
1072+const int LEFT_INTERNAL_PADDING = 4;
1073 const int SEARCH_ENTRY_RIGHT_BORDER = 10;
1074
1075 const int HIGHLIGHT_HEIGHT = 24;

Subscribers

People subscribed via source and target branches

to all changes: