Merge ~rs2009/unity:master into unity:master

Proposed by Rudra Saraswat
Status: Merged
Approved by: Dmitry Shachnev
Approved revision: 136316749c6af38415ff2ffa7dd3b84f2e3f907a
Merged at revision: 4bc29d53573b0943a77f56772fb0f4b183192cad
Proposed branch: ~rs2009/unity:master
Merge into: unity:master
Diff against target: 7599 lines (+3916/-1030)
84 files modified
.gitignore (+80/-6)
CMakeLists.txt (+1/-1)
README (+4/-0)
dash/DashView.cpp (+22/-144)
dash/PlacesGroup.cpp (+4/-0)
dash/ResultViewGrid.cpp (+1/-1)
dash/ScopeBar.cpp (+1/-1)
dash/StandaloneDash.cpp (+3/-3)
debian/changelog (+9/-0)
debian/control (+34/-1)
debian/rules (+4/-5)
debian/unity-uwidgets.install (+3/-0)
debian/unity.install (+1/-1)
dev/null (+0/-107)
launcher/BFBLauncherIcon.cpp (+1/-3)
launcher/FileManagerLauncherIcon.cpp (+1/-1)
launcher/Launcher.cpp (+12/-306)
launcher/StandaloneLauncher.cpp (+1/-1)
launcher/TrashLauncherIcon.cpp (+1/-1)
lockscreen/LockScreenPanel.cpp (+2/-2)
panel/PanelController.cpp (+1/-1)
panel/PanelIndicatorsView.cpp (+1/-0)
panel/PanelIndicatorsView.h (+1/-1)
panel/PanelMenuView.cpp (+2/-2)
panel/PanelTray.cpp (+3/-3)
panel/PanelView.cpp (+2/-2)
panel/StandalonePanel.cpp (+1/-1)
plugins/unityshell/src/unityshell.cpp (+0/-64)
plugins/unityshell/unityshell.xml.in (+4/-4)
resources/launcher_bfb.svg (+125/-12)
shutdown/SessionButton.cpp (+2/-2)
shutdown/SessionView.cpp (+1/-1)
tests/CMakeLists.txt (+0/-10)
tests/mock_key_grabber.h (+1/-1)
tests/test_launcher.cpp (+0/-58)
tests/test_launcher_controller.cpp (+0/-121)
unity-shared/BackgroundEffectHelper.cpp (+1/-1)
unity-shared/CMakeLists.txt (+1/-1)
unity-shared/DashStyle.cpp (+17/-39)
unity-shared/DashStyle.h (+2/-0)
unity-shared/FileManager.cpp (+1/-1)
unity-shared/FileManager.h (+1/-1)
unity-shared/GnomeFileManager.h (+1/-1)
unity-shared/NemoFileManager.cpp (+33/-33)
unity-shared/NemoFileManager.h (+1/-1)
unity-shared/OverlayRenderer.cpp (+35/-17)
unity-shared/OverlayWindowButtons.cpp (+1/-1)
unity-shared/PanelStyle.cpp (+2/-2)
unity-shared/SearchBar.cpp (+3/-63)
unity-shared/SearchBar.h (+0/-1)
unity-standalone/StandaloneUnity.cpp (+2/-1)
uwidgets/LICENCE (+636/-0)
uwidgets/MANIFEST.in (+3/-0)
uwidgets/official-widgets/clock/clock.py (+104/-0)
uwidgets/official-widgets/clock/settings.ini (+7/-0)
uwidgets/official-widgets/clock/widget.ini (+5/-0)
uwidgets/official-widgets/cpu/cpu.py (+169/-0)
uwidgets/official-widgets/cpu/settings.ini (+5/-0)
uwidgets/official-widgets/cpu/widget.ini (+5/-0)
uwidgets/official-widgets/spotify/settings.ini (+5/-0)
uwidgets/official-widgets/spotify/spotify.py (+176/-0)
uwidgets/official-widgets/spotify/widget.ini (+5/-0)
uwidgets/official-widgets/unsplash-background/settings.ini (+5/-0)
uwidgets/official-widgets/unsplash-background/unsplash-background.py (+96/-0)
uwidgets/official-widgets/unsplash-background/widget.ini (+5/-0)
uwidgets/setup.py (+64/-0)
uwidgets/uwidgets-runner (+24/-0)
uwidgets/uwidgets-runner.desktop (+9/-0)
uwidgets/uwidgets/__init__.py (+77/-0)
uwidgets/uwidgets/_brush.py (+163/-0)
uwidgets/uwidgets/_extended_context.py (+72/-0)
uwidgets/uwidgets/legacy.py (+73/-0)
uwidgets/uwidgets/settings/__init__.py (+4/-0)
uwidgets/uwidgets/settings/launcher.py (+18/-0)
uwidgets/uwidgets/settings/wallpaper.py (+27/-0)
uwidgets/uwidgets/x11/__init__.py (+31/-0)
uwidgets/uwidgets/x11/_x11module.c (+71/-0)
uwidgets/uwidgets/x11/atelier.c (+265/-0)
uwidgets/uwidgets/x11/atelier.h (+63/-0)
uwidgets/uwidgets/x11/base_canvas.c (+445/-0)
uwidgets/uwidgets/x11/base_canvas.h (+163/-0)
uwidgets/uwidgets/x11/canvas.py (+407/-0)
uwidgets/uwidgets/x11/pycairo.h (+280/-0)
uwidgets/widget.ini (+4/-0)
Reviewer Review Type Date Requested Status
Dmitry Shachnev Needs Fixing
Marco Trevisan (Treviño) Pending
Review via email: mp+437213@code.launchpad.net

Commit message

Make Unity 7.7 changes
* Increased panel size to 30 from 24
* Moved scope bar to top of dash
* Added UWidgets, based on Blighty
* Reduced default launcher icon size to 44
* Made dash vertical (temporarily removed previews)
* Added indicator-notifications to Recommends

Description of the change

This merge request updates this repository to Unity 7.7.

To post a comment you must log in.
Revision history for this message
Dmitry Shachnev (mitya57) :
review: Needs Fixing
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Some my previous comments are still valid:
- invalid trove classifier
- reference to non-existing license file
- bare "except:"

And a few new comments.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/.gitignore b/.gitignore
2index d58747c..da7cffb 100644
3--- a/.gitignore
4+++ b/.gitignore
5@@ -1,16 +1,90 @@
6 build
7-services/panel-marshal.c
8-services/panel-marshal.h
9 .AUTHORS.sed
10-tests/autopilot/dist
11-tests/autopilot/unity.egg-info
12 *.log
13 *.debhelper
14 *.substvars
15 *.swp
16+.vscode/
17 debian/tmp
18 debian/files
19 obj-*/
20-debian/libunity-core-*/
21-debian/unity-*/
22+debian/libunity-core-6.0-9/
23+debian/libunity-core-6.0-dev/
24+debian/unity-autopilot/
25+debian/unity-uwidgets/
26+debian/unity-services/
27+debian/unity-schemas/
28 debian/unity/
29+
30+### UWidgets
31+
32+# Byte-compiled / optimized / DLL files
33+__pycache__/
34+*.py[cod]
35+*$py.class
36+
37+# C extensions
38+*.so
39+
40+# Distribution / packaging
41+.Python
42+build/
43+develop-eggs/
44+dist/
45+downloads/
46+eggs/
47+.eggs/
48+lib/
49+lib64/
50+parts/
51+sdist/
52+var/
53+wheels/
54+*.egg-info/
55+.installed.cfg
56+*.egg
57+MANIFEST
58+
59+# PyInstaller
60+# Usually these files are written by a python script from a template
61+# before PyInstaller builds the exe, so as to inject date/other infos into it.
62+*.manifest
63+*.spec
64+
65+# Installer logs
66+pip-log.txt
67+pip-delete-this-directory.txt
68+
69+# Unit test / coverage reports
70+htmlcov/
71+.tox/
72+.coverage
73+.coverage.*
74+.cache
75+nosetests.xml
76+coverage.xml
77+*.cover
78+.hypothesis/
79+.pytest_cache/
80+
81+# Translations
82+*.mo
83+*.pot
84+
85+# Sphinx documentation
86+docs/*build/
87+
88+# PyBuilder
89+target/
90+
91+# pyenv
92+.python-version
93+
94+# Environments
95+.env
96+.venv
97+env/
98+venv/
99+ENV/
100+env.bak/
101+venv.bak/
102diff --git a/CMakeLists.txt b/CMakeLists.txt
103index 1d58a46..bd237ca 100644
104--- a/CMakeLists.txt
105+++ b/CMakeLists.txt
106@@ -10,7 +10,7 @@ include (GNUInstallDirs)
107 #
108 set (PROJECT_NAME "unity")
109 set (UNITY_MAJOR 7)
110-set (UNITY_MINOR 6)
111+set (UNITY_MINOR 7)
112 set (UNITY_MICRO 0)
113 set (UNITY_VERSION "${UNITY_MAJOR}.${UNITY_MINOR}.${UNITY_MICRO}")
114 set (UNITY_API_VERSION "6.0")
115diff --git a/README b/README
116index 801461a..131489c 100644
117--- a/README
118+++ b/README
119@@ -19,3 +19,7 @@
120 D-Bus activation. This is used for testing how the panel reacts when it
121 starts before the service does.
122
123+ Credits
124+--------------------------------------------------------------------------------
125+
126+UWidgets is based on the Blighty project.
127\ No newline at end of file
128diff --git a/dash/DashView.cpp b/dash/DashView.cpp
129index dc4e1b2..0fd0597 100644
130--- a/dash/DashView.cpp
131+++ b/dash/DashView.cpp
132@@ -39,6 +39,7 @@
133 #include "unity-shared/UBusMessages.h"
134 #include "unity-shared/UnitySettings.h"
135 #include "unity-shared/WindowManager.h"
136+#include "unity-shared/FileManager.h"
137
138 namespace unity
139 {
140@@ -231,83 +232,12 @@ void DashView::OnResultActivated(ResultView::ActivateType type, LocalResult cons
141
142 void DashView::BuildPreview(Preview::Ptr model)
143 {
144- if (!preview_displaying_)
145- {
146- StartPreviewAnimation();
147-
148- content_view_->SetPresentRedirectedView(false);
149- preview_scope_view_ = active_scope_view_;
150- if (preview_scope_view_)
151- {
152- preview_scope_view_->ForceCategoryExpansion(stored_activated_unique_id_, true);
153- preview_scope_view_->EnableResultTextures(true);
154- preview_scope_view_->PushFilterExpansion(false);
155- }
156-
157- if (!preview_container_)
158- {
159- preview_container_ = new previews::PreviewContainer();
160- preview_container_->SetRedirectRenderingToTexture(true);
161- AddChild(preview_container_.GetPointer());
162- preview_container_->SetParentObject(this);
163- }
164- preview_container_->Preview(model, previews::Navigation::NONE); // no swipe left or right
165- preview_container_->scale = scale();
166- preview_container_->SetGeometry(scopes_layout_->GetGeometry());
167- preview_displaying_ = true;
168-
169- // connect to nav left/right signals to request nav left/right movement.
170- preview_container_->navigate_left.connect([this] () {
171- preview_navigation_mode_ = previews::Navigation::LEFT;
172-
173- // sends a message to all result views, sending the the uri of the current preview result
174- // and the unique id of the result view that should be handling the results
175- ubus_manager_.SendMessage(UBUS_DASH_PREVIEW_NAVIGATION_REQUEST, g_variant_new("(ivs)", -1, g_variant_ref(last_activated_result_.Variant()), stored_activated_unique_id_.c_str()));
176- });
177-
178- preview_container_->navigate_right.connect([this] () {
179- preview_navigation_mode_ = previews::Navigation::RIGHT;
180-
181- // sends a message to all result views, sending the the uri of the current preview result
182- // and the unique id of the result view that should be handling the results
183- ubus_manager_.SendMessage(UBUS_DASH_PREVIEW_NAVIGATION_REQUEST, g_variant_new("(ivs)", 1, g_variant_ref(last_activated_result_.Variant()), stored_activated_unique_id_.c_str()));
184- });
185-
186- preview_container_->request_close.connect([this] () { ClosePreview(); });
187- }
188- else
189- {
190- // got a new preview whilst already displaying, we probably clicked a navigation button.
191- preview_container_->Preview(model, preview_navigation_mode_); // TODO
192- preview_container_->scale = scale();
193- }
194-
195- if (G_LIKELY(preview_state_machine_.left_results() > 0 && preview_state_machine_.right_results() > 0))
196- preview_container_->DisableNavButton(previews::Navigation::NONE);
197- else if (preview_state_machine_.left_results() > 0)
198- preview_container_->DisableNavButton(previews::Navigation::RIGHT);
199- else if (preview_state_machine_.right_results() > 0)
200- preview_container_->DisableNavButton(previews::Navigation::LEFT);
201- else
202- preview_container_->DisableNavButton(previews::Navigation::BOTH);
203-
204- QueueDraw();
205+ // Previews have been removed, so this function has been left blank until we eliminate all of the preview-related code.
206 }
207
208 void DashView::ClosePreview()
209 {
210- if (preview_displaying_)
211- {
212- EndPreviewAnimation();
213-
214- preview_displaying_ = false;
215- }
216-
217- preview_navigation_mode_ = previews::Navigation::NONE;
218-
219- // re-focus dash view component.
220- nux::GetWindowCompositor().SetKeyFocusArea(default_focus());
221- QueueDraw();
222+ // Previews have been removed, so this function has been left blank until we eliminate all of the preview-related code.
223 }
224
225 void DashView::StartPreviewAnimation()
226@@ -555,6 +485,11 @@ void DashView::SetupViews()
227 content_view_->SetLayout(content_layout_);
228 layout_->AddView(content_view_, 1, nux::MINOR_POSITION_START, nux::MINOR_SIZE_FULL);
229
230+ scope_bar_ = new ScopeBar();
231+ AddChild(scope_bar_);
232+ scope_bar_->scope_activated.connect(sigc::mem_fun(this, &DashView::OnScopeBarActivated));
233+ content_layout_->AddView(scope_bar_, 0, nux::MINOR_POSITION_CENTER);
234+
235 search_bar_layout_ = new nux::HLayout();
236 content_layout_->AddLayout(search_bar_layout_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);
237
238@@ -578,11 +513,6 @@ void DashView::SetupViews()
239 scopes_layout_ = new nux::VLayout();
240 content_layout_->AddLayout(scopes_layout_, 1, nux::MINOR_POSITION_START);
241
242- scope_bar_ = new ScopeBar();
243- AddChild(scope_bar_);
244- scope_bar_->scope_activated.connect(sigc::mem_fun(this, &DashView::OnScopeBarActivated));
245- content_layout_->AddView(scope_bar_, 0, nux::MINOR_POSITION_CENTER);
246-
247 OnDPIChanged();
248 }
249
250@@ -701,24 +631,24 @@ nux::Geometry DashView::GetBestFitGeometry(nux::Geometry const& for_geo)
251 style.GetPlacesGroupResultTopPadding().CP(scale) +
252 style.GetTileHeight().CP(scale));
253
254- int half = for_geo.width / 2;
255-
256- // if default dash size is bigger than half a screens worth of items, go for that.
257- while ((width += tile_width) < half);
258+ // let's show five tiles per row
259+ width = tile_width * 5;
260
261- width = std::max(width, tile_width * DASH_TILE_HORIZONTAL_COUNT);
262 width += style.GetVSeparatorSize().CP(scale);
263 width += style.GetPlacesGroupResultLeftPadding().CP(scale) + DASH_RESULT_RIGHT_PAD.CP(scale);
264
265- height = style.GetHSeparatorSize().CP(scale);
266- height += style.GetDashViewTopPadding().CP(scale);
267- height += search_bar_->GetGeometry().height;
268- height += category_height * DASH_DEFAULT_CATEGORY_COUNT; // adding three categories
269- height += scope_bar_->GetGeometry().height;
270-
271- // width/height shouldn't be bigger than the geo available.
272+ // width shouldn't be bigger than the geo available.
273 width = std::min(width, for_geo.width); // launcher width is taken into account in for_geo.
274- height = std::min(height, for_geo.height - vertical_offset); // panel height is not taken into account in for_geo.
275+ height = for_geo.height - vertical_offset;
276+
277+ if (Settings::Instance().launcher_position() == LauncherPosition::BOTTOM) {
278+ height = style.GetHSeparatorSize().CP(scale);
279+ height += style.GetDashViewTopPadding().CP(scale);
280+ height += search_bar_->GetGeometry().height;
281+ height += category_height * 3;
282+ height += scope_bar_->GetGeometry().height;
283+ height = std::min(height, for_geo.height - vertical_offset);
284+ }
285
286 return nux::Geometry(0, vertical_offset, width, height);
287 }
288@@ -1091,59 +1021,7 @@ void DashView::DrawPreviewResultTextures(nux::GraphicsEngine& graphics_engine, b
289 }
290
291 void DashView::DrawPreview(nux::GraphicsEngine& graphics_engine, bool force_draw)
292-{
293- if (animate_preview_value_ > 0.0f)
294- {
295- bool animating = animate_split_value_ != 1.0f || animate_preview_value_ < 1.0f;
296- bool preview_force_draw = force_draw || animating || IsFullRedraw();
297-
298- if (preview_force_draw)
299- nux::GetPainter().PushBackgroundStack();
300-
301- if (animate_preview_value_ < 1.0f && preview_container_->RedirectRenderingToTexture())
302- {
303- preview_container_->SetPresentRedirectedView(false);
304- preview_container_->ProcessDraw(graphics_engine, preview_force_draw);
305-
306- unsigned int alpha, src, dest = 0;
307- graphics_engine.GetRenderStates().GetBlend(alpha, src, dest);
308- graphics_engine.GetRenderStates().SetBlend(true, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
309-
310- nux::ObjectPtr<nux::IOpenGLBaseTexture> preview_texture = preview_container_->BackupTexture();
311- if (preview_texture)
312- {
313- nux::TexCoordXForm texxform;
314- texxform.FlipVCoord(true);
315- texxform.uoffset = 0.0f;
316- texxform.voffset = 0.0f;
317- texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_COORD);
318-
319- nux::Geometry const& geo_preview = preview_container_->GetGeometry();
320- graphics_engine.QRP_1Tex
321- (
322- geo_preview.x,
323- geo_preview.y,
324- geo_preview.width,
325- geo_preview.height,
326- preview_texture,
327- texxform,
328- nux::Color(animate_preview_value_, animate_preview_value_, animate_preview_value_, animate_preview_value_)
329- );
330- }
331-
332- preview_container_->SetPresentRedirectedView(true);
333-
334- graphics_engine.GetRenderStates().SetBlend(alpha, src, dest);
335- }
336- else
337- {
338- preview_container_->ProcessDraw(graphics_engine, preview_force_draw);
339- }
340-
341- if (preview_force_draw)
342- nux::GetPainter().PopBackgroundStack();
343- }
344-}
345+{ }
346
347 void DashView::OnActivateRequest(GVariant* args)
348 {
349diff --git a/dash/PlacesGroup.cpp b/dash/PlacesGroup.cpp
350index 7a1f8db..b83be9b 100755
351--- a/dash/PlacesGroup.cpp
352+++ b/dash/PlacesGroup.cpp
353@@ -52,6 +52,9 @@ namespace
354 const nux::Color EXPAND_DEFAULT_TEXT_COLOR(1.0f, 1.0f, 1.0f, 0.5f);
355 const float EXPAND_DEFAULT_ICON_OPACITY = 0.5f;
356
357+// Category heading
358+const RawPixel HEADER_VERTICAL_MARGIN = 10_em;
359+
360 // Category highlight
361 const RawPixel HIGHLIGHT_RIGHT_PADDING = 10_em;
362 const RawPixel HIGHLIGHT_HEIGHT = 24_em;
363@@ -229,6 +232,7 @@ PlacesGroup::UpdatePlacesGroupSize()
364
365 _header_layout->SetSpaceBetweenChildren(SPACE_BETWEEN_CHILDREN.CP(scale()));
366 _header_layout->SetLeftAndRightPadding(_style.GetCategoryHeaderLeftPadding().CP(scale), 0);
367+ _header_layout->SetVerticalExternalMargin(HEADER_VERTICAL_MARGIN);
368
369 _icon->SetMinMaxSize(icon_size, icon_size);
370
371diff --git a/dash/ResultViewGrid.cpp b/dash/ResultViewGrid.cpp
372index 78a01de..1669260 100644
373--- a/dash/ResultViewGrid.cpp
374+++ b/dash/ResultViewGrid.cpp
375@@ -55,7 +55,7 @@ namespace
376
377 const int DOUBLE_CLICK_SPEED = 500; //500 ms (double-click speed hardcoded to 400 ms in nux)
378
379- const RawPixel WIDTH_PADDING = 25_em;
380+ const RawPixel WIDTH_PADDING = 25_em;
381 const RawPixel SCROLLBAR_WIDTH = 3_em;
382
383 const std::string APPLICATION_URI_PREFIX = "application://";
384diff --git a/dash/ScopeBar.cpp b/dash/ScopeBar.cpp
385index 027675c..5bba477 100644
386--- a/dash/ScopeBar.cpp
387+++ b/dash/ScopeBar.cpp
388@@ -58,7 +58,7 @@ void ScopeBar::SetupBackground()
389 rop.Blend = true;
390 rop.SrcBlend = GL_ONE;
391 rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA;
392- bg_layer_.reset(new nux::ColorLayer(nux::Color(0.0f, 0.0f, 0.0f, 0.2f), true, rop));
393+ bg_layer_.reset(new nux::ColorLayer(nux::Color(0.0f, 0.0f, 0.0f, 0.0f), true, rop));
394 }
395
396 void ScopeBar::UpdateScale(double scale)
397diff --git a/dash/StandaloneDash.cpp b/dash/StandaloneDash.cpp
398index e869ace..b14d360 100644
399--- a/dash/StandaloneDash.cpp
400+++ b/dash/StandaloneDash.cpp
401@@ -41,8 +41,8 @@
402 #include <UnityCore/GSettingsScopes.h>
403 #include <UnityCore/ScopeProxyInterface.h>
404
405-const unity::RawPixel WIDTH(1024);
406-const unity::RawPixel HEIGHT(768);
407+const unity::RawPixel WIDTH(1280);
408+const unity::RawPixel HEIGHT(720);
409
410 using namespace unity::dash;
411
412@@ -126,7 +126,7 @@ int main(int argc, char **argv)
413 0, &TestRunner::InitWindowThread, test_runner));
414
415 nux::ObjectPtr<nux::BaseTexture> background_tex;
416- background_tex.Adopt(nux::CreateTextureFromFile("/usr/share/backgrounds/warty-final-ubuntu.png"));
417+ background_tex.Adopt(nux::CreateTextureFromFile("/usr/share/backgrounds/ubuntu-unity/ubuntu-unity-default.png"));
418 nux::TexCoordXForm texxform;
419 auto tex_layer = std::make_shared<nux::TextureLayer>(background_tex->GetDeviceTexture(), texxform, nux::color::White);
420 wt->SetWindowBackgroundPaintLayer(tex_layer.get());
421diff --git a/debian/changelog b/debian/changelog
422index a3a4d5d..1767d6d 100644
423--- a/debian/changelog
424+++ b/debian/changelog
425@@ -1,3 +1,12 @@
426+unity (7.7.0+23.04.20230222-0ubuntu1) lunar; urgency=medium
427+
428+ * Added UWidgets, a new widget system for Unity based on Blighty
429+ * Made the dash vertical and moved the scope bar to the top
430+ * Increased the panel height to 30
431+ * Added indicator-notifications as a Recommend
432+
433+ -- Rudra Saraswat <ruds@ruds.io> Tue, 21 Feb 2022 15:38:23 +0530
434+
435 unity (7.6.0+22.10.20220913-0ubuntu1) kinetic; urgency=medium
436
437 [ Rudra Saraswat ]
438diff --git a/debian/control b/debian/control
439index c61edb5..2484f22 100644
440--- a/debian/control
441+++ b/debian/control
442@@ -11,6 +11,8 @@ Build-Depends: cmake (>= 3.17.0),
443 dh-translations (>= 94),
444 dh-python,
445 google-mock (>= 1.6.0+svn437),
446+ gir1.2-gtk-3.0,
447+ gir1.2-glib-2.0,
448 gsettings-desktop-schemas-dev,
449 gsettings-ubuntu-schemas (>= 0.0.7+17.10.20170922),
450 intltool (>= 0.35.0),
451@@ -48,17 +50,21 @@ Build-Depends: cmake (>= 3.17.0),
452 libxcb-icccm4-dev,
453 libxfixes-dev (>= 1:5.0.1),
454 libxi-dev (>= 2:1.7.1.901),
455+ libxinerama-dev,
456 libxpathselect-dev (>=1.4),
457 libxtst-dev,
458 libzeitgeist-2.0-dev,
459 pkg-config,
460 python3-all (>= 3.4),
461+ python3-dev,
462+ python3-gi,
463 python3-setuptools,
464 quilt,
465 systemd,
466+ xorg,
467 xserver-xorg-video-dummy,
468 xsltproc,
469- yaru-theme-icon,
470+ yaru-theme-icon
471 Standards-Version: 3.9.5
472 Homepage: https://launchpad.net/unity
473 # If you aren't a member of ~unity-team but need to upload packaging changes,
474@@ -95,6 +101,8 @@ Recommends: unity-control-center,
475 hud,
476 session-shortcuts,
477 unity-session,
478+ unity-uwidgets,
479+ indicator-notifications
480 Breaks: unity-lens-applications (<< 5.12.0-0ubuntu2),
481 unity-lens-files (<< 5.10.0-0ubuntu2),
482 unity-lens-music (<< 6.0.0),
483@@ -220,3 +228,28 @@ Description: Autopiloted tests for Unity
484 bindings to be able to write tests in python as well as the full test suite
485 for Unity.
486
487+Package: unity-uwidgets
488+Section: python
489+Architecture: all
490+Depends: ${misc:Depends},
491+ ${python3:Depends},
492+ python3,
493+ xorg,
494+ libxinerama-dev,
495+ libcairo2-dev,
496+ python3-gi,
497+ python3-pil,
498+ python3-pydbus,
499+ python3-psutil,
500+ gir1.2-gtk-3.0,
501+ gir1.2-glib-2.0,
502+Description: Widgets for Unity
503+ Unity is a desktop experience that sings. Designed by Canonical and the Ayatana
504+ community, Unity is all about the combination of familiarity and the future. We
505+ bring together visual design, analysis of user experience testing, modern
506+ graphics technologies and a deep understanding of the free software landscape
507+ to produce what we hope will be the lightest, most elegant and most delightful
508+ way to use your PC.
509+ .
510+ This package contains support for widgets for Unity, based on Blighty.
511+
512diff --git a/debian/rules b/debian/rules
513index 4b29c43..0386984 100755
514--- a/debian/rules
515+++ b/debian/rules
516@@ -35,13 +35,12 @@ override_dh_auto_configure:
517
518 override_dh_install:
519 # install autopilot tests
520- cd tests/autopilot; \
521- set -ex; for python in $(shell py3versions -r); do \
522- $$python setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; \
523- done; \
524- cd $(CURDIR)
525+ cd tests/autopilot; python3 setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb;
526 find debian/tmp/usr/lib -name \*.*a -exec rm {} \;
527 rm -rf debian/tmp/usr/share/gconf/schemas
528+ # install uwidgets
529+ cd uwidgets; python3 setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb
530+ install -Dm755 uwidgets/uwidgets-runner.desktop $(CURDIR)/debian/tmp/etc/xdg/autostart/uwidgets-runner.desktop
531 dh_install --fail-missing
532
533 override_dh_gencontrol:
534diff --git a/debian/unity-uwidgets.install b/debian/unity-uwidgets.install
535new file mode 100644
536index 0000000..5bbbd88
537--- /dev/null
538+++ b/debian/unity-uwidgets.install
539@@ -0,0 +1,3 @@
540+usr/lib/python*/*/uwidgets*
541+usr/bin/uwidgets-runner
542+etc/xdg/autostart/uwidgets-runner.desktop
543\ No newline at end of file
544diff --git a/debian/unity.install b/debian/unity.install
545index b60c762..224959e 100644
546--- a/debian/unity.install
547+++ b/debian/unity.install
548@@ -1,6 +1,6 @@
549 etc/compizconfig
550 etc/pam.d
551-usr/bin
552+usr/bin/unity
553 usr/lib/*/compiz/libunity*.so
554 usr/lib/*/unity/unity-active-plugins-safety-check
555 usr/lib/*/unity/compiz-config-profile-setter
556diff --git a/launcher/BFBLauncherIcon.cpp b/launcher/BFBLauncherIcon.cpp
557index 68ff72d..eece73a 100644
558--- a/launcher/BFBLauncherIcon.cpp
559+++ b/launcher/BFBLauncherIcon.cpp
560@@ -143,9 +143,7 @@ void BFBLauncherIcon::UpdateDefaultSearchText()
561 {
562 auto home_scope = reader_->GetScopeDataById("home.scope");
563
564- tooltip_text = ((Settings::Instance().remote_content) ?
565- _("Search your computer and online sources") :
566- _("Search your computer"));
567+ tooltip_text = _("Search your computer");
568
569 if (home_scope)
570 {
571diff --git a/launcher/FileManagerLauncherIcon.cpp b/launcher/FileManagerLauncherIcon.cpp
572index 019c550..7e1560a 100644
573--- a/launcher/FileManagerLauncherIcon.cpp
574+++ b/launcher/FileManagerLauncherIcon.cpp
575@@ -23,7 +23,7 @@
576 #include <NuxCore/Logger.h>
577 #include <UnityCore/DesktopUtilities.h>
578
579-#include "unity-shared/FileManager.h"
580+#include "unity-shared/GnomeFileManager.h"
581
582 namespace unity
583 {
584diff --git a/launcher/Launcher.cpp b/launcher/Launcher.cpp
585index e744757..a4f880a 100644
586--- a/launcher/Launcher.cpp
587+++ b/launcher/Launcher.cpp
588@@ -562,10 +562,8 @@ void Launcher::SetupRenderArg(AbstractLauncherIcon::Ptr const& icon, RenderArg&
589 arg.progress_bias = IconProgressBias(icon);
590 arg.progress = CLAMP(icon->GetProgress(), 0.0f, 1.0f);
591 arg.draw_shortcut = shortcuts_shown_ && !hide_machine_.GetQuirk(LauncherHideMachine::PLACES_VISIBLE);
592- arg.system_item = icon->GetIconType() == AbstractLauncherIcon::IconType::HOME ||
593- icon->GetIconType() == AbstractLauncherIcon::IconType::HUD;
594- arg.colorify_background = icon->GetIconType() == AbstractLauncherIcon::IconType::HOME ||
595- icon->GetIconType() == AbstractLauncherIcon::IconType::HUD ||
596+ arg.system_item = icon->GetIconType() == AbstractLauncherIcon::IconType::HUD;
597+ arg.colorify_background = icon->GetIconType() == AbstractLauncherIcon::IconType::HUD ||
598 icon->GetIconType() == AbstractLauncherIcon::IconType::TRASH ||
599 icon->GetIconType() == AbstractLauncherIcon::IconType::DESKTOP ||
600 icon->GetIconType() == AbstractLauncherIcon::IconType::DEVICE ||
601@@ -1113,13 +1111,6 @@ void Launcher::OnOverlayShown(GVariant* data)
602
603 bg_effect_helper_.enabled = true;
604
605- // Don't desaturate icons if the mouse is over the launcher:
606- if (!hovered_)
607- {
608- LOG_DEBUG(logger) << "Desaturate on monitor " << monitor();
609- DesaturateIcons();
610- }
611-
612 if (icon_under_mouse_)
613 icon_under_mouse_->HideTooltip();
614 }
615@@ -2769,242 +2760,22 @@ bool Launcher::DndIsSpecialRequest(std::string const& uri) const
616 }
617
618 void Launcher::ProcessDndEnter()
619-{
620-#ifdef USE_X11
621- SetStateMouseOverLauncher(true);
622-
623- dnd_data_.Reset();
624- drag_action_ = nux::DNDACTION_NONE;
625- steal_drag_ = false;
626- data_checked_ = false;
627- dnd_hovered_icon_ = nullptr;
628- drag_edge_touching_ = false;
629- dnd_hide_animation_.Stop();
630-#endif
631-}
632+{ }
633
634 void Launcher::DndReset()
635-{
636-#ifdef USE_X11
637- dnd_data_.Reset();
638-
639- bool is_overlay_open = IsOverlayOpen();
640-
641- for (auto it : *model_)
642- {
643- auto icon_type = it->GetIconType();
644- bool desaturate = false;
645-
646- if (icon_type != AbstractLauncherIcon::IconType::HOME &&
647- icon_type != AbstractLauncherIcon::IconType::HUD)
648- {
649- desaturate = is_overlay_open && !hovered_;
650- }
651-
652- it->SetQuirk(AbstractLauncherIcon::Quirk::DESAT, desaturate, monitor());
653- it->SetQuirk(AbstractLauncherIcon::Quirk::UNFOLDED, false, monitor());
654- }
655-
656- DndHoveredIconReset();
657-#endif
658-}
659+{ }
660
661 void Launcher::DndHoveredIconReset()
662-{
663-#ifdef USE_X11
664- SetActionState(ACTION_NONE);
665-
666- if (steal_drag_ && dnd_hovered_icon_)
667- {
668- dnd_hovered_icon_->SetQuirk(AbstractLauncherIcon::Quirk::VISIBLE, false, monitor());
669- dnd_hovered_icon_->remove.emit(dnd_hovered_icon_);
670- }
671-
672- if (!steal_drag_ && dnd_hovered_icon_)
673- {
674- dnd_hovered_icon_->SendDndLeave();
675- dnd_hovered_icon_->SetQuirk(AbstractLauncherIcon::Quirk::GLOW, false, monitor());
676- }
677-
678- steal_drag_ = false;
679- drag_edge_touching_ = false;
680- dnd_hovered_icon_ = nullptr;
681-#endif
682-}
683+{ }
684
685 void Launcher::ProcessDndLeave()
686-{
687-#ifdef USE_X11
688- SetStateMouseOverLauncher(false);
689- DndHoveredIconReset();
690-#endif
691-}
692+{ }
693
694 void Launcher::ProcessDndMove(int x, int y, std::list<char*> mimes)
695-{
696-#ifdef USE_X11
697- if (!data_checked_)
698- {
699- const std::string uri_list = "text/uri-list";
700- data_checked_ = true;
701- dnd_data_.Reset();
702- auto& display = nux::GetWindowThread()->GetGraphicsDisplay();
703-
704- // get the data
705- for (auto const& mime : mimes)
706- {
707- if (mime != uri_list)
708- continue;
709-
710- dnd_data_.Fill(display.GetDndData(const_cast<char*>(uri_list.c_str())));
711- break;
712- }
713-
714- // see if the launcher wants this one
715- auto const& uris = dnd_data_.Uris();
716- if (std::find_if(uris.begin(), uris.end(), [this] (std::string const& uri)
717- {return DndIsSpecialRequest(uri);}) != uris.end())
718- {
719- steal_drag_ = true;
720- }
721-
722- // only set hover once we know our first x/y
723- SetActionState(ACTION_DRAG_EXTERNAL);
724- SetStateMouseOverLauncher(true);
725- }
726-
727- SetMousePosition(x - parent_->GetGeometry().x, y - parent_->GetGeometry().y);
728-
729- if (options()->hide_mode != LAUNCHER_HIDE_NEVER)
730- {
731- if ((monitor() == 0 && !IsOverlayOpen() && mouse_position_.x == 0 && !drag_edge_touching_) &&
732- ((launcher_position_ == LauncherPosition::LEFT &&
733- mouse_position_.y <= (parent_->GetGeometry().height - icon_size_.CP(cv_) - 2 * SPACE_BETWEEN_ICONS.CP(cv_))) ||
734- (launcher_position_ == LauncherPosition::BOTTOM &&
735- mouse_position_.x <= (parent_->GetGeometry().width - icon_size_.CP(cv_) - 2 * SPACE_BETWEEN_ICONS.CP(cv_)))))
736- {
737- if (dnd_hovered_icon_)
738- {
739- dnd_hovered_icon_->SendDndLeave();
740- dnd_hovered_icon_->SetQuirk(AbstractLauncherIcon::Quirk::GLOW, false, monitor());
741- }
742-
743- animation::StartOrReverse(dnd_hide_animation_, animation::Direction::FORWARD);
744- drag_edge_touching_ = true;
745- }
746- else if (drag_edge_touching_ &&
747- ((launcher_position_ == LauncherPosition::LEFT && mouse_position_.x != 0) ||
748- (launcher_position_ == LauncherPosition::BOTTOM && mouse_position_.y != 0)))
749- {
750- animation::StartOrReverse(dnd_hide_animation_, animation::Direction::BACKWARD);
751- drag_edge_touching_ = false;
752- }
753- }
754-
755- EventLogic();
756- auto const& hovered_icon = MouseIconIntersection(mouse_position_.x, mouse_position_.y);
757-
758- bool hovered_icon_is_appropriate = false;
759- if (hovered_icon)
760- {
761- if (hovered_icon->GetIconType() == AbstractLauncherIcon::IconType::TRASH)
762- steal_drag_ = false;
763-
764- if (hovered_icon->position() == AbstractLauncherIcon::Position::FLOATING)
765- hovered_icon_is_appropriate = true;
766- }
767-
768- if (steal_drag_)
769- {
770- drag_action_ = nux::DNDACTION_COPY;
771- if (!dnd_hovered_icon_ && hovered_icon_is_appropriate)
772- {
773- dnd_hovered_icon_ = new SpacerLauncherIcon(monitor());
774- model_->AddIcon(dnd_hovered_icon_);
775- model_->ReorderBefore(dnd_hovered_icon_, hovered_icon, true);
776- }
777- else if (dnd_hovered_icon_)
778- {
779- if (hovered_icon)
780- {
781- if (hovered_icon_is_appropriate)
782- {
783- model_->ReorderSmart(dnd_hovered_icon_, hovered_icon, true);
784- }
785- else
786- {
787- dnd_hovered_icon_->SetQuirk(AbstractLauncherIcon::Quirk::VISIBLE, false, monitor());
788- dnd_hovered_icon_->remove.emit(dnd_hovered_icon_);
789- dnd_hovered_icon_ = nullptr;
790- }
791- }
792- }
793- }
794- else
795- {
796- if (!drag_edge_touching_ && hovered_icon != dnd_hovered_icon_)
797- {
798- if (hovered_icon)
799- {
800- hovered_icon->SendDndEnter();
801- drag_action_ = hovered_icon->QueryAcceptDrop(dnd_data_);
802-
803- if (drag_action_ != nux::DNDACTION_NONE)
804- hovered_icon->SetQuirk(AbstractLauncherIcon::Quirk::GLOW, true, monitor());
805- }
806- else
807- {
808- drag_action_ = nux::DNDACTION_NONE;
809- }
810-
811- if (dnd_hovered_icon_)
812- {
813- dnd_hovered_icon_->SendDndLeave();
814- dnd_hovered_icon_->SetQuirk(AbstractLauncherIcon::Quirk::GLOW, false, monitor());
815- }
816-
817- dnd_hovered_icon_ = hovered_icon;
818- }
819- }
820-
821- bool accept;
822- if (drag_action_ != nux::DNDACTION_NONE)
823- accept = true;
824- else
825- accept = false;
826-
827- SendDndStatus(accept, drag_action_, nux::Geometry(x, y, 1, 1));
828-#endif
829-}
830+{ }
831
832 void Launcher::ProcessDndDrop(int x, int y)
833-{
834-#ifdef USE_X11
835- if (steal_drag_)
836- {
837- for (auto const& uri : dnd_data_.Uris())
838- {
839- if (DndIsSpecialRequest(uri))
840- add_request.emit(uri, dnd_hovered_icon_);
841- }
842- }
843- else if (dnd_hovered_icon_ && drag_action_ != nux::DNDACTION_NONE)
844- {
845- if (IsOverlayOpen())
846- ubus_.SendMessage(UBUS_OVERLAY_CLOSE_REQUEST);
847-
848- dnd_hovered_icon_->AcceptDrop(dnd_data_);
849- }
850-
851- if (drag_action_ != nux::DNDACTION_NONE)
852- SendDndFinished(true, drag_action_);
853- else
854- SendDndFinished(false, drag_action_);
855-
856- // reset our shiz
857- DndReset();
858-#endif
859-}
860+{ }
861
862 /*
863 * Returns the current selected icon if it is in keynavmode
864@@ -3035,81 +2806,16 @@ int Launcher::GetDragDelta() const
865 }
866
867 void Launcher::DndStarted(std::string const& data)
868-{
869-#ifdef USE_X11
870- SetDndQuirk();
871-
872- dnd_data_.Fill(data.c_str());
873-
874- auto const& uris = dnd_data_.Uris();
875- if (std::find_if(uris.begin(), uris.end(), [this] (std::string const& uri)
876- {return DndIsSpecialRequest(uri);}) != uris.end())
877- {
878- steal_drag_ = true;
879-
880- if (IsOverlayOpen())
881- SaturateIcons();
882- }
883- else
884- {
885- for (auto const& it : *model_)
886- {
887- if (it->ShouldHighlightOnDrag(dnd_data_))
888- {
889- it->SetQuirk(AbstractLauncherIcon::Quirk::DESAT, false, monitor());
890- it->SetQuirk(AbstractLauncherIcon::Quirk::UNFOLDED, true, monitor());
891- }
892- else
893- {
894- it->SetQuirk(AbstractLauncherIcon::Quirk::DESAT, true, monitor());
895- it->SetQuirk(AbstractLauncherIcon::Quirk::UNFOLDED, false, monitor());
896- }
897- }
898- }
899-#endif
900-}
901+{ }
902
903 void Launcher::DndFinished()
904-{
905-#ifdef USE_X11
906- UnsetDndQuirk();
907-
908- data_checked_ = false;
909-
910- DndReset();
911-#endif
912-}
913+{ }
914
915 void Launcher::SetDndQuirk()
916-{
917-#ifdef USE_X11
918- hide_machine_.SetQuirk(LauncherHideMachine::EXTERNAL_DND_ACTIVE, true);
919-#endif
920-}
921+{ }
922
923 void Launcher::UnsetDndQuirk()
924-{
925-#ifdef USE_X11
926-
927- if (IsOverlayOpen() && !hovered_)
928- {
929- DesaturateIcons();
930- }
931- else
932- {
933- for (auto const& it : *model_)
934- {
935- it->SetQuirk(AbstractLauncherIcon::Quirk::DESAT, false, monitor());
936- it->SetQuirk(AbstractLauncherIcon::Quirk::UNFOLDED, false, monitor());
937- }
938- }
939-
940-
941- hide_machine_.SetQuirk(LauncherHideMachine::MT_DRAG_OUT, drag_out_delta_x_ >= DRAG_OUT_PIXELS - 90.0f);
942- hide_machine_.SetQuirk(LauncherHideMachine::EXTERNAL_DND_ACTIVE, false);
943- animation::SetValue(dnd_hide_animation_, animation::Direction::BACKWARD);
944-#endif
945-}
946+{ }
947
948 } // namespace launcher
949 } // namespace unity
950diff --git a/launcher/StandaloneLauncher.cpp b/launcher/StandaloneLauncher.cpp
951index 0af7d0c..7795283 100644
952--- a/launcher/StandaloneLauncher.cpp
953+++ b/launcher/StandaloneLauncher.cpp
954@@ -40,7 +40,7 @@ using namespace unity;
955
956 namespace
957 {
958-const nux::Size win_size(1024, 768);
959+const nux::Size win_size(1280, 720);
960 const nux::Color bg_color(95/255.0f, 18/255.0f, 45/255.0f, 1.0f);
961 }
962
963diff --git a/launcher/TrashLauncherIcon.cpp b/launcher/TrashLauncherIcon.cpp
964index 15dc9a6..edf5eea 100644
965--- a/launcher/TrashLauncherIcon.cpp
966+++ b/launcher/TrashLauncherIcon.cpp
967@@ -29,7 +29,7 @@
968
969 #include "QuicklistMenuItemLabel.h"
970 #include "unity-shared/DesktopApplicationManager.h"
971-#include "unity-shared/FileManager.h"
972+#include "unity-shared/GnomeFileManager.h"
973
974 namespace unity
975 {
976diff --git a/lockscreen/LockScreenPanel.cpp b/lockscreen/LockScreenPanel.cpp
977index e54e2f1..b3087a5 100644
978--- a/lockscreen/LockScreenPanel.cpp
979+++ b/lockscreen/LockScreenPanel.cpp
980@@ -37,8 +37,8 @@ namespace lockscreen
981 {
982 namespace
983 {
984-const RawPixel PADDING = 5_em;
985-const nux::Color BG_COLOR(0.1, 0.1, 0.1, 0.4);
986+const RawPixel PADDING = 14_em;
987+nux::Color BG_COLOR(0.1, 0.1, 0.1, 0.9);
988 }
989
990 using namespace indicator;
991diff --git a/panel/PanelController.cpp b/panel/PanelController.cpp
992index f24eb46..c6496b7 100644
993--- a/panel/PanelController.cpp
994+++ b/panel/PanelController.cpp
995@@ -66,7 +66,7 @@ Controller::Impl::Impl(Controller* parent, menu::Manager::Ptr const& indicators,
996 : parent_(parent)
997 , indicators_(indicators)
998 , edge_barriers_(edge_barriers)
999- , opacity_(1.0f)
1000+ , opacity_(0.7f)
1001 , opacity_maximized_toggle_(false)
1002 {
1003 UScreen* screen = UScreen::GetDefault();
1004diff --git a/panel/PanelIndicatorsView.cpp b/panel/PanelIndicatorsView.cpp
1005index 20f0638..8bf3c80 100644
1006--- a/panel/PanelIndicatorsView.cpp
1007+++ b/panel/PanelIndicatorsView.cpp
1008@@ -46,6 +46,7 @@ PanelIndicatorsView::PanelIndicatorsView()
1009 {
1010 opacity.DisableNotifications();
1011 layout_->SetContentDistribution(nux::MAJOR_POSITION_END);
1012+ layout_->SetLeftAndRightPadding(layout_->GetLeftPadding(), 6);
1013 SetLayout(layout_);
1014
1015 LOG_DEBUG(logger) << "Indicators View Added: ";
1016diff --git a/panel/PanelIndicatorsView.h b/panel/PanelIndicatorsView.h
1017index bb11df4..8e3a1ec 100644
1018--- a/panel/PanelIndicatorsView.h
1019+++ b/panel/PanelIndicatorsView.h
1020@@ -52,7 +52,7 @@ public:
1021 typedef PanelIndicatorEntryView::IndicatorEntryType IndicatorEntryType;
1022
1023 PanelIndicatorEntryView* AddEntry(indicator::Entry::Ptr const& entry,
1024- int padding = 5,
1025+ int padding = 9,
1026 IndicatorEntryPosition pos = AUTO,
1027 IndicatorEntryType type = IndicatorEntryType::INDICATOR);
1028 void RemoveEntry(indicator::Entry::Ptr const&);
1029diff --git a/panel/PanelMenuView.cpp b/panel/PanelMenuView.cpp
1030index 2bcdd49..abaa420 100644
1031--- a/panel/PanelMenuView.cpp
1032+++ b/panel/PanelMenuView.cpp
1033@@ -45,8 +45,8 @@ DECLARE_LOGGER(logger, "unity.panel.menu");
1034
1035 namespace
1036 {
1037- const RawPixel MAIN_LEFT_PADDING = 4_em;
1038- const RawPixel TITLE_PADDING = 2_em;
1039+ const RawPixel MAIN_LEFT_PADDING = 13_em;
1040+ const RawPixel TITLE_PADDING = 1_em;
1041 const RawPixel MENUBAR_PADDING = 4_em;
1042 const int MENU_ENTRIES_PADDING = 6;
1043
1044diff --git a/panel/PanelTray.cpp b/panel/PanelTray.cpp
1045index 20be87f..afdf7d4 100644
1046--- a/panel/PanelTray.cpp
1047+++ b/panel/PanelTray.cpp
1048@@ -29,7 +29,7 @@ DECLARE_LOGGER(logger, "unity.panel.tray");
1049 namespace
1050 {
1051 const std::string SETTINGS_NAME = "com.canonical.Unity.Panel";
1052-const int PADDING = 3;
1053+const int PADDING = 12;
1054 const std::array<std::string, 2> WHITELIST {{ "JavaEmbeddedFrame", "Wine" }};
1055 }
1056
1057@@ -63,7 +63,7 @@ PanelTray::PanelTray(int monitor)
1058 GTK_ORIENTATION_HORIZONTAL,
1059 (NaTrayFilterCallback)FilterTrayCallback,
1060 this);
1061- na_tray_set_icon_size(tray_, panel_height);
1062+ na_tray_set_icon_size(tray_, panel_height-6);
1063
1064 icon_removed_signal_.Connect(na_tray_get_manager(tray_), "tray_icon_removed",
1065 sigc::mem_fun(this, &PanelTray::OnTrayIconRemoved));
1066@@ -97,7 +97,7 @@ Window PanelTray::xid()
1067
1068 void PanelTray::Draw(nux::GraphicsEngine& gfx_context, bool force_draw)
1069 {
1070- nux::Geometry const& geo = GetAbsoluteGeometry();
1071+ nux::Geometry geo = GetAbsoluteGeometry();
1072
1073 gfx_context.PushClippingRectangle(geo);
1074 nux::GetPainter().PaintBackground(gfx_context, geo);
1075diff --git a/panel/PanelView.cpp b/panel/PanelView.cpp
1076index fd492b6..1a54ab1 100644
1077--- a/panel/PanelView.cpp
1078+++ b/panel/PanelView.cpp
1079@@ -58,7 +58,7 @@ PanelView::PanelView(MockableBaseWindow* parent, menu::Manager::Ptr const& menus
1080 , opacity_maximized_toggle_(false)
1081 , needs_geo_sync_(false)
1082 , overlay_is_open_(false)
1083- , opacity_(1.0f)
1084+ , opacity_(0.7f)
1085 , monitor_(0)
1086 , stored_dash_width_(0)
1087 , bg_effect_helper_(this)
1088@@ -539,7 +539,7 @@ PanelView::UpdateBackground()
1089
1090 if (overlay_is_open_ || wm.IsScaleActive())
1091 {
1092- bg_layer_.reset(new nux::ColorLayer(wm.average_color(), true, rop));
1093+ // bg_layer_.reset(new nux::ColorLayer(wm.average_color(), true, rop));
1094 }
1095 else
1096 {
1097diff --git a/panel/StandalonePanel.cpp b/panel/StandalonePanel.cpp
1098index e134602..76b4c0e 100644
1099--- a/panel/StandalonePanel.cpp
1100+++ b/panel/StandalonePanel.cpp
1101@@ -41,7 +41,7 @@ using namespace unity::panel;
1102 struct PanelWindow
1103 {
1104 PanelWindow()
1105- : wt(nux::CreateGUIThread("Unity Panel", 1024, 24, 0, &PanelWindow::ThreadWidgetInit, this))
1106+ : wt(nux::CreateGUIThread("Unity Panel", 1024, 30, 0, &PanelWindow::ThreadWidgetInit, this))
1107 , animation_controller(tick_source)
1108 {}
1109
1110diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp
1111index ff739f6..38f433a 100644
1112--- a/plugins/unityshell/src/unityshell.cpp
1113+++ b/plugins/unityshell/src/unityshell.cpp
1114@@ -3157,73 +3157,9 @@ bool UnityWindow::glDraw(const GLMatrix& matrix,
1115
1116 auto draw_panel_shadow = DrawPanelShadow::NO;
1117
1118- if (!(mask & PAINT_WINDOW_ON_TRANSFORMED_SCREEN_MASK))
1119- {
1120- Window active_window = screen->activeWindow();
1121-
1122- if (G_UNLIKELY(window_type == CompWindowTypeDesktopMask))
1123- {
1124- uScreen->setPanelShadowMatrix(matrix);
1125-
1126- if (active_window == 0 || active_window == window->id())
1127- {
1128- if (PluginAdapter::Default().IsWindowOnTop(window->id()))
1129- {
1130- draw_panel_shadow = DrawPanelShadow::OVER_WINDOW;
1131- }
1132- uScreen->is_desktop_active_ = true;
1133- }
1134- }
1135- else
1136- {
1137- if (window->id() == active_window)
1138- {
1139- draw_panel_shadow = DrawPanelShadow::BELOW_WINDOW;
1140- uScreen->is_desktop_active_ = false;
1141-
1142- if (!(window_state & CompWindowStateMaximizedVertMask) &&
1143- !(window_state & CompWindowStateFullscreenMask) &&
1144- !(window_type & CompWindowTypeFullscreenMask))
1145- {
1146- auto const& output = uScreen->screen->currentOutputDev();
1147- int monitor = uScreen->WM.MonitorGeometryIn(NuxGeometryFromCompRect(output));
1148-
1149- if (window->y() - window->border().top < output.y() + uScreen->panel_style_.PanelHeight(monitor))
1150- {
1151- draw_panel_shadow = DrawPanelShadow::OVER_WINDOW;
1152- }
1153- }
1154- }
1155- else if (uScreen->menus_->integrated_menus())
1156- {
1157- draw_panel_shadow = DrawPanelShadow::BELOW_WINDOW;
1158- }
1159- else
1160- {
1161- if (uScreen->is_desktop_active_)
1162- {
1163- if (PluginAdapter::Default().IsWindowOnTop(window->id()))
1164- {
1165- draw_panel_shadow = DrawPanelShadow::OVER_WINDOW;
1166- uScreen->panelShadowPainted = CompRegion();
1167- }
1168- }
1169- }
1170- }
1171- }
1172-
1173- if (locked)
1174- draw_panel_shadow = DrawPanelShadow::NO;
1175-
1176- if (draw_panel_shadow == DrawPanelShadow::BELOW_WINDOW)
1177- uScreen->paintPanelShadow(region);
1178-
1179 deco_win_->Draw(matrix, attrib, region, mask);
1180 bool ret = gWindow->glDraw(matrix, attrib, region, mask);
1181
1182- if (draw_panel_shadow == DrawPanelShadow::OVER_WINDOW)
1183- uScreen->paintPanelShadow(region);
1184-
1185 return ret;
1186 }
1187
1188diff --git a/plugins/unityshell/unityshell.xml.in b/plugins/unityshell/unityshell.xml.in
1189index 9294c5b..61afdea 100644
1190--- a/plugins/unityshell/unityshell.xml.in
1191+++ b/plugins/unityshell/unityshell.xml.in
1192@@ -104,8 +104,8 @@
1193 <option name="panel_opacity" type="float">
1194 <_short>Panel Opacity</_short>
1195 <_long>The opacity of the Panel background.</_long>
1196- <default>1.0</default>
1197- <min>0.0</min>
1198+ <default>0.75</default>
1199+ <min>0.1</min>
1200 <max>1.0</max>
1201 <precision>0.01</precision>
1202 </option>
1203@@ -419,7 +419,7 @@
1204 <option name="icon_size" type="int">
1205 <_short>Launcher Icon Size</_short>
1206 <_long>The size of the icons in the Launcher.</_long>
1207- <default>48</default>
1208+ <default>44</default>
1209 <min>8</min>
1210 <max>64</max>
1211 <precision>1</precision>
1212@@ -430,7 +430,7 @@
1213 <_long>Change how the icons in the Launcher are backlit.</_long>
1214 <min>0</min>
1215 <max>4</max>
1216- <default>1</default>
1217+ <default>4</default>
1218 <desc>
1219 <value>0</value>
1220 <_name>Backlight Always On</_name>
1221diff --git a/resources/dash_sheen.png b/resources/dash_sheen.png
1222index fb31cdb..7cceadb 100644
1223Binary files a/resources/dash_sheen.png and b/resources/dash_sheen.png differ
1224diff --git a/resources/empty.png b/resources/empty.png
1225new file mode 100644
1226index 0000000..7cceadb
1227Binary files /dev/null and b/resources/empty.png differ
1228diff --git a/resources/launcher_bfb.svg b/resources/launcher_bfb.svg
1229index 74e60e9..b6f1ccb 100644
1230--- a/resources/launcher_bfb.svg
1231+++ b/resources/launcher_bfb.svg
1232@@ -1,13 +1,126 @@
1233-<svg version="1.1" viewBox="0 0 136.53 136.53" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
1234- <defs>
1235- <filter id="a" x="-.075" y="-.075" width="1.15" height="1.15" color-interpolation-filters="sRGB">
1236- <feGaussianBlur stdDeviation="2.4999998"/>
1237- </filter>
1238- </defs>
1239- <image width="136.53" height="136.53" preserveAspectRatio="none" xlink:href="data:image/png;base64,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 4K+6lV/77/8DTX3gKAGJXUUAAAAASUVORK5CYII= "/>
1240- <g>
1241- <ellipse cx="68.267" cy="68.267" rx="40" ry="40" fill="#9005d5"/>
1242- <path d="m68.244 28.267a40 40 0 0 0-39.978 40 40 40 0 0 0 40 40 40 40 0 0 0 40-40 40 40 0 0 0-40-40 40 40 0 0 0-0.0223 0zm0.43912 12.8a27.2 27.2 0 0 1 5.2476 0.51106l-3.8886 6.7353a20 20 0 0 0-1.359-0.04632 20 20 0 0 0-1.3588 0.04608l-3.4e-4 -5.52e-4a20 20 0 0 0-8.6411 2.6333 20 20 0 0 0-2e-3 8e-4 20 20 0 0 0-6.5993 6.1657l4.9e-4 5.44e-4a20 20 0 0 0-1.359 2.3538l-7.7772 9.6e-5a27.2 27.2 0 0 1 5.2474-9.0889l-5.5e-4 -5.52e-4a27.2 27.2 0 0 1 5.4498-4.7744l1.9133 3.314 2.933-1.6933-1.9133-3.3139a27.2 27.2 0 0 1 6.8594-2.332l4.4e-4 5.44e-4a27.2 27.2 0 0 1 5.2474-0.51097zm8.6027 1.4841 5.7186 9.6e-5c0.38588 7.2e-5 0.73999 0.20394 0.93828 0.5309l2.8616 4.7698c0.0837 0.12732 0.17604 0.33828 0.16272 0.60168-8e-3 0.15803-0.0538 0.33549-0.16272 0.52421l-2.8616 4.7756c-0.19839 0.32682-0.55229 0.53025-0.9382 0.53024l-5.7186-8e-5c-0.19298 1.28e-4 -0.37827-0.04912-0.53974-0.14023-0.16143-0.09116-0.29882-0.22444-0.39836-0.39034l-2.862-4.7755c-0.20902-0.34837-0.20905-0.77678 0-1.1251l2.862-4.7706c0.0992-0.16344 0.23645-0.29694 0.39854-0.38769 0.16151-0.09178 0.34654-0.14284 0.53949-0.14288zm-11.115 3.7637c0.0455 0.08294 0.0932 0.16574 0.14346 0.24846zm23.002 4.0632v1.76e-4a27.2 27.2 0 0 1 5.2475 9.0889h-5e-3a27.2 27.2 0 0 1 1.41 7.1068h-3.8789v3.3867h3.8793a27.2 27.2 0 0 1-1.4101 7.1067h4e-3a27.2 27.2 0 0 1-5.2475 9.089l-3.8886-6.7352a20 20 0 0 0 1.359-2.3536h-4e-3a20 20 0 0 0 2.0401-8.8 20 20 0 0 0-5.6e-4 -0.0024 20 20 0 0 0-2.0399-8.7985l5e-3 8e-5a20 20 0 0 0-1.3584-2.3536zm-46.255 11.84 5.5666 0.09045c0.38224 0.0084 0.73533 0.21324 0.92828 0.54744l2.8592 4.9525c0.0966 0.16707 0.14668 0.3521 0.1485 0.53751l-9e-5 -8e-5c2e-3 0.18537-0.045 0.37099-0.1389 0.54017l-2.7046 4.8664c-0.19718 0.35519-0.5682 0.56943-0.9744 0.56257l-5.5624-0.09335c-0.19113-4e-3 -0.3754-0.05632-0.53504-0.1513-0.16024-0.09399-0.29698-0.22863-0.39349-0.39572l-2.8592-4.9525c-0.19287-0.33421-0.19334-0.7428-9e-3 -1.078l2.6999-4.8631c0.0684-0.13618 0.20503-0.3216 0.43979-0.44177 0.14087-0.07208 0.31738-0.12122 0.53528-0.12122zm0.0284 14.849h7.7773a20 20 0 0 0 1.3589 2.3536l-6e-3 0.0097a20 20 0 0 0 15.242 8.8l-3.883 6.7258 3.8886-6.7352a20 20 0 0 0 1.3588 0.04608 20 20 0 0 0 1.3591-0.04664l3.8885 6.7354a27.2 27.2 0 0 1-5.2475 0.51106 27.2 27.2 0 0 1-5.2476-0.51106l-6e-3 9e-3a27.2 27.2 0 0 1-6.8595-2.332l1.9133-3.314-2.933-1.6934-1.9134 3.314a27.2 27.2 0 0 1-5.4496-4.7746l6e-3 -0.0094a27.2 27.2 0 0 1-5.2475-9.089zm40.045 5.0986c0.40294-0.0064 0.77107 0.20574 0.96664 0.55811l2.6786 4.8249c0.0913 0.16622 0.13786 0.35033 0.13544 0.53461-8e-4 0.18428-0.0492 0.36861-0.14487 0.53439l-2.8364 4.9126c-0.19146 0.33149-0.5422 0.5345-0.92142 0.54266l-5.5169 0.0926c-0.1509 9e-3 -0.37795-0.0166-0.59762-0.15867-0.13179-0.0853-0.26151-0.2125-0.36958-0.39967l-2.6833-4.827c-0.18236-0.33255-0.18149-0.7375 0.01-1.069l2.8364-4.9127c0.0956-0.16586 0.22973-0.30062 0.38811-0.39414 0.15837-0.09346 0.34107-0.14544 0.53297-0.14866z" filter="url(#a)" opacity=".5" style="mix-blend-mode:normal;paint-order:stroke markers fill"/>
1243- <path d="m68.244 28.267a40 40 0 0 0-39.978 40 40 40 0 0 0 40 40 40 40 0 0 0 40-40 40 40 0 0 0-40-40 40 40 0 0 0-0.0223 0zm0.43913 12.8a27.2 27.2 0 0 1 5.2476 0.51106l-3.8886 6.7353a20 20 0 0 0-1.359-0.04632 20 20 0 0 0-1.3588 0.04608l-3.4e-4 -5.52e-4a20 20 0 0 0-8.6411 2.6333 20 20 0 0 0-2e-3 8e-4 20 20 0 0 0-6.5993 6.1657l4.9e-4 5.44e-4a20 20 0 0 0-1.359 2.3538l-7.7773 9.6e-5a27.2 27.2 0 0 1 5.2474-9.0889l-5.5e-4 -5.52e-4a27.2 27.2 0 0 1 5.4498-4.7744l1.9133 3.314 2.933-1.6933-1.9133-3.3139a27.2 27.2 0 0 1 6.8594-2.332l4.3e-4 5.44e-4a27.2 27.2 0 0 1 5.2474-0.51097zm8.6027 1.4841 5.7186 9.6e-5c0.38587 7.2e-5 0.73998 0.20394 0.93827 0.5309l2.8616 4.7698c0.0837 0.12732 0.17603 0.33828 0.16272 0.60168-8e-3 0.15803-0.0538 0.33549-0.16272 0.52421l-2.8616 4.7756c-0.19839 0.32682-0.55229 0.53025-0.9382 0.53024l-5.7186-8e-5c-0.19299 1.28e-4 -0.37827-0.04912-0.53975-0.14023-0.16143-0.09116-0.29881-0.22444-0.39836-0.39034l-2.862-4.7755c-0.20903-0.34837-0.20906-0.77678 0-1.1251l2.862-4.7706c0.0992-0.16344 0.23644-0.29694 0.39853-0.38769 0.16151-0.09178 0.34655-0.14284 0.5395-0.14288zm-11.115 3.7637c0.0455 0.08294 0.0932 0.16574 0.14346 0.24846zm23.002 4.0632v1.76e-4a27.2 27.2 0 0 1 5.2475 9.0889h-5e-3a27.2 27.2 0 0 1 1.41 7.1068h-3.8789v3.3867h3.8793a27.2 27.2 0 0 1-1.4102 7.1067h4e-3a27.2 27.2 0 0 1-5.2475 9.089l-3.8886-6.7352a20 20 0 0 0 1.359-2.3536h-4e-3a20 20 0 0 0 2.0401-8.8 20 20 0 0 0-5.5e-4 -0.0024 20 20 0 0 0-2.0399-8.7985l5e-3 8e-5a20 20 0 0 0-1.3584-2.3536zm-46.255 11.84 5.5666 0.09045c0.38223 0.0084 0.73532 0.21324 0.92828 0.54744l2.8592 4.9525c0.0966 0.16707 0.14668 0.3521 0.1485 0.53751l-9e-5 -8e-5c2e-3 0.18537-0.045 0.37099-0.1389 0.54017l-2.7046 4.8664c-0.19719 0.35519-0.5682 0.56943-0.97441 0.56257l-5.5624-0.09335c-0.19113-4e-3 -0.3754-0.05632-0.53504-0.1513-0.16024-0.09399-0.29697-0.22863-0.39349-0.39572l-2.8592-4.9525c-0.19287-0.33421-0.19333-0.7428-9e-3 -1.078l2.6999-4.8631c0.0684-0.13618 0.20502-0.3216 0.43978-0.44177 0.14087-0.07208 0.31738-0.12122 0.53529-0.12122zm0.0284 14.849h7.7773a20 20 0 0 0 1.3589 2.3536l-6e-3 0.0097a20 20 0 0 0 15.242 8.8l-3.883 6.7258 3.8886-6.7352a20 20 0 0 0 1.3588 0.0461 20 20 0 0 0 1.3591-0.0466l3.8885 6.7354a27.2 27.2 0 0 1-5.2475 0.51106 27.2 27.2 0 0 1-5.2476-0.51106l-6e-3 9e-3a27.2 27.2 0 0 1-6.8595-2.332l1.9133-3.314-2.933-1.6934-1.9134 3.3141a27.2 27.2 0 0 1-5.4496-4.7746l6e-3 -9e-3a27.2 27.2 0 0 1-5.2475-9.0889zm40.045 5.0986c0.40295-0.0064 0.77107 0.20574 0.96664 0.55811l2.6786 4.8249c0.0913 0.16621 0.13786 0.35032 0.13544 0.5346-8e-4 0.18428-0.0492 0.36861-0.14486 0.5344l-2.8364 4.9126c-0.19146 0.3315-0.54219 0.53451-0.92142 0.54267l-5.5169 0.0926c-0.15091 9e-3 -0.37795-0.0166-0.59763-0.15868-0.13179-0.0853-0.26151-0.21249-0.36958-0.39967l-2.6833-4.827c-0.18236-0.33255-0.18148-0.73749 0.01-1.069l2.8364-4.9127c0.0956-0.16586 0.22974-0.30062 0.38811-0.39414 0.15838-0.09346 0.34107-0.14544 0.53297-0.14866z" fill="#fff" style="paint-order:stroke markers fill"/>
1244- </g>
1245+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
1246+<svg
1247+ version="1.1"
1248+ id="svg2"
1249+ width="136.53333"
1250+ height="136.53333"
1251+ viewBox="0 0 136.53333 136.53333"
1252+ sodipodi:docname="launcher_bfb.svg"
1253+ inkscape:export-filename="/home/muqtadir/Desktop/unity-orb1.png"
1254+ inkscape:export-xdpi="90"
1255+ inkscape:export-ydpi="90"
1256+ inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
1257+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
1258+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
1259+ xmlns:xlink="http://www.w3.org/1999/xlink"
1260+ xmlns="http://www.w3.org/2000/svg"
1261+ xmlns:svg="http://www.w3.org/2000/svg"
1262+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1263+ xmlns:cc="http://creativecommons.org/ns#"
1264+ xmlns:dc="http://purl.org/dc/elements/1.1/">
1265+ <metadata
1266+ id="metadata8">
1267+ <rdf:RDF>
1268+ <cc:Work
1269+ rdf:about="">
1270+ <dc:format>image/svg+xml</dc:format>
1271+ <dc:type
1272+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
1273+ <dc:title />
1274+ </cc:Work>
1275+ </rdf:RDF>
1276+ </metadata>
1277+ <defs
1278+ id="defs6">
1279+ <linearGradient
1280+ inkscape:collect="always"
1281+ xlink:href="#linearGradient927"
1282+ id="linearGradient1686-0"
1283+ x1="321.99991"
1284+ y1="84.000153"
1285+ x2="365.99991"
1286+ y2="84.000153"
1287+ gradientUnits="userSpaceOnUse"
1288+ gradientTransform="matrix(0,2.9046321,-2.9677501,0,317.55806,-932.37102)" />
1289+ <linearGradient
1290+ inkscape:collect="always"
1291+ id="linearGradient927">
1292+ <stop
1293+ style="stop-color:#f3e6fa;stop-opacity:1"
1294+ offset="0"
1295+ id="stop923" />
1296+ <stop
1297+ id="stop933"
1298+ offset="0.125"
1299+ style="stop-color:#f3e6fa;stop-opacity:0.09803922" />
1300+ <stop
1301+ id="stop931"
1302+ offset="0.92500001"
1303+ style="stop-color:#f3e6fa;stop-opacity:0.09803922" />
1304+ <stop
1305+ style="stop-color:#f3e6fa;stop-opacity:0.49803922"
1306+ offset="1"
1307+ id="stop925" />
1308+ </linearGradient>
1309+ </defs>
1310+ <sodipodi:namedview
1311+ pagecolor="#3d3d3d"
1312+ bordercolor="#666666"
1313+ borderopacity="1"
1314+ objecttolerance="10"
1315+ gridtolerance="10"
1316+ guidetolerance="10"
1317+ inkscape:pageopacity="0"
1318+ inkscape:pageshadow="2"
1319+ inkscape:window-width="1920"
1320+ inkscape:window-height="965"
1321+ id="namedview4"
1322+ showgrid="false"
1323+ units="px"
1324+ inkscape:zoom="2.5"
1325+ inkscape:cx="80.2"
1326+ inkscape:cy="76.6"
1327+ inkscape:window-x="0"
1328+ inkscape:window-y="36"
1329+ inkscape:window-maximized="1"
1330+ inkscape:current-layer="svg2"
1331+ inkscape:document-rotation="0"
1332+ inkscape:pagecheckerboard="0" />
1333+ <path
1334+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5.87204361;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
1335+ d="m 37.573433,2.9202406 c -7.781739,0 -13.909103,0.1455247 -18.950896,0.8328467 C 13.580716,4.4404388 9.4550382,5.7297171 6.4329484,8.1783524 3.4108883,10.626984 1.8158115,13.976199 0.97739229,18.072688 0.13894348,22.169208 -0.02472795,27.156491 0.01340764,33.491722 v 36.234721 36.252077 c -0.03769042,6.32548 0.12642616,11.31024 0.96398465,15.40234 0.83841921,4.09652 2.43349601,7.44572 5.45555611,9.89435 3.0220898,2.44864 7.1477676,3.73791 12.1895886,4.42524 5.041852,0.68739 11.169157,0.83288 18.950896,0.83288 h 61.391416 c 7.781821,0 13.905931,-0.14514 18.937331,-0.83288 5.03135,-0.68762 9.14441,-1.98125 12.15534,-4.4308 3.01099,-2.44948 4.5966,-5.79631 5.44188,-9.88879 0.8453,-4.09242 1.02547,-9.06961 1.02547,-15.40234 V 69.726443 33.475042 c 0,-6.332726 -0.18044,-11.309873 -1.02547,-15.402354 -0.84528,-4.092451 -2.43092,-7.439254 -5.44191,-9.8887903 C 127.04657,5.7343641 122.9335,4.4407284 117.90212,3.7530873 112.87078,3.0654433 106.74662,2.9202406 98.964849,2.9202406 Z"
1336+ id="path1020"
1337+ inkscape:connector-curvature="0"
1338+ sodipodi:nodetypes="sccsccccccsscccscsccsss" />
1339+ <path
1340+ style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.93602157;marker:none;enable-background:accumulate;opacity:0.05"
1341+ d="m 36.616066,1.46807 c -29.710622,0 -35.2766675,2.6326143 -35.1205639,28.315452 v 37.038633 37.039335 c -0.1564004,25.68283 5.4099419,28.31544 35.1205639,28.31544 h 63.304487 c 29.703207,0 35.120497,-2.63232 35.120497,-28.31544 V 66.822155 29.783522 c 0,-25.6831304 -5.41729,-28.315452 -35.120527,-28.315452 z"
1342+ id="path964"
1343+ inkscape:connector-curvature="0"
1344+ sodipodi:nodetypes="scccssscsss" />
1345+ <path
1346+ style="display:inline;opacity:0.2;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:5.87204313;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;enable-background:new"
1347+ d="M 122.82763,7.1410191 4.1773923,118.58086 v 0 c 0,0 2.7330968,13.59552 32.4363287,13.59552 h 63.30235 c 29.710619,0 35.276429,-2.63162 35.120329,-28.31451 V 66.822155 29.78238 C 133.55543,5.2605566 129.804,6.4966209 122.82763,7.1410191 Z"
1348+ id="path962"
1349+ inkscape:connector-curvature="0"
1350+ sodipodi:nodetypes="ccssscccc" />
1351+ <path
1352+ style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.4;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:2.93602157;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker:none;enable-background:accumulate"
1353+ d="m 36.616066,1.4680407 c -29.710622,0 -35.2766675,2.6326143 -35.1205639,28.3154523 v 37.038662 37.039335 c -0.1564004,25.68283 5.4099419,28.31544 35.1205639,28.31544 h 63.304487 c 29.703207,0 35.120497,-2.63232 35.120497,-28.31544 V 66.822155 29.783493 c 0,-25.6831306 -5.41729,-28.3154523 -35.120527,-28.3154523 z"
1354+ id="path958"
1355+ inkscape:connector-curvature="0"
1356+ sodipodi:nodetypes="scccssscsss" />
1357+ <path
1358+ style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.6;fill:url(#linearGradient1686-0);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.93602157;marker:none;enable-background:accumulate"
1359+ d="m 36.618351,2.9202406 c -14.810527,0 -23.357707,0.8024923 -27.8516528,4.2207785 C 6.5197254,8.8501622 5.0937808,11.21773 4.1817615,14.867805 3.2697718,18.517883 2.9433191,23.40751 2.9819001,29.776733 v 37.045422 37.045395 c -0.038878,6.36922 0.2878717,11.25888 1.1998614,14.90894 0.9120193,3.65006 2.3379639,6.0176 4.5849367,7.72679 4.4939748,3.41826 13.0411258,4.2208 27.8516528,4.2208 h 63.302351 c 14.806778,0 23.311728,-0.80368 27.787868,-4.2208 2.23804,-1.70861 3.65904,-4.07987 4.57915,-7.73244 0.9201,-3.65257 1.2694,-8.53814 1.2694,-14.90897 V 66.822155 29.78238 c 0,-6.370773 -0.3493,-11.256335 -1.2694,-14.90891 -0.92011,-3.652576 -2.34108,-6.0238287 -4.57915,-7.7324509 C 123.23243,3.7238069 114.72752,2.9202406 99.920702,2.9202406 Z m 7.129545,3.1882707 c 20.618059,0.00241 41.283276,0.00878 61.876434,0.1588686 6.35977,0.2408047 13.24896,-0.4290153 19.06432,2.70607 3.84648,2.0193891 4.59592,6.5363811 5.25152,10.3534451 0.52087,6.398586 0.27156,12.903067 0.41154,19.37366 0.0674,24.629916 0.22852,49.288685 -0.23771,73.914945 -0.47932,4.30826 -1.13175,9.6021 -5.33845,12.03266 -4.76473,2.4071 -10.31445,2.63285 -15.5749,2.76847 -28.192857,0.19695 -56.459373,0.24494 -84.650447,-0.0512 -4.683585,-0.3315 -9.706116,-0.69753 -13.749023,-3.25637 C 7.1522717,121.21787 6.7626061,116.18701 6.3379507,111.92893 5.9604529,85.791447 6.0898469,59.632601 6.1815503,33.481246 6.477435,26.564529 5.4533237,19.248544 8.2740517,12.68364 10.267341,8.2984563 15.591723,7.2811389 19.965355,6.709856 27.864557,5.790309 35.818602,6.282816 43.747926,6.1085113 Z"
1360+ id="path964-3"
1361+ inkscape:connector-curvature="0" />
1362+ <path
1363+ id="path12"
1364+ style="fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.0633053;stroke-linejoin:round;paint-order:stroke markers fill"
1365+ d="M 68.386946,28.008705 A 46.000001,45.999994 0 0 0 22.412573,74.008748 46.000001,45.999994 0 0 0 68.412617,120.0087 46.000001,45.999994 0 0 0 114.41258,74.008748 46.000001,45.999994 0 0 0 68.412617,28.008705 a 46.000001,45.999994 0 0 0 -0.02568,0 z m 0.504997,14.719959 a 31.280001,31.279996 0 0 1 6.034734,0.587714 l -4.471922,7.745593 a 22.999998,22.999995 0 0 0 -1.562812,-0.05322 22.999998,22.999995 0 0 0 -1.562626,0.05296 l -3.9e-4,-6.39e-4 a 22.999996,22.999993 0 0 0 -9.93729,3.028352 22.999996,22.999993 0 0 0 -0.0019,0.0013 22.999996,22.999993 0 0 0 -7.589182,7.090553 l 5.69e-4,6.39e-4 a 22.999998,22.999995 0 0 0 -1.562812,2.70687 l -8.94385,1.02e-4 a 31.280001,31.279996 0 0 1 6.034544,-10.452199 l -6.39e-4,-6.39e-4 a 31.279999,31.279994 0 0 1 6.267219,-5.490949 l 2.200263,3.811087 3.372937,-1.947333 -2.200263,-3.810991 a 31.279999,31.279994 0 0 1 7.888316,-2.681863 l 4.92e-4,6.39e-4 a 31.280001,31.279996 0 0 1 6.034542,-0.587624 z m 9.893081,1.70667 6.576339,1.02e-4 c 0.443759,9.6e-5 0.85098,0.234549 1.079019,0.610535 l 3.290878,5.485244 c 0.09631,0.146414 0.202439,0.389025 0.187131,0.691929 -0.0092,0.181745 -0.06185,0.385818 -0.187131,0.602836 l -3.290878,5.491901 c -0.228147,0.375839 -0.635132,0.609781 -1.07893,0.609774 l -6.576428,-9.5e-5 c -0.221931,1.47e-4 -0.435013,-0.05648 -0.620713,-0.161262 v 0 c -0.185648,-0.104836 -0.343634,-0.258105 -0.458116,-0.448896 l -3.291262,-5.491805 c -0.240375,-0.400615 -0.240407,-0.893301 0,-1.29391 l 3.291351,-5.486195 c 0.114023,-0.187967 0.271913,-0.341486 0.458315,-0.445848 0.185738,-0.105545 0.398526,-0.164265 0.620425,-0.16431 z m -12.782417,4.328254 c 0.05232,0.09538 0.10718,0.190606 0.164967,0.28573 z m 26.452543,4.672647 v 1.98e-4 a 31.280001,31.279996 0 0 1 6.034644,10.452272 h -0.0051 a 31.279997,31.279992 0 0 1 1.621486,8.172806 h -4.460725 v 3.894666 h 4.461185 a 31.279997,31.279992 0 0 1 -1.621669,8.172716 h 0.0045 a 31.280001,31.279996 0 0 1 -6.034666,10.452354 l -4.471928,-7.745485 a 22.999998,22.999995 0 0 0 1.562812,-2.706582 h -0.0045 a 22.999995,22.999991 0 0 0 2.346115,-10.119953 22.999995,22.999991 0 0 0 -6.38e-4,-0.0026 22.999995,22.999991 0 0 0 -2.345917,-10.118247 l 0.0051,1.02e-4 a 22.999998,22.999995 0 0 0 -1.562167,-2.706684 z m -53.193199,13.616503 6.401571,0.104017 c 0.439568,0.0096 0.845627,0.245225 1.067519,0.629555 l 3.288118,5.69538 c 0.11109,0.192133 0.16868,0.404928 0.170775,0.618144 l -1e-4,-9.6e-5 c 0.0019,0.213185 -0.05175,0.42665 -0.159741,0.621192 l -3.110315,5.596397 c -0.226761,0.408474 -0.653437,0.654848 -1.120573,0.646958 l -6.396818,-0.107352 c -0.219797,-0.0045 -0.43171,-0.06476 -0.615294,-0.174008 -0.184275,-0.108081 -0.341525,-0.262928 -0.452506,-0.455074 L 35.046462,74.53247 c -0.221803,-0.384342 -0.222333,-0.854226 -0.01073,-1.239712 l 3.104891,-5.59259 c 0.07864,-0.15661 0.235782,-0.36984 0.505757,-0.508038 0.161997,-0.0829 0.364985,-0.139399 0.615576,-0.139392 z m 0.03265,17.075772 h 8.94385 a 22.999998,22.999995 0 0 0 1.562716,2.706677 l -0.0065,0.01112 a 22.999998,22.999995 0 0 0 17.528377,10.119981 l -4.465457,7.734642 4.471922,-7.745439 a 22.999998,22.999995 0 0 0 1.56262,0.05303 22.999998,22.999995 0 0 0 1.563004,-0.05367 l 4.471736,7.745699 a 31.280001,31.279996 0 0 1 -6.034644,0.58771 31.280001,31.279996 0 0 1 -6.034733,-0.58771 l -0.0064,0.0109 a 31.279999,31.279994 0 0 1 -7.888357,-2.68187 l 2.200352,-3.811096 -3.372937,-1.947399 -2.200353,3.811165 a 31.279999,31.279994 0 0 1 -6.267033,-5.490739 l 0.0065,-0.01086 a 31.280001,31.279996 0 0 1 -6.034638,-10.45228 z m 46.05177,5.863389 c 0.463386,-0.0078 0.886733,0.236599 1.111641,0.641821 l 3.080454,5.548583 c 0.104918,0.191155 0.15854,0.402883 0.155748,0.614804 -0.0013,0.21192 -0.05654,0.423903 -0.16659,0.614547 l -3.261873,5.649506 c -0.22018,0.38122 -0.623523,0.61467 -1.059629,0.62406 l -6.344429,0.10651 c -0.173541,0.0102 -0.434642,-0.0192 -0.687271,-0.18247 -0.151558,-0.0981 -0.300738,-0.24438 -0.425023,-0.45962 l -3.085788,-5.551047 c -0.209715,-0.382439 -0.208706,-0.848127 0.01144,-1.229351 l 3.26188,-5.649566 c 0.109953,-0.190734 0.264194,-0.345709 0.446328,-0.453266 v 0 c 0.182135,-0.107487 0.39224,-0.167248 0.612918,-0.17096 z" />
1366+ <path
1367+ id="path12-3"
1368+ style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.0633053;stroke-linejoin:round;paint-order:stroke markers fill"
1369+ d="M 68.38737,22.009002 A 46.000001,45.999994 0 0 0 22.413,68.009045 46.000001,45.999994 0 0 0 68.41304,114.009 46.000001,45.999994 0 0 0 114.413,68.009045 46.000001,45.999994 0 0 0 68.41304,22.009002 a 46.000001,45.999994 0 0 0 -0.0257,0 z m 0.505,14.719959 a 31.280001,31.279996 0 0 1 6.03473,0.587714 l -4.47192,7.745593 a 22.999998,22.999995 0 0 0 -1.56281,-0.05322 22.999998,22.999995 0 0 0 -1.56263,0.05296 l -3.9e-4,-6.39e-4 a 22.999996,22.999993 0 0 0 -9.93729,3.028352 22.999996,22.999993 0 0 0 -0.002,0.0013 22.999996,22.999993 0 0 0 -7.58918,7.090553 l 5.7e-4,6.39e-4 a 22.999998,22.999995 0 0 0 -1.56281,2.70687 l -8.94385,1.02e-4 a 31.280001,31.279996 0 0 1 6.03454,-10.452199 l -6.4e-4,-6.39e-4 a 31.279999,31.279994 0 0 1 6.26722,-5.490949 l 2.20026,3.811087 3.37294,-1.947333 -2.20026,-3.810991 a 31.279999,31.279994 0 0 1 7.88831,-2.681863 l 5e-4,6.39e-4 a 31.280001,31.279996 0 0 1 6.03454,-0.587624 z m 9.89308,1.70667 6.57634,1.02e-4 c 0.44376,9.6e-5 0.85098,0.234549 1.07902,0.610535 l 3.29087,5.485244 c 0.0963,0.146414 0.20244,0.389025 0.18714,0.691929 -0.009,0.181745 -0.0618,0.385818 -0.18714,0.602836 l -3.29087,5.491901 c -0.22815,0.375839 -0.63513,0.609781 -1.07893,0.609774 l -6.57643,-9.5e-5 c -0.22193,1.47e-4 -0.43501,-0.05648 -0.62071,-0.161262 v 0 C 77.97909,51.661759 77.8211,51.50849 77.70662,51.317699 l -3.29126,-5.491805 c -0.24038,-0.400615 -0.24041,-0.893301 0,-1.29391 l 3.29135,-5.486195 c 0.11402,-0.187967 0.27191,-0.341486 0.45831,-0.445848 0.18574,-0.105545 0.39853,-0.164265 0.62043,-0.16431 z m -12.78242,4.328254 c 0.0523,0.09538 0.10718,0.190606 0.16497,0.28573 z m 26.45255,4.672647 v 1.98e-4 a 31.280001,31.279996 0 0 1 6.03464,10.452272 h -0.005 a 31.279997,31.279992 0 0 1 1.62148,8.172806 h -4.46072 v 3.894666 h 4.46118 A 31.279997,31.279992 0 0 1 98.4855,78.12919 h 0.004 A 31.280001,31.279996 0 0 1 92.45483,88.581544 L 87.9829,80.836059 a 22.999998,22.999995 0 0 0 1.56281,-2.706582 h -0.005 a 22.999995,22.999991 0 0 0 2.34612,-10.119953 22.999995,22.999991 0 0 0 -6.4e-4,-0.0026 22.999995,22.999991 0 0 0 -2.34592,-10.118247 l 0.005,1.02e-4 a 22.999998,22.999995 0 0 0 -1.56216,-2.706684 z m -53.1932,13.616503 6.40157,0.104017 c 0.43956,0.0096 0.84562,0.245225 1.06752,0.629555 l 3.28811,5.69538 c 0.11109,0.192133 0.16868,0.404928 0.17078,0.618144 l -10e-5,-9.6e-5 c 0.002,0.213185 -0.0517,0.42665 -0.15974,0.621192 l -3.11032,5.596397 c -0.22676,0.408474 -0.65343,0.654848 -1.12057,0.646958 L 39.40281,74.85723 c -0.2198,-0.0045 -0.43171,-0.06476 -0.61529,-0.174008 -0.18428,-0.108081 -0.34153,-0.262928 -0.45251,-0.455074 l -3.28812,-5.695381 c -0.22181,-0.384342 -0.22234,-0.854226 -0.0107,-1.239712 l 3.10489,-5.59259 c 0.0786,-0.15661 0.23578,-0.36984 0.50575,-0.508038 0.162,-0.0829 0.36499,-0.139399 0.61558,-0.139392 z m 0.0327,17.075772 h 8.94385 a 22.999998,22.999995 0 0 0 1.56271,2.706677 l -0.006,0.01112 A 22.999998,22.999995 0 0 0 67.32402,90.96658 l -4.46546,7.73465 4.47192,-7.74544 a 22.999998,22.999995 0 0 0 1.56262,0.053 22.999998,22.999995 0 0 0 1.56301,-0.0537 l 4.47173,7.74569 A 31.280001,31.279996 0 0 1 68.8932,99.2885 31.280001,31.279996 0 0 1 62.85847,98.70078 l -0.006,0.0109 a 31.279999,31.279994 0 0 1 -7.88836,-2.68186 l 2.20035,-3.8111 -3.37294,-1.9474 -2.20035,3.81117 a 31.279999,31.279994 0 0 1 -6.26703,-5.490742 l 0.007,-0.01086 A 31.280001,31.279996 0 0 1 39.2965,78.128668 Z m 46.05177,5.863389 c 0.46338,-0.0078 0.88673,0.236599 1.11164,0.641821 l 3.08045,5.548583 c 0.10492,0.19115 0.15854,0.40288 0.15575,0.6148 -10e-4,0.21192 -0.0565,0.42391 -0.16659,0.61455 l -3.26187,5.6495 c -0.22018,0.38123 -0.62353,0.61468 -1.05963,0.62407 l -6.34443,0.1065 c -0.17354,0.0102 -0.43464,-0.0192 -0.68727,-0.18246 -0.15156,-0.0981 -0.30074,-0.24438 -0.42503,-0.45962 l -3.08578,-5.55105 c -0.20972,-0.38244 -0.20871,-0.84813 0.0114,-1.22935 l 3.26188,-5.649567 c 0.10995,-0.190734 0.26419,-0.345709 0.44632,-0.453266 v 0 c 0.18214,-0.107487 0.39224,-0.167248 0.61292,-0.17096 z" />
1370 </svg>
1371diff --git a/resources/panel_shadow.png b/resources/panel_shadow.png
1372index d76818a..7cceadb 100644
1373Binary files a/resources/panel_shadow.png and b/resources/panel_shadow.png differ
1374diff --git a/resources/refine_gradient_dash.png b/resources/refine_gradient_dash.png
1375index 17214cc..7cceadb 100644
1376Binary files a/resources/refine_gradient_dash.png and b/resources/refine_gradient_dash.png differ
1377diff --git a/resources/refine_gradient_panel.png b/resources/refine_gradient_panel.png
1378index 0b58160..7cceadb 100644
1379Binary files a/resources/refine_gradient_panel.png and b/resources/refine_gradient_panel.png differ
1380diff --git a/resources/refine_gradient_panel_single_column.png b/resources/refine_gradient_panel_single_column.png
1381index 38b9b49..7cceadb 100644
1382Binary files a/resources/refine_gradient_panel_single_column.png and b/resources/refine_gradient_panel_single_column.png differ
1383diff --git a/shutdown/SessionButton.cpp b/shutdown/SessionButton.cpp
1384index 61a6e8e..6762c88 100644
1385--- a/shutdown/SessionButton.cpp
1386+++ b/shutdown/SessionButton.cpp
1387@@ -132,11 +132,11 @@ void Button::UpdateTextures(std::string const& texture_prefix)
1388 {
1389 auto const& theme = theme::Settings::Get();
1390 auto texture_path = theme->ThemedFilePath(texture_prefix, {PKGDATADIR});
1391- RawPixel const texture_size = GetDefaultMaxTextureSize(texture_path);
1392+ RawPixel const texture_size = GetDefaultMaxTextureSize(texture_path) * 0.8;
1393 normal_tex_.Adopt(nux::CreateTexture2DFromFile(texture_path.c_str(), texture_size.CP(scale), true));
1394
1395 auto texture_highlight_path = theme->ThemedFilePath(texture_prefix + "_highlight", {PKGDATADIR});
1396- RawPixel const texture_highlight_size = GetDefaultMaxTextureSize(texture_path);
1397+ RawPixel const texture_highlight_size = GetDefaultMaxTextureSize(texture_path) * 0.8;
1398 highlight_tex_.Adopt(nux::CreateTexture2DFromFile(texture_highlight_path.c_str(), texture_highlight_size.CP(scale), true));
1399 }
1400
1401diff --git a/shutdown/SessionView.cpp b/shutdown/SessionView.cpp
1402index 422e3c9..a5667c2 100644
1403--- a/shutdown/SessionView.cpp
1404+++ b/shutdown/SessionView.cpp
1405@@ -39,7 +39,7 @@ namespace style
1406 RawPixel const LEFT_RIGHT_PADDING = 30_em;
1407 RawPixel const TOP_PADDING = 19_em;
1408 RawPixel const BOTTOM_PADDING = 12_em;
1409- RawPixel const MAIN_SPACE = 10_em;
1410+ RawPixel const MAIN_SPACE = 17_em;
1411 RawPixel const BUTTONS_SPACE = 20_em;
1412 }
1413
1414diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
1415index 58a8b10..82d92aa 100644
1416--- a/tests/CMakeLists.txt
1417+++ b/tests/CMakeLists.txt
1418@@ -281,7 +281,6 @@ if (GMOCK_LIB AND
1419 add_unity_test_xless (launcher-options)
1420 add_unity_test_xless (layout-system)
1421 add_unity_test_xless (model-iterator)
1422- add_unity_test_xless (previews)
1423 add_unity_test_xless (raw-pixel)
1424 add_unity_test_xless (scope-data)
1425 add_unity_test_xless (time-util)
1426@@ -382,7 +381,6 @@ if (ENABLE_X_SUPPORT)
1427 add_unity_test (dash-controller)
1428 add_unity_test (desktop-launcher-icon)
1429 add_unity_test (device-launcher-section)
1430- add_unity_test (error-preview)
1431 add_unity_test (edge-barrier-controller)
1432 add_unity_test (expo-launcher-icon)
1433 add_unity_test (file-manager-launcher-icon)
1434@@ -418,14 +416,6 @@ if (ENABLE_X_SUPPORT)
1435 add_unity_test (panel-tray)
1436 add_unity_test (panel-view)
1437 add_unity_test (places-group)
1438- add_unity_test (preview-player)
1439- add_unity_test (previews-application)
1440- add_unity_test (previews-generic)
1441- add_unity_test (previews-movie)
1442- add_unity_test (previews-music)
1443- add_unity_test (previews-music-payment)
1444- add_unity_test (previews-payment)
1445- add_unity_test (previews-social)
1446 add_unity_test (quicklist-manager)
1447 add_unity_test (quicklist-menu-item)
1448 add_unity_test (quicklist-view)
1449diff --git a/tests/mock_key_grabber.h b/tests/mock_key_grabber.h
1450index 2c271ca..27bccd1 100644
1451--- a/tests/mock_key_grabber.h
1452+++ b/tests/mock_key_grabber.h
1453@@ -18,7 +18,7 @@
1454 *
1455 */
1456
1457-#include "KeyGrabber.h"
1458+#include "unity-shared/KeyGrabber.h"
1459 #include <gmock/gmock.h>
1460
1461 namespace unity
1462diff --git a/tests/test_error_preview.cpp b/tests/test_error_preview.cpp
1463deleted file mode 100644
1464index a339e0d..0000000
1465--- a/tests/test_error_preview.cpp
1466+++ /dev/null
1467@@ -1,109 +0,0 @@
1468-/*
1469- * Copyright 2012-2013 Canonical Ltd.
1470- *
1471- * This program is free software: you can redistribute it and/or modify it
1472- * under the terms of the GNU Lesser General Public License version 3, as
1473- * published by the Free Software Foundation.
1474- *
1475- * This program is distributed in the hope that it will be useful, but
1476- * WITHOUT ANY WARRANTY; without even the implied warranties of
1477- * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
1478- * PURPOSE. See the applicable version of the GNU Lesser General Public
1479- * License for more details.
1480- *
1481- * You should have received a copy of both the GNU Lesser General Public
1482- * License version 3 along with this program. If not, see
1483- * <http://www.gnu.org/licenses/>
1484- *
1485- * Authored by: Diego Sarmentero <diego.sarmentero@canonical.com>
1486- *
1487- */
1488-#include <list>
1489-#include <gmock/gmock.h>
1490-using namespace testing;
1491-
1492-#include <Nux/Nux.h>
1493-#include <Nux/BaseWindow.h>
1494-#include <unity-shared/StaticCairoText.h>
1495-#include <unity-shared/DashStyle.h>
1496-#include <unity-shared/PreviewStyle.h>
1497-#include <unity-shared/ThumbnailGenerator.h>
1498-
1499-#include <unity-protocol.h>
1500-#include "dash/previews/ErrorPreview.h"
1501-#include "test_utils.h"
1502-
1503-namespace unity
1504-{
1505-
1506-namespace dash
1507-{
1508-
1509-namespace previews
1510-{
1511-
1512-class ErrorPreviewMock : public ErrorPreview
1513-{
1514- public:
1515- ErrorPreviewMock(dash::Preview::Ptr preview_model)
1516- : ErrorPreview(preview_model){}
1517- ~ErrorPreviewMock(){}
1518-
1519- using ErrorPreview::intro_;
1520- using ErrorPreview::title_;
1521- using ErrorPreview::subtitle_;
1522- using ErrorPreview::purchase_hint_;
1523- using ErrorPreview::purchase_prize_;
1524- using ErrorPreview::purchase_type_;
1525-};
1526-
1527-class TestErrorPreview : public Test
1528-{
1529- protected:
1530- TestErrorPreview() :
1531- Test(),
1532- parent_window_(new nux::BaseWindow("TestErrorPayment"))
1533- {
1534- title = "Turning Japanese";
1535- subtitle = "The vapors";
1536- header = "Hi test, you purchased in the past from Ubuntu One.";
1537- purchase_prize = "65$";
1538- purchase_type = "Mp3";
1539- preview_type = UNITY_PROTOCOL_PREVIEW_PAYMENT_TYPE_ERROR;
1540-
1541- glib::Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_payment_preview_new()));
1542-
1543- unity_protocol_preview_set_title(proto_obj, title.c_str());
1544- unity_protocol_preview_set_subtitle(proto_obj, subtitle.c_str());
1545-
1546- unity_protocol_payment_preview_set_header(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), header.c_str());
1547- unity_protocol_payment_preview_set_purchase_prize(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), purchase_prize.c_str());
1548- unity_protocol_payment_preview_set_purchase_type(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), purchase_type.c_str());
1549- unity_protocol_payment_preview_set_preview_type(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), preview_type);
1550-
1551- glib::Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), glib::StealRef());
1552-
1553- preview_model = dash::Preview::PreviewForVariant(v);
1554-
1555- }
1556-
1557- nux::ObjectPtr<nux::BaseWindow> parent_window_;
1558- dash::Preview::Ptr preview_model;
1559-
1560- // testing data
1561- std::string title;
1562- std::string subtitle;
1563- std::string header;
1564- std::string purchase_prize;
1565- std::string purchase_type;
1566- UnityProtocolPreviewPaymentType preview_type;
1567-
1568- // needed for styles
1569- dash::Style dash_style;
1570-};
1571-
1572-} // previews
1573-
1574-} // dash
1575-
1576-} // unity
1577diff --git a/tests/test_launcher.cpp b/tests/test_launcher.cpp
1578index d49f886..dddba10 100644
1579--- a/tests/test_launcher.cpp
1580+++ b/tests/test_launcher.cpp
1581@@ -205,33 +205,6 @@ struct TestWindowCompositor
1582 }
1583 };
1584
1585-TEST_F(TestLauncher, TestQuirksDuringDnd)
1586-{
1587- MockMockLauncherIcon::Ptr first(new MockMockLauncherIcon::Nice);
1588- model_->AddIcon(first);
1589-
1590- MockMockLauncherIcon::Ptr second(new MockMockLauncherIcon::Nice);
1591- model_->AddIcon(second);
1592-
1593- MockMockLauncherIcon::Ptr third(new MockMockLauncherIcon::Nice);
1594- model_->AddIcon(third);
1595-
1596- EXPECT_CALL(*first, ShouldHighlightOnDrag(_))
1597- .WillRepeatedly(Return(true));
1598-
1599- EXPECT_CALL(*second, ShouldHighlightOnDrag(_))
1600- .WillRepeatedly(Return(true));
1601-
1602- EXPECT_CALL(*third, ShouldHighlightOnDrag(_))
1603- .WillRepeatedly(Return(false));
1604-
1605- launcher_->DndStarted("");
1606-
1607- EXPECT_FALSE(first->GetQuirk(launcher::AbstractLauncherIcon::Quirk::DESAT, launcher_->monitor()));
1608- EXPECT_FALSE(second->GetQuirk(launcher::AbstractLauncherIcon::Quirk::DESAT, launcher_->monitor()));
1609- EXPECT_TRUE(third->GetQuirk(launcher::AbstractLauncherIcon::Quirk::DESAT, launcher_->monitor()));
1610-}
1611-
1612 TEST_F(TestLauncher, TestMouseWheelScroll)
1613 {
1614 MockMockLauncherIcon::Ptr icon(new MockMockLauncherIcon::Nice);
1615@@ -496,17 +469,6 @@ TEST_F(TestLauncher, DragLauncherIconHidesOutsideLauncherEmitsMouseEnter)
1616 EXPECT_FALSE(mouse_entered);
1617 }
1618
1619-TEST_F(TestLauncher, EdgeReleasesDuringDnd)
1620-{
1621- auto barrier = std::make_shared<ui::PointerBarrierWrapper>();
1622- auto event = std::make_shared<ui::BarrierEvent>(0, 0, 0, 100);
1623-
1624- launcher_->DndStarted("");
1625-
1626- EXPECT_EQ(launcher_->HandleBarrierEvent(barrier, event),
1627- ui::EdgeBarrierSubscriber::Result::NEEDS_RELEASE);
1628-}
1629-
1630 TEST_F(TestLauncher, EdgeBarriersIgnoreEvents)
1631 {
1632 auto const& launcher_geo = launcher_->GetAbsoluteGeometry();
1633@@ -618,26 +580,6 @@ TEST_F(TestLauncher, DndIsSpecialRequest)
1634 EXPECT_FALSE(launcher_->DndIsSpecialRequest("file://full/path/to/MyFile.txt"));
1635 }
1636
1637-TEST_F(TestLauncher, AddRequestSignal)
1638-{
1639- auto const& icons = AddMockIcons(1);
1640- auto const& center = icons[0]->GetCenter(launcher_->monitor());
1641- launcher_->ProcessDndEnter();
1642- launcher_->FakeProcessDndMove(center.x, center.y, {"application://MyFile.desktop"});
1643-
1644- bool add_request = false;
1645- launcher_->add_request.connect([&] (std::string const& uri, AbstractLauncherIcon::Ptr const& drop_icon) {
1646- EXPECT_EQ(drop_icon, icons[0]);
1647- EXPECT_EQ(uri, "application://MyFile.desktop");
1648- add_request = true;
1649- });
1650-
1651- launcher_->ProcessDndDrop(center.x, center.y);
1652- launcher_->ProcessDndLeave();
1653-
1654- EXPECT_TRUE(add_request);
1655-}
1656-
1657 TEST_F(TestLauncher, IconStartingPulseValue)
1658 {
1659 MockMockLauncherIcon::Ptr icon(new MockMockLauncherIcon::Nice);
1660diff --git a/tests/test_launcher_controller.cpp b/tests/test_launcher_controller.cpp
1661index 9495dff..2f74271 100644
1662--- a/tests/test_launcher_controller.cpp
1663+++ b/tests/test_launcher_controller.cpp
1664@@ -1758,46 +1758,6 @@ TEST_F(TestLauncherController, DisconnectWMSignalsOnDestruction)
1665 color_property.changed.emit(nux::color::RandomColor());
1666 }
1667
1668-TEST_F(TestLauncherController, DragAndDrop_MultipleLaunchers)
1669-{
1670- lc.multiple_launchers = true;
1671- uscreen.SetupFakeMultiMonitor();
1672- lc.options()->hide_mode = LAUNCHER_HIDE_AUTOHIDE;
1673- unsigned monitor = 0;
1674- unsigned old_monitor = -1;
1675-
1676- auto check_fn = [this](int index) {
1677- return lc.launchers()[index]->Hidden();
1678- };
1679-
1680- ON_CALL(*xdnd_manager_, Monitor()).WillByDefault(ReturnPointee(&monitor));
1681- xdnd_manager_->dnd_started.emit("my_awesome_file", monitor);
1682-
1683- for (unsigned i = 0; i < monitors::MAX; ++i)
1684- {
1685- Utils::WaitUntilMSec(std::bind(check_fn, i), i != monitor);
1686- ASSERT_EQ(i != monitor, check_fn(i));
1687- }
1688-
1689- old_monitor = monitor;
1690- monitor = 3;
1691- xdnd_manager_->monitor_changed.emit("another_file", old_monitor, monitor);
1692-
1693- for (unsigned i = 0; i < monitors::MAX; ++i)
1694- {
1695- Utils::WaitUntilMSec(std::bind(check_fn, i), i != monitor);
1696- ASSERT_EQ(i != monitor, check_fn(i));
1697- }
1698-
1699- xdnd_manager_->dnd_finished.emit();
1700-
1701- for (unsigned i = 0; i < monitors::MAX; ++i)
1702- {
1703- Utils::WaitUntilMSec(std::bind(check_fn, i), true);
1704- ASSERT_TRUE(check_fn(i));
1705- }
1706-}
1707-
1708 TEST_F(TestLauncherController, DragAndDrop_SingleLauncher)
1709 {
1710 lc.multiple_launchers = false;
1711@@ -1824,87 +1784,6 @@ TEST_F(TestLauncherController, DragAndDrop_SingleLauncher)
1712 Utils::WaitUntilMSec(check_fn, true);
1713 }
1714
1715-TEST_F(TestLauncherController, DragAndDrop_MultipleLaunchers_DesaturateIcons)
1716-{
1717- lc.multiple_launchers = true;
1718- uscreen.SetupFakeMultiMonitor();
1719- unsigned monitor = 0;
1720- unsigned old_monitor = -1;
1721- auto const& model = lc.Impl()->model_;
1722-
1723- ON_CALL(*xdnd_manager_, Monitor()).WillByDefault(ReturnPointee(&monitor));
1724- xdnd_manager_->dnd_started.emit("my_awesome_file", monitor);
1725-
1726- for (auto const& icon : *model)
1727- {
1728- bool is_trash = icon->GetIconType() == AbstractLauncherIcon::IconType::TRASH;
1729-
1730- for (unsigned i = 0; i < monitors::MAX; ++i)
1731- ASSERT_EQ(monitor == i && !is_trash, icon->GetQuirk(AbstractLauncherIcon::Quirk::DESAT, i));
1732- }
1733-
1734- old_monitor = monitor;
1735- monitor = 3;
1736- xdnd_manager_->monitor_changed.emit("another_file", old_monitor, monitor);
1737-
1738- for (auto const& icon : *model)
1739- {
1740- bool is_trash = icon->GetIconType() == AbstractLauncherIcon::IconType::TRASH;
1741-
1742- for (unsigned i = 0; i < monitors::MAX; ++i)
1743- ASSERT_EQ(monitor == i && !is_trash, icon->GetQuirk(AbstractLauncherIcon::Quirk::DESAT, i));
1744- }
1745-
1746- xdnd_manager_->dnd_finished.emit();
1747-
1748- for (auto const& icon : *model)
1749- {
1750- for (unsigned i = 0; i < monitors::MAX; ++i)
1751- ASSERT_FALSE(icon->GetQuirk(AbstractLauncherIcon::Quirk::DESAT, i));
1752- }
1753-}
1754-
1755-TEST_F(TestLauncherController, DragAndDrop_SingleLauncher_DesaturateIcons)
1756-{
1757- lc.multiple_launchers = false;
1758- unsigned monitor = 2;
1759- unsigned old_monitor = -1;
1760- uscreen.SetupFakeMultiMonitor(monitor);
1761- lc.options()->hide_mode = LAUNCHER_HIDE_AUTOHIDE;
1762- auto const& model = lc.Impl()->model_;
1763-
1764- ON_CALL(*xdnd_manager_, Monitor()).WillByDefault(ReturnPointee(&monitor));
1765- xdnd_manager_->dnd_started.emit("my_awesome_file", monitor);
1766-
1767- for (auto const& icon : *model)
1768- {
1769- bool is_trash = icon->GetIconType() == AbstractLauncherIcon::IconType::TRASH;
1770-
1771- for (unsigned i = 0; i < monitors::MAX; ++i)
1772- ASSERT_EQ(monitor == i && !is_trash, icon->GetQuirk(AbstractLauncherIcon::Quirk::DESAT, i));
1773- }
1774-
1775- old_monitor = monitor;
1776- monitor = 0;
1777- xdnd_manager_->monitor_changed.emit("another_file", old_monitor, monitor);
1778-
1779- for (auto const& icon : *model)
1780- {
1781- bool is_trash = icon->GetIconType() == AbstractLauncherIcon::IconType::TRASH;
1782-
1783- for (unsigned i = 0; i < monitors::MAX; ++i)
1784- ASSERT_EQ(old_monitor == i && !is_trash, icon->GetQuirk(AbstractLauncherIcon::Quirk::DESAT, i));
1785- }
1786-
1787- xdnd_manager_->dnd_finished.emit();
1788-
1789- for (auto const& icon : *model)
1790- {
1791- for (unsigned i = 0; i < monitors::MAX; ++i)
1792- ASSERT_FALSE(icon->GetQuirk(AbstractLauncherIcon::Quirk::DESAT, i));
1793- }
1794-}
1795-
1796 TEST_F(TestLauncherController, SetExistingLauncherIconAsFavorite)
1797 {
1798 const char * desktop_file = "normal-icon.desktop";
1799diff --git a/tests/test_preview_player.cpp b/tests/test_preview_player.cpp
1800deleted file mode 100644
1801index df481e9..0000000
1802--- a/tests/test_preview_player.cpp
1803+++ /dev/null
1804@@ -1,230 +0,0 @@
1805-// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
1806-/*
1807- * Copyright (C) 2013 Canonical Ltd
1808- *
1809- * This program is free software: you can redistribute it and/or modify
1810- * it under the terms of the GNU General Public License version 3 as
1811- * published by the Free Software Foundation.
1812- *
1813- * This program is distributed in the hope that it will be useful,
1814- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1815- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1816- * GNU General Public License for more details.
1817- *
1818- * You should have received a copy of the GNU General Public License
1819- * along with this program. If not, see <http://www.gnu.org/licenses/>.
1820- *
1821- * Authored by: Nick Dedekind <nick.dedekinc@canonical.com>
1822- */
1823-
1824-#include <gmock/gmock.h>
1825-#include <UnityCore/PreviewPlayer.h>
1826-#include <UnityCore/ConnectionManager.h>
1827-#include <UnityCore/GLibDBusServer.h>
1828-#include <UnityCore/Variant.h>
1829-#include "test_utils.h"
1830-#include "config.h"
1831-
1832-namespace unity
1833-{
1834-
1835-namespace
1836-{
1837- const std::string WHITE_NOISE = "file://" BUILDDIR "/tests/data/unity/sounds/whitenoise.mp3";
1838-
1839- const std::string PLAYER_NAME = "com.canonical.Unity.Lens.Music.PreviewPlayer";
1840- const std::string PLAYER_PATH = "/com/canonical/Unity/Lens/Music/PreviewPlayer";
1841- const std::string PLAYER_INTERFACE =
1842- R"(<node>
1843- <interface name="com.canonical.Unity.Lens.Music.PreviewPlayer">
1844- <method name="Play">
1845- <arg type="s" name="uri" direction="in"/>
1846- </method>
1847- <method name="Pause">
1848- </method>
1849- <method name="Resume">
1850- </method>
1851- <method name="PauseResume">
1852- </method>
1853- <method name="Stop">
1854- </method>
1855- <method name="Close">
1856- </method>
1857- <method name="VideoProperties">
1858- <arg type="s" name="uri" direction="in"/>
1859- <arg type="a{sv}" name="result" direction="out"/>
1860- </method>
1861- <signal name="Progress">
1862- <arg type="s" name="uri"/>
1863- <arg type="u" name="state"/>
1864- <arg type="d" name="value"/>
1865- </signal>
1866- </interface>
1867- </node>)";
1868-
1869- void PlayAndWait(PreviewPlayer* player, std::string const& uri)
1870- {
1871- bool play_returned = false;
1872- auto play_callback = [&play_returned] (glib::Error const& error) {
1873- play_returned = true;
1874- EXPECT_TRUE(!error) << "Error: " << error.Message();
1875- };
1876-
1877- bool updated_called = false;
1878- auto updated_callback = [uri, &updated_called] (std::string const& _uri, PlayerState state, double) {
1879- updated_called = true;
1880- EXPECT_EQ(_uri, uri) << "Uri for PLAY not correct (" << _uri << " != " << _uri << ")";
1881- EXPECT_EQ((int)state, (int)PlayerState::PLAYING) << "Incorrect state returned on PLAY.";
1882- };
1883-
1884- connection::Wrapper conn(player->updated.connect(updated_callback));
1885- player->Play(uri, play_callback);
1886- ::Utils::WaitUntilMSec(play_returned, 3000, "PLAY did not return");
1887- ::Utils::WaitUntilMSec(updated_called, 5000, "Update not called on PLAY");
1888- }
1889-
1890- void PauseAndWait(PreviewPlayer* player)
1891- {
1892- bool pause_returned = false;
1893- auto callback = [&pause_returned] (glib::Error const& error) {
1894- pause_returned = true;
1895- EXPECT_TRUE(!error) << "Error: " << error.Message();
1896- };
1897-
1898- bool updated_called = false;
1899- auto updated_callback = [&updated_called] (std::string const&, PlayerState state, double) {
1900- updated_called = true;
1901- EXPECT_EQ((int)state, (int)PlayerState::PAUSED) << "Incorrect state returned on PAUSE.";
1902- };
1903-
1904- connection::Wrapper conn(player->updated.connect(updated_callback));
1905- player->Pause(callback);
1906- ::Utils::WaitUntilMSec(pause_returned, 3000, "PAUSE did not return");
1907- ::Utils::WaitUntilMSec(updated_called, 5000, "Update not called on PAUSE");
1908- }
1909-
1910- void ResumeAndWait(PreviewPlayer* player)
1911- {
1912- bool resume_returned = false;
1913- auto callback = [&resume_returned] (glib::Error const& error) {
1914- resume_returned = true;
1915- EXPECT_TRUE(!error) << "Error: " << error.Message();
1916- };
1917-
1918- bool updated_called = false;
1919- auto updated_callback = [&updated_called] (std::string const&, PlayerState state, double) {
1920- updated_called = true;
1921- EXPECT_EQ((int)state, (int)PlayerState::PLAYING) << "Incorrect state returned on RESUME.";
1922- };
1923-
1924- connection::Wrapper conn(player->updated.connect(updated_callback));
1925- player->Resume(callback);
1926- ::Utils::WaitUntilMSec(resume_returned, 3000, "RESUME did not return");
1927- ::Utils::WaitUntilMSec(updated_called, 5000, "Update not called on RESUME");
1928- }
1929-
1930- void StopAndWait(PreviewPlayer* player)
1931- {
1932- bool stop_returned = false;
1933- auto callback = [&stop_returned] (glib::Error const& error) {
1934- stop_returned = true;
1935- EXPECT_TRUE(!error) << "Error: " << error.Message();
1936- };
1937-
1938- bool updated_called = false;
1939- auto updated_callback = [&updated_called] (std::string const&, PlayerState state, double) {
1940- updated_called = true;
1941- EXPECT_EQ((int)state, (int)PlayerState::STOPPED) << "Incorrect state returned on STOP.";
1942- };
1943-
1944- connection::Wrapper conn(player->updated.connect(updated_callback));
1945- player->Stop(callback);
1946- ::Utils::WaitUntilMSec(stop_returned, 3000, "STOP did not return");
1947- ::Utils::WaitUntilMSec(updated_called, 5000, "Update not called on STOP");
1948- }
1949-
1950- struct FakeRemotePlayer
1951- {
1952- typedef std::shared_ptr<FakeRemotePlayer> Ptr;
1953- FakeRemotePlayer()
1954- : server_(PLAYER_NAME)
1955- {
1956- server_.AddObjects(PLAYER_INTERFACE, PLAYER_PATH);
1957- auto object = server_.GetObjects().front();
1958-
1959- object->SetMethodsCallsHandler([this, object] (std::string const& method, GVariant* parameters) {
1960- if (method == "Play")
1961- {
1962- current_uri_ = glib::Variant(parameters).GetString();
1963- object->EmitSignal("Progress", g_variant_new("(sud)", current_uri_.c_str(), PlayerState::PLAYING, 0));
1964- }
1965- else if (method == "Pause")
1966- {
1967- object->EmitSignal("Progress", g_variant_new("(sud)", current_uri_.c_str(), PlayerState::PAUSED, 0));
1968- }
1969- else if (method == "Resume")
1970- {
1971- object->EmitSignal("Progress", g_variant_new("(sud)", current_uri_.c_str(), PlayerState::PLAYING, 0));
1972- }
1973- else if (method == "Stop")
1974- {
1975- object->EmitSignal("Progress", g_variant_new("(sud)", current_uri_.c_str(), PlayerState::STOPPED, 0));
1976- current_uri_ = "";
1977- }
1978-
1979- return static_cast<GVariant*>(nullptr);
1980- });
1981- }
1982-
1983- private:
1984- glib::DBusServer server_;
1985- std::string current_uri_;
1986- };
1987-}
1988-
1989-struct TestPreviewPlayer : testing::Test
1990-{
1991- static void SetUpTestCase()
1992- {
1993- remote_player_ = std::make_shared<FakeRemotePlayer>();
1994- }
1995-
1996- static void TearDownTestCase()
1997- {
1998- remote_player_.reset();
1999- }
2000-
2001- static FakeRemotePlayer::Ptr remote_player_;
2002- PreviewPlayer player;
2003-};
2004-
2005-FakeRemotePlayer::Ptr TestPreviewPlayer::remote_player_;
2006-
2007-TEST_F(TestPreviewPlayer, TestConstruct)
2008-{
2009- PreviewPlayer player1;
2010-}
2011-
2012-TEST_F(TestPreviewPlayer, TestPlayerControl)
2013-{
2014- PlayAndWait(&player, WHITE_NOISE);
2015-
2016- PauseAndWait(&player);
2017-
2018- ResumeAndWait(&player);
2019-
2020- StopAndWait(&player);
2021-}
2022-
2023-TEST_F(TestPreviewPlayer, TestMultiPlayer)
2024-{
2025- {
2026- PreviewPlayer player2;
2027- PlayAndWait(&player2, WHITE_NOISE);
2028- }
2029-
2030- StopAndWait(&player);
2031-}
2032-
2033-
2034-} // namespace unity
2035\ No newline at end of file
2036diff --git a/tests/test_previews.cpp b/tests/test_previews.cpp
2037deleted file mode 100644
2038index 3c99a08..0000000
2039--- a/tests/test_previews.cpp
2040+++ /dev/null
2041@@ -1,230 +0,0 @@
2042-// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
2043-/*
2044- * Copyright (C) 2011 Canonical Ltd
2045- *
2046- * This program is free software: you can redistribute it and/or modify
2047- * it under the terms of the GNU General Public License version 3 as
2048- * published by the Free Software Foundation.
2049- *
2050- * This program is distributed in the hope that it will be useful,
2051- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2052- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2053- * GNU General Public License for more details.
2054- *
2055- * You should have received a copy of the GNU General Public License
2056- * along with this program. If not, see <http://www.gnu.org/licenses/>.
2057- *
2058- * Authored by: Marco Trevisan (Treviño) <3v1n0@ubuntu.com>
2059- */
2060-
2061-#include <list>
2062-#include <algorithm>
2063-#include <gmock/gmock.h>
2064-#include <gio/gio.h>
2065-#include <UnityCore/Variant.h>
2066-#include <UnityCore/Preview.h>
2067-#include <UnityCore/ApplicationPreview.h>
2068-#include <UnityCore/MoviePreview.h>
2069-#include <UnityCore/MusicPreview.h>
2070-#include <unity-protocol.h>
2071-
2072-using namespace std;
2073-using namespace testing;
2074-using namespace unity;
2075-using namespace unity::glib;
2076-using namespace unity::dash;
2077-
2078-namespace
2079-{
2080-
2081-bool IsVariant(Variant const& variant)
2082-{
2083- return g_variant_get_type_string(variant) != NULL;
2084-}
2085-
2086-static void g_variant_unref0(gpointer var)
2087-{
2088- if (var) g_variant_unref((GVariant*)var);
2089-}
2090-
2091-TEST(TestPreviews, DeserializeGeneric)
2092-{
2093- Object<GIcon> icon(g_icon_new_for_string("accessories", NULL));
2094- Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_generic_preview_new()));
2095- unity_protocol_preview_set_title(proto_obj, "Title");
2096- unity_protocol_preview_set_subtitle(proto_obj, "Subtitle");
2097- unity_protocol_preview_set_description(proto_obj, "Description");
2098- unity_protocol_preview_set_image(proto_obj, icon);
2099- unity_protocol_preview_set_image_source_uri(proto_obj, "Source");
2100-
2101- Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())),
2102- glib::StealRef());
2103- EXPECT_TRUE(IsVariant(v));
2104-
2105- Preview::Ptr preview = Preview::PreviewForVariant(v);
2106- EXPECT_TRUE(preview != nullptr);
2107-
2108- EXPECT_EQ(preview->renderer_name, "preview-generic");
2109- EXPECT_EQ(preview->title, "Title");
2110- EXPECT_EQ(preview->subtitle, "Subtitle");
2111- EXPECT_EQ(preview->description, "Description");
2112- EXPECT_EQ(preview->image_source_uri, "Source");
2113- EXPECT_TRUE(g_icon_equal(preview->image(), icon) != FALSE);
2114-}
2115-
2116-TEST(TestPreviews, DeserializeGenericWithMeta)
2117-{
2118- Object<GIcon> icon(g_icon_new_for_string("accessories", NULL));
2119- Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_generic_preview_new()));
2120- unity_protocol_preview_set_title(proto_obj, "Title");
2121- unity_protocol_preview_set_subtitle(proto_obj, "Subtitle");
2122- unity_protocol_preview_set_description(proto_obj, "Description");
2123- unity_protocol_preview_set_image(proto_obj, icon);
2124- unity_protocol_preview_set_image_source_uri(proto_obj, "Source");
2125-
2126- GHashTable* hints = g_hash_table_new_full(g_str_hash, g_direct_equal, g_free, g_variant_unref0);
2127- g_hash_table_insert(hints, g_strdup("extra-text"), g_variant_new_string("Foo"));
2128- unity_protocol_preview_add_action(proto_obj, "action1", "Action #1", NULL, 0);
2129- unity_protocol_preview_add_action_with_hints(proto_obj, "action2", "Action #2", NULL, 0, hints);
2130- unity_protocol_preview_add_info_hint(proto_obj, "hint1", "Hint 1", NULL, g_variant_new("i", 34));
2131- unity_protocol_preview_add_info_hint(proto_obj, "hint2", "Hint 2", NULL, g_variant_new("s", "string hint"));
2132-
2133- Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())),
2134- glib::StealRef());
2135- EXPECT_TRUE(IsVariant(v));
2136-
2137- Preview::Ptr preview = Preview::PreviewForVariant(v);
2138- EXPECT_TRUE(preview != nullptr);
2139-
2140- EXPECT_EQ(preview->renderer_name, "preview-generic");
2141- EXPECT_EQ(preview->title, "Title");
2142- EXPECT_EQ(preview->subtitle, "Subtitle");
2143- EXPECT_EQ(preview->description, "Description");
2144- EXPECT_TRUE(g_icon_equal(preview->image(), icon) != FALSE);
2145- EXPECT_EQ(preview->image_source_uri, "Source");
2146-
2147- auto actions = preview->GetActions();
2148- auto info_hints = preview->GetInfoHints();
2149-
2150- EXPECT_EQ(actions.size(), 2u);
2151-
2152- auto action1 = actions[0];
2153- EXPECT_EQ(action1->id, "action1");
2154- EXPECT_EQ(action1->display_name, "Action #1");
2155- EXPECT_EQ(action1->icon_hint, "");
2156- EXPECT_EQ(action1->layout_hint, 0);
2157- EXPECT_EQ(action1->extra_text, "");
2158-
2159- auto action2 = actions[1];
2160- EXPECT_EQ(action2->id, "action2");
2161- EXPECT_EQ(action2->display_name, "Action #2");
2162- EXPECT_EQ(action2->icon_hint, "");
2163- EXPECT_EQ(action2->extra_text, "Foo");
2164-
2165- EXPECT_EQ(info_hints.size(), 2u);
2166- auto hint1 = info_hints[0];
2167- EXPECT_EQ(hint1->id, "hint1");
2168- EXPECT_EQ(hint1->display_name, "Hint 1");
2169- EXPECT_EQ(hint1->icon_hint, "");
2170- EXPECT_EQ(hint1->value.GetInt32(), 34);
2171- auto hint2 = info_hints[1];
2172- EXPECT_EQ(hint2->id, "hint2");
2173- EXPECT_EQ(hint2->display_name, "Hint 2");
2174- EXPECT_EQ(hint2->icon_hint, "");
2175- EXPECT_EQ(hint2->value.GetString(), "string hint");
2176-}
2177-
2178-TEST(TestPreviews, DeserializeApplication)
2179-{
2180- Object<GIcon> icon(g_icon_new_for_string("application", NULL));
2181- Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_application_preview_new()));
2182- unity_protocol_preview_set_title(proto_obj, "Title");
2183- unity_protocol_preview_set_subtitle(proto_obj, "Subtitle");
2184- unity_protocol_preview_set_description(proto_obj, "Description");
2185- unity_protocol_preview_set_image(proto_obj, icon);
2186- auto app_proto_obj = glib::object_cast<UnityProtocolApplicationPreview>(proto_obj);
2187- unity_protocol_application_preview_set_last_update(app_proto_obj, "2012/06/13");
2188- unity_protocol_application_preview_set_copyright(app_proto_obj, "(c) Canonical");
2189- unity_protocol_application_preview_set_license(app_proto_obj, "GPLv3");
2190- unity_protocol_application_preview_set_app_icon(app_proto_obj, icon);
2191- unity_protocol_application_preview_set_rating(app_proto_obj, 4.0);
2192- unity_protocol_application_preview_set_num_ratings(app_proto_obj, 12);
2193-
2194- Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())),
2195- glib::StealRef());
2196- EXPECT_TRUE(IsVariant(v));
2197-
2198- Preview::Ptr base_preview = Preview::PreviewForVariant(v);
2199- ApplicationPreview::Ptr preview = std::dynamic_pointer_cast<ApplicationPreview>(base_preview);
2200- EXPECT_TRUE(preview != nullptr);
2201-
2202- EXPECT_EQ(preview->renderer_name, "preview-application");
2203- EXPECT_EQ(preview->title, "Title");
2204- EXPECT_EQ(preview->subtitle, "Subtitle");
2205- EXPECT_EQ(preview->description, "Description");
2206- EXPECT_TRUE(g_icon_equal(preview->image(), icon) != FALSE);
2207- EXPECT_EQ(preview->last_update, "2012/06/13");
2208- EXPECT_EQ(preview->copyright, "(c) Canonical");
2209- EXPECT_EQ(preview->license, "GPLv3");
2210- EXPECT_TRUE(g_icon_equal(preview->app_icon(), icon) != FALSE);
2211- EXPECT_EQ(preview->rating, 4.0);
2212- EXPECT_EQ(preview->num_ratings, static_cast<unsigned>(12));
2213-}
2214-
2215-TEST(TestPreviews, DeserializeMovie)
2216-{
2217- Object<GIcon> icon(g_icon_new_for_string("movie", NULL));
2218- Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_movie_preview_new()));
2219- unity_protocol_preview_set_title(proto_obj, "Title");
2220- unity_protocol_preview_set_subtitle(proto_obj, "Subtitle");
2221- unity_protocol_preview_set_description(proto_obj, "Description");
2222- unity_protocol_preview_set_image(proto_obj, icon);
2223- auto movie_proto_obj = glib::object_cast<UnityProtocolMoviePreview>(proto_obj);
2224- unity_protocol_movie_preview_set_year(movie_proto_obj, "2012");
2225- unity_protocol_movie_preview_set_rating(movie_proto_obj, 4.0);
2226- unity_protocol_movie_preview_set_num_ratings(movie_proto_obj, 12);
2227-
2228- Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())),
2229- glib::StealRef());
2230- EXPECT_TRUE(IsVariant(v));
2231-
2232- Preview::Ptr base_preview = Preview::PreviewForVariant(v);
2233- MoviePreview::Ptr preview = std::dynamic_pointer_cast<MoviePreview>(base_preview);
2234- EXPECT_TRUE(preview != nullptr);
2235-
2236- EXPECT_EQ(preview->renderer_name, "preview-movie");
2237- EXPECT_EQ(preview->title, "Title");
2238- EXPECT_EQ(preview->subtitle, "Subtitle");
2239- EXPECT_EQ(preview->description, "Description");
2240- EXPECT_TRUE(g_icon_equal(preview->image(), icon) != FALSE);
2241- EXPECT_EQ(preview->year, "2012");
2242- EXPECT_EQ(preview->rating, 4.0);
2243- EXPECT_EQ(preview->num_ratings, static_cast<unsigned int>(12));
2244-}
2245-
2246-TEST(TestPreviews, DeserializeMusic)
2247-{
2248- Object<GIcon> icon(g_icon_new_for_string("music", NULL));
2249- Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_music_preview_new()));
2250- unity_protocol_preview_set_title(proto_obj, "Title");
2251- unity_protocol_preview_set_subtitle(proto_obj, "Subtitle");
2252- unity_protocol_preview_set_description(proto_obj, "Description");
2253- unity_protocol_preview_set_image(proto_obj, icon);
2254- auto music_proto_obj = glib::object_cast<UnityProtocolMusicPreview>(proto_obj);
2255-
2256- Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())),
2257- glib::StealRef());
2258- EXPECT_TRUE(IsVariant(v));
2259-
2260- Preview::Ptr base_preview = Preview::PreviewForVariant(v);
2261- MusicPreview::Ptr preview = std::dynamic_pointer_cast<MusicPreview>(base_preview);
2262- EXPECT_TRUE(preview != nullptr);
2263-
2264- EXPECT_EQ(preview->renderer_name, "preview-music");
2265- EXPECT_EQ(preview->title, "Title");
2266- EXPECT_EQ(preview->subtitle, "Subtitle");
2267- EXPECT_EQ(preview->description, "Description");
2268- EXPECT_TRUE(g_icon_equal(preview->image(), icon) != FALSE);
2269-}
2270-
2271-} // Namespace
2272diff --git a/tests/test_previews_application.cpp b/tests/test_previews_application.cpp
2273deleted file mode 100644
2274index 82afc29..0000000
2275--- a/tests/test_previews_application.cpp
2276+++ /dev/null
2277@@ -1,142 +0,0 @@
2278-// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
2279-/*
2280- * Copyright (C) 2012 Canonical Ltd
2281- *
2282- * This program is free software: you can redistribute it and/or modify
2283- * it under the terms of the GNU General Public License version 3 as
2284- * published by the Free Software Foundation.
2285- *
2286- * This program is distributed in the hope that it will be useful,
2287- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2288- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2289- * GNU General Public License for more details.
2290- *
2291- * You should have received a copy of the GNU General Public License
2292- * along with this program. If not, see <http://www.gnu.org/licenses/>.
2293- *
2294- * Authored by: Nick Dedekind <nick.dedekinc@canonical.com>
2295- */
2296-
2297-#include <list>
2298-#include <gmock/gmock.h>
2299-using namespace testing;
2300-
2301-#include <Nux/Nux.h>
2302-#include <Nux/BaseWindow.h>
2303-#include <unity-shared/StaticCairoText.h>
2304-#include <unity-shared/DashStyle.h>
2305-#include <unity-shared/PreviewStyle.h>
2306-#include <unity-shared/ThumbnailGenerator.h>
2307-
2308-#include <unity-protocol.h>
2309-#include "UnityCore/ApplicationPreview.h"
2310-#include "dash/previews/ApplicationPreview.h"
2311-#include "dash/previews/PreviewInfoHintWidget.h"
2312-#include "dash/previews/PreviewRatingsWidget.h"
2313-#include "dash/previews/ActionButton.h"
2314-#include "test_utils.h"
2315-using namespace unity;
2316-using namespace unity::dash;
2317-
2318-namespace
2319-{
2320-
2321-class MockApplicationPreview : public previews::ApplicationPreview
2322-{
2323-public:
2324- typedef nux::ObjectPtr<MockApplicationPreview> Ptr;
2325-
2326- MockApplicationPreview(dash::Preview::Ptr preview_model)
2327- : ApplicationPreview(preview_model)
2328- {}
2329-
2330- using ApplicationPreview::title_;
2331- using ApplicationPreview::subtitle_;
2332- using ApplicationPreview::license_;
2333- using ApplicationPreview::last_update_;
2334- using ApplicationPreview::copywrite_;
2335- using ApplicationPreview::description_;
2336- using ApplicationPreview::action_buttons_;
2337- using ApplicationPreview::preview_info_hints_;
2338- using ApplicationPreview::app_rating_;
2339-};
2340-
2341-class TestPreviewApplication : public Test
2342-{
2343-public:
2344- TestPreviewApplication()
2345- : parent_window_(new nux::BaseWindow("TestPreviewApplication"))
2346- {
2347- glib::Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_application_preview_new()));
2348-
2349- GHashTable* action_hints1(g_hash_table_new(g_direct_hash, g_direct_equal));
2350- g_hash_table_insert (action_hints1, g_strdup ("extra-text"), g_variant_new_string("£30.99"));
2351-
2352- unity_protocol_application_preview_set_app_icon(UNITY_PROTOCOL_APPLICATION_PREVIEW(proto_obj.RawPtr()), g_icon_new_for_string(TESTDATADIR "/bfb.png", NULL));
2353- unity_protocol_application_preview_set_license(UNITY_PROTOCOL_APPLICATION_PREVIEW(proto_obj.RawPtr()), "License & special char");
2354- unity_protocol_application_preview_set_copyright(UNITY_PROTOCOL_APPLICATION_PREVIEW(proto_obj.RawPtr()), "Copywrite & special char");
2355- unity_protocol_application_preview_set_last_update(UNITY_PROTOCOL_APPLICATION_PREVIEW(proto_obj.RawPtr()), "11th Apr 2012");
2356- unity_protocol_application_preview_set_rating(UNITY_PROTOCOL_APPLICATION_PREVIEW(proto_obj.RawPtr()), 0.8);
2357- unity_protocol_application_preview_set_num_ratings(UNITY_PROTOCOL_APPLICATION_PREVIEW(proto_obj.RawPtr()), 12);
2358-
2359- unity_protocol_preview_set_image_source_uri(proto_obj, "http://ia.media-imdb.com/images/M/MV5BMTM3NDM5MzY5Ml5BMl5BanBnXkFtZTcwNjExMDUwOA@@._V1._SY317_.jpg");
2360- unity_protocol_preview_set_title(proto_obj, "Application Title & special char");
2361- unity_protocol_preview_set_subtitle(proto_obj, "Application Subtitle > special char");
2362- unity_protocol_preview_set_description(proto_obj, "Application Desctiption &lt; special char");
2363- unity_protocol_preview_add_action(proto_obj, "action1", "Action 1", NULL, 0);
2364- unity_protocol_preview_add_action_with_hints(proto_obj, "action2", "Action 2", NULL, 0, action_hints1);
2365- unity_protocol_preview_add_info_hint(proto_obj, "hint1", "Hint 1", NULL, g_variant_new("s", "string hint 1"));
2366- unity_protocol_preview_add_info_hint(proto_obj, "hint2", "Hint 2", NULL, g_variant_new("s", "string hint 2"));
2367- unity_protocol_preview_add_info_hint(proto_obj, "hint3", "Hint 3", NULL, g_variant_new("i", 12));
2368-
2369- glib::Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), glib::StealRef());
2370- preview_model_ = dash::Preview::PreviewForVariant(v);
2371-
2372- g_hash_table_unref(action_hints1);
2373- }
2374-
2375- nux::ObjectPtr<nux::BaseWindow> parent_window_;
2376- dash::Preview::Ptr preview_model_;
2377-
2378- previews::Style previews_style;
2379- dash::Style dash_style;
2380- ThumbnailGenerator thumbnail_generator;
2381-};
2382-
2383-TEST_F(TestPreviewApplication, TestCreate)
2384-{
2385- previews::Preview::Ptr preview_view = previews::Preview::PreviewForModel(preview_model_);
2386-
2387- EXPECT_TRUE(dynamic_cast<previews::ApplicationPreview*>(preview_view.GetPointer()) != NULL);
2388-}
2389-
2390-TEST_F(TestPreviewApplication, TestUIValues)
2391-{
2392- MockApplicationPreview::Ptr preview_view(new MockApplicationPreview(preview_model_));
2393-
2394- EXPECT_EQ(preview_view->title_->GetText(), "Application Title &amp; special char");
2395- EXPECT_EQ(preview_view->subtitle_->GetText(), "Application Subtitle &gt; special char");
2396- EXPECT_EQ(preview_view->description_->GetText(), "Application Desctiption &lt; special char");
2397-
2398- EXPECT_EQ(preview_view->action_buttons_.size(), 2u);
2399-
2400- if (preview_view->action_buttons_.size() >= 2)
2401- {
2402- auto iter = preview_view->action_buttons_.begin();
2403- if ((*iter)->Type().IsDerivedFromType(ActionButton::StaticObjectType))
2404- {
2405- ActionButton *action = static_cast<ActionButton*>(*iter);
2406- EXPECT_EQ(action->GetLabel(), "Action 1");
2407- EXPECT_EQ(action->GetExtraText(), "");
2408- }
2409- iter++;
2410- if ((*iter)->Type().IsDerivedFromType(ActionButton::StaticObjectType))
2411- {
2412- ActionButton *action = static_cast<ActionButton*>(*iter);
2413- EXPECT_EQ(action->GetLabel(), "Action 2");
2414- EXPECT_EQ(action->GetExtraText(), "£30.99");
2415- }
2416- }
2417-}
2418-
2419-}
2420diff --git a/tests/test_previews_generic.cpp b/tests/test_previews_generic.cpp
2421deleted file mode 100644
2422index c10c99e..0000000
2423--- a/tests/test_previews_generic.cpp
2424+++ /dev/null
2425@@ -1,129 +0,0 @@
2426-// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
2427-/*
2428- * Copyright (C) 2012 Canonical Ltd
2429- *
2430- * This program is free software: you can redistribute it and/or modify
2431- * it under the terms of the GNU General Public License version 3 as
2432- * published by the Free Software Foundation.
2433- *
2434- * This program is distributed in the hope that it will be useful,
2435- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2436- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2437- * GNU General Public License for more details.
2438- *
2439- * You should have received a copy of the GNU General Public License
2440- * along with this program. If not, see <http://www.gnu.org/licenses/>.
2441- *
2442- * Authored by: Nick Dedekind <nick.dedekinc@canonical.com>
2443- */
2444-
2445-#include <list>
2446-#include <gmock/gmock.h>
2447-using namespace testing;
2448-
2449-#include <Nux/Nux.h>
2450-#include <Nux/BaseWindow.h>
2451-#include <unity-shared/StaticCairoText.h>
2452-#include <unity-shared/DashStyle.h>
2453-#include <unity-shared/PreviewStyle.h>
2454-#include <unity-shared/ThumbnailGenerator.h>
2455-
2456-#include <unity-protocol.h>
2457-#include "UnityCore/GenericPreview.h"
2458-#include "dash/previews/GenericPreview.h"
2459-#include "dash/previews/ActionButton.h"
2460-#include "test_utils.h"
2461-using namespace unity;
2462-using namespace unity::dash;
2463-
2464-namespace
2465-{
2466-
2467-class MockGenericPreview : public previews::GenericPreview
2468-{
2469-public:
2470- typedef nux::ObjectPtr<MockGenericPreview> Ptr;
2471-
2472- MockGenericPreview(dash::Preview::Ptr preview_model)
2473- : GenericPreview(preview_model)
2474- {}
2475-
2476- using GenericPreview::title_;
2477- using GenericPreview::subtitle_;
2478- using GenericPreview::description_;
2479- using GenericPreview::action_buttons_;
2480- using GenericPreview::preview_info_hints_;
2481-};
2482-
2483-class TestPreviewGeneric : public Test
2484-{
2485-public:
2486- TestPreviewGeneric()
2487- : parent_window_(new nux::BaseWindow("TestPreviewGeneric"))
2488- {
2489- glib::Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_generic_preview_new()));
2490-
2491- GHashTable* action_hints1(g_hash_table_new(g_direct_hash, g_direct_equal));
2492- g_hash_table_insert (action_hints1, g_strdup ("extra-text"), g_variant_new_string("2.00"));
2493-
2494- unity_protocol_preview_set_image_source_uri(proto_obj, "http://ia.media-imdb.com/images/M/MV5BMTM3NDM5MzY5Ml5BMl5BanBnXkFtZTcwNjExMDUwOA@@._V1._SY317_.jpg");
2495- unity_protocol_preview_set_title(proto_obj, "Generic Title & special char");
2496- unity_protocol_preview_set_subtitle(proto_obj, "Generic Subtitle > special char");
2497- unity_protocol_preview_set_description(proto_obj, "Generic Desctiption &lt; special char");
2498- unity_protocol_preview_add_action(proto_obj, "action1", "Action 1", NULL, 0);
2499- unity_protocol_preview_add_action_with_hints(proto_obj, "action2", "Action 2", NULL, 0, action_hints1);
2500- unity_protocol_preview_add_info_hint(proto_obj, "hint1", "Hint 1", NULL, g_variant_new("s", "string hint 1"));
2501- unity_protocol_preview_add_info_hint(proto_obj, "hint2", "Hint 2", NULL, g_variant_new("s", "string hint 2"));
2502- unity_protocol_preview_add_info_hint(proto_obj, "hint3", "Hint 3", NULL, g_variant_new("i", 12));
2503-
2504- glib::Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), glib::StealRef());
2505- preview_model_ = dash::Preview::PreviewForVariant(v);
2506-
2507- g_hash_table_unref(action_hints1);
2508- }
2509-
2510- nux::ObjectPtr<nux::BaseWindow> parent_window_;
2511- dash::Preview::Ptr preview_model_;
2512-
2513- previews::Style panel_style;
2514- dash::Style dash_style;
2515- ThumbnailGenerator thumbnail_generator;
2516-};
2517-
2518-TEST_F(TestPreviewGeneric, TestCreate)
2519-{
2520- previews::Preview::Ptr preview_view = previews::Preview::PreviewForModel(preview_model_);
2521-
2522- EXPECT_TRUE(dynamic_cast<previews::GenericPreview*>(preview_view.GetPointer()) != NULL);
2523-}
2524-
2525-TEST_F(TestPreviewGeneric, TestUIValues)
2526-{
2527- MockGenericPreview::Ptr preview_view(new MockGenericPreview(preview_model_));
2528-
2529- EXPECT_EQ(preview_view->title_->GetText(), "Generic Title &amp; special char");
2530- EXPECT_EQ(preview_view->subtitle_->GetText(), "Generic Subtitle &gt; special char");
2531- EXPECT_EQ(preview_view->description_->GetText(), "Generic Desctiption &lt; special char");
2532-
2533- EXPECT_EQ(preview_view->action_buttons_.size(), 2u);
2534-
2535- if (preview_view->action_buttons_.size() >= 2)
2536- {
2537- auto iter = preview_view->action_buttons_.begin();
2538- if ((*iter)->Type().IsDerivedFromType(ActionButton::StaticObjectType))
2539- {
2540- ActionButton *action = static_cast<ActionButton*>(*iter);
2541- EXPECT_EQ(action->GetLabel(), "Action 1");
2542- EXPECT_EQ(action->GetExtraText(), "");
2543- }
2544- iter++;
2545- if ((*iter)->Type().IsDerivedFromType(ActionButton::StaticObjectType))
2546- {
2547- ActionButton *action = static_cast<ActionButton*>(*iter);
2548- EXPECT_EQ(action->GetLabel(), "Action 2");
2549- EXPECT_EQ(action->GetExtraText(), "2.00");
2550- }
2551- }
2552-}
2553-
2554-}
2555diff --git a/tests/test_previews_movie.cpp b/tests/test_previews_movie.cpp
2556deleted file mode 100644
2557index ac3b7e1..0000000
2558--- a/tests/test_previews_movie.cpp
2559+++ /dev/null
2560@@ -1,149 +0,0 @@
2561-// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
2562-/*
2563- * Copyright (C) 2012 Canonical Ltd
2564- *
2565- * This program is free software: you can redistribute it and/or modify
2566- * it under the terms of the GNU General Public License version 3 as
2567- * published by the Free Software Foundation.
2568- *
2569- * This program is distributed in the hope that it will be useful,
2570- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2571- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2572- * GNU General Public License for more details.
2573- *
2574- * You should have received a copy of the GNU General Public License
2575- * along with this program. If not, see <http://www.gnu.org/licenses/>.
2576- *
2577- * Authored by: Nick Dedekind <nick.dedekinc@canonical.com>
2578- */
2579-
2580-#include <list>
2581-#include <gmock/gmock.h>
2582-using namespace testing;
2583-
2584-#include <Nux/Nux.h>
2585-#include <Nux/BaseWindow.h>
2586-#include <unity-shared/StaticCairoText.h>
2587-#include <unity-shared/DashStyle.h>
2588-#include <unity-shared/PreviewStyle.h>
2589-#include <unity-shared/ThumbnailGenerator.h>
2590-
2591-#include <unity-protocol.h>
2592-#include "UnityCore/MoviePreview.h"
2593-#include "dash/previews/MoviePreview.h"
2594-#include "dash/previews/PreviewInfoHintWidget.h"
2595-#include "dash/previews/PreviewRatingsWidget.h"
2596-#include "dash/previews/ActionButton.h"
2597-#include "test_utils.h"
2598-using namespace unity;
2599-using namespace unity::dash;
2600-
2601-namespace
2602-{
2603-
2604-class MockMoviePreview : public previews::MoviePreview
2605-{
2606-public:
2607- typedef nux::ObjectPtr<MockMoviePreview> Ptr;
2608-
2609- MockMoviePreview(dash::Preview::Ptr preview_model)
2610- : MoviePreview(preview_model)
2611- {}
2612-
2613- using MoviePreview::title_;
2614- using MoviePreview::subtitle_;
2615- using MoviePreview::description_;
2616- using MoviePreview::action_buttons_;
2617- using MoviePreview::preview_info_hints_;
2618- using MoviePreview::rating_;
2619-};
2620-
2621-class TestPreviewMovie : public Test
2622-{
2623-public:
2624- TestPreviewMovie()
2625- : parent_window_(new nux::BaseWindow("TestPreviewMovie")) {}
2626-
2627- void create_preview_model(double rating)
2628- {
2629- glib::Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_movie_preview_new()));
2630-
2631- GHashTable* action_hints1(g_hash_table_new(g_direct_hash, g_direct_equal));
2632- g_hash_table_insert (action_hints1, g_strdup ("extra-text"), g_variant_new_string("£1.00"));
2633-
2634- unity_protocol_movie_preview_set_rating(UNITY_PROTOCOL_MOVIE_PREVIEW(proto_obj.RawPtr()), rating);
2635- unity_protocol_movie_preview_set_num_ratings(UNITY_PROTOCOL_MOVIE_PREVIEW(proto_obj.RawPtr()), 12);
2636-
2637- unity_protocol_preview_set_image_source_uri(proto_obj, "http://ia.media-imdb.com/images/M/MV5BMTM3NDM5MzY5Ml5BMl5BanBnXkFtZTcwNjExMDUwOA@@._V1._SY317_.jpg");
2638- unity_protocol_preview_set_title(proto_obj, "Movie Title & special char");
2639- unity_protocol_preview_set_subtitle(proto_obj, "Movie Subtitle > special char");
2640- unity_protocol_preview_set_description(proto_obj, "Movie Desctiption &lt; special char");
2641- unity_protocol_preview_add_action(proto_obj, "action1", "Action 1", NULL, 0);
2642- unity_protocol_preview_add_action_with_hints(proto_obj, "action2", "Action 2", NULL, 0, action_hints1);
2643- unity_protocol_preview_add_info_hint(proto_obj, "hint1", "Hint 1", NULL, g_variant_new("s", "string hint 1"));
2644- unity_protocol_preview_add_info_hint(proto_obj, "hint2", "Hint 2", NULL, g_variant_new("s", "string hint 2"));
2645- unity_protocol_preview_add_info_hint(proto_obj, "hint3", "Hint 3", NULL, g_variant_new("i", 12));
2646-
2647- glib::Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), glib::StealRef());
2648- preview_model_ = dash::Preview::PreviewForVariant(v);
2649-
2650- g_hash_table_unref(action_hints1);
2651- }
2652-
2653- nux::ObjectPtr<nux::BaseWindow> parent_window_;
2654- dash::Preview::Ptr preview_model_;
2655-
2656- previews::Style panel_style;
2657- dash::Style dash_style;
2658- ThumbnailGenerator thumbnail_generator;
2659-};
2660-
2661-TEST_F(TestPreviewMovie, TestCreate)
2662-{
2663- create_preview_model(0.8);
2664- previews::Preview::Ptr preview_view = previews::Preview::PreviewForModel(preview_model_);
2665-
2666- EXPECT_TRUE(dynamic_cast<previews::MoviePreview*>(preview_view.GetPointer()) != NULL);
2667-}
2668-
2669-TEST_F(TestPreviewMovie, TestUIValues)
2670-{
2671- create_preview_model(0.8);
2672- MockMoviePreview::Ptr preview_view(new MockMoviePreview(preview_model_));
2673-
2674- EXPECT_EQ(preview_view->title_->GetText(), "Movie Title &amp; special char");
2675- EXPECT_EQ(preview_view->subtitle_->GetText(), "Movie Subtitle &gt; special char");
2676- EXPECT_EQ(preview_view->description_->GetText(), "Movie Desctiption &lt; special char");
2677-
2678- EXPECT_EQ(preview_view->rating_->GetRating(), 0.8f);
2679- EXPECT_EQ(preview_view->action_buttons_.size(), 2u);
2680-
2681- if (preview_view->action_buttons_.size() >= 2)
2682- {
2683- auto iter = preview_view->action_buttons_.begin();
2684- if ((*iter)->Type().IsDerivedFromType(ActionButton::StaticObjectType))
2685- {
2686- ActionButton *action = static_cast<ActionButton*>(*iter);
2687- EXPECT_EQ(action->GetLabel(), "Action 1");
2688- EXPECT_EQ(action->GetExtraText(), "");
2689- }
2690- iter++;
2691- if ((*iter)->Type().IsDerivedFromType(ActionButton::StaticObjectType))
2692- {
2693- ActionButton *action = static_cast<ActionButton*>(*iter);
2694- EXPECT_EQ(action->GetLabel(), "Action 2");
2695- EXPECT_EQ(action->GetExtraText(), "£1.00");
2696- }
2697- }
2698-}
2699-
2700-TEST_F(TestPreviewMovie, TestHideRatings)
2701-{
2702- create_preview_model(-1);
2703- MockMoviePreview::Ptr preview_view(new MockMoviePreview(preview_model_));
2704-
2705- EXPECT_EQ(preview_view->rating_, NULL);
2706-}
2707-
2708-
2709-}
2710diff --git a/tests/test_previews_music.cpp b/tests/test_previews_music.cpp
2711deleted file mode 100644
2712index 4398ec2..0000000
2713--- a/tests/test_previews_music.cpp
2714+++ /dev/null
2715@@ -1,131 +0,0 @@
2716-// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
2717-/*
2718- * Copyright (C) 2012 Canonical Ltd
2719- *
2720- * This program is free software: you can redistribute it and/or modify
2721- * it under the terms of the GNU General Public License version 3 as
2722- * published by the Free Software Foundation.
2723- *
2724- * This program is distributed in the hope that it will be useful,
2725- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2726- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2727- * GNU General Public License for more details.
2728- *
2729- * You should have received a copy of the GNU General Public License
2730- * along with this program. If not, see <http://www.gnu.org/licenses/>.
2731- *
2732- * Authored by: Nick Dedekind <nick.dedekinc@canonical.com>
2733- */
2734-
2735-#include <list>
2736-#include <gmock/gmock.h>
2737-using namespace testing;
2738-
2739-#include <Nux/Nux.h>
2740-#include <Nux/BaseWindow.h>
2741-#include <unity-shared/StaticCairoText.h>
2742-#include <unity-shared/DashStyle.h>
2743-#include <unity-shared/PreviewStyle.h>
2744-#include <unity-shared/ThumbnailGenerator.h>
2745-
2746-#include <unity-protocol.h>
2747-#include "UnityCore/MusicPreview.h"
2748-#include "dash/previews/MusicPreview.h"
2749-#include "dash/previews/PreviewInfoHintWidget.h"
2750-#include "dash/previews/PreviewRatingsWidget.h"
2751-#include "dash/previews/ActionButton.h"
2752-#include "test_utils.h"
2753-using namespace unity;
2754-using namespace unity::dash;
2755-
2756-namespace
2757-{
2758-
2759-class MockMusicPreview : public previews::MusicPreview
2760-{
2761-public:
2762- typedef nux::ObjectPtr<MockMusicPreview> Ptr;
2763-
2764- MockMusicPreview(dash::Preview::Ptr preview_model)
2765- : MusicPreview(preview_model)
2766- {}
2767-
2768- using MusicPreview::title_;
2769- using MusicPreview::subtitle_;
2770- using MusicPreview::action_buttons_;
2771- using MusicPreview::preview_info_hints_;
2772-};
2773-
2774-class TestPreviewMusic : public Test
2775-{
2776-public:
2777- TestPreviewMusic()
2778- : parent_window_(new nux::BaseWindow("TestPreviewMusic"))
2779- {
2780- glib::Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_music_preview_new()));
2781-
2782- GHashTable* action_hints1(g_hash_table_new(g_direct_hash, g_direct_equal));
2783- g_hash_table_insert (action_hints1, g_strdup ("extra-text"), g_variant_new_string("£3.99"));
2784-
2785- unity_protocol_preview_set_image_source_uri(proto_obj, "http://ia.media-imdb.com/images/M/MV5BMTM3NDM5MzY5Ml5BMl5BanBnXkFtZTcwNjExMDUwOA@@._V1._SY317_.jpg");
2786- unity_protocol_preview_set_title(proto_obj, "Music Title & special char");
2787- unity_protocol_preview_set_subtitle(proto_obj, "Music Subtitle > special char");
2788- unity_protocol_preview_set_description(proto_obj, "Music Desctiption &lt; special char");
2789- unity_protocol_preview_add_action(proto_obj, "action1", "Action 1", NULL, 0);
2790- unity_protocol_preview_add_action_with_hints(proto_obj, "action2", "Action 2", NULL, 0, action_hints1);
2791- unity_protocol_preview_add_action(proto_obj, "action3", "Action 3", NULL, 0);
2792- unity_protocol_preview_add_action(proto_obj, "action4", "Action 4", NULL, 0);
2793- unity_protocol_preview_add_info_hint(proto_obj, "hint1", "Hint 1", NULL, g_variant_new("s", "string hint 1"));
2794- unity_protocol_preview_add_info_hint(proto_obj, "hint2", "Hint 2", NULL, g_variant_new("s", "string hint 2"));
2795- unity_protocol_preview_add_info_hint(proto_obj, "hint3", "Hint 3", NULL, g_variant_new("i", 12));
2796-
2797- glib::Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), glib::StealRef());
2798- preview_model_ = dash::Preview::PreviewForVariant(v);
2799-
2800- g_hash_table_unref(action_hints1);
2801- }
2802-
2803- nux::ObjectPtr<nux::BaseWindow> parent_window_;
2804- dash::Preview::Ptr preview_model_;
2805-
2806- previews::Style panel_style;
2807- dash::Style dash_style;
2808- ThumbnailGenerator thumbnail_generator;
2809-};
2810-
2811-TEST_F(TestPreviewMusic, TestCreate)
2812-{
2813- previews::Preview::Ptr preview_view = previews::Preview::PreviewForModel(preview_model_);
2814-
2815- EXPECT_TRUE(dynamic_cast<previews::MusicPreview*>(preview_view.GetPointer()) != NULL);
2816-}
2817-
2818-TEST_F(TestPreviewMusic, TestUIValues)
2819-{
2820- MockMusicPreview::Ptr preview_view(new MockMusicPreview(preview_model_));
2821-
2822- EXPECT_EQ(preview_view->title_->GetText(), "Music Title &amp; special char");
2823- EXPECT_EQ(preview_view->subtitle_->GetText(), "Music Subtitle &gt; special char");
2824-
2825- EXPECT_EQ(preview_view->action_buttons_.size(), 4u);
2826-
2827- if (preview_view->action_buttons_.size() >= 2)
2828- {
2829- auto iter = preview_view->action_buttons_.begin();
2830- if ((*iter)->Type().IsDerivedFromType(ActionButton::StaticObjectType))
2831- {
2832- ActionButton *action = static_cast<ActionButton*>(*iter);
2833- EXPECT_EQ(action->GetLabel(), "Action 1");
2834- EXPECT_EQ(action->GetExtraText(), "");
2835- }
2836- iter++;
2837- if ((*iter)->Type().IsDerivedFromType(ActionButton::StaticObjectType))
2838- {
2839- ActionButton *action = static_cast<ActionButton*>(*iter);
2840- EXPECT_EQ(action->GetLabel(), "Action 2");
2841- EXPECT_EQ(action->GetExtraText(), "£3.99");
2842- }
2843- }
2844-}
2845-
2846-}
2847diff --git a/tests/test_previews_music_payment.cpp b/tests/test_previews_music_payment.cpp
2848deleted file mode 100644
2849index daa6a3b..0000000
2850--- a/tests/test_previews_music_payment.cpp
2851+++ /dev/null
2852@@ -1,150 +0,0 @@
2853-// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
2854-/*
2855- * Copyright (C) 2012-2013 Canonical Ltd
2856- *
2857- * This program is free software: you can redistribute it and/or modify
2858- * it under the terms of the GNU General Public License version 3 as
2859- * published by the Free Software Foundation.
2860- *
2861- * This program is distributed in the hope that it will be useful,
2862- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2863- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2864- * GNU General Public License for more details.
2865- *
2866- * You should have received a copy of the GNU General Public License
2867- * along with this program. If not, see <http://www.gnu.org/licenses/>.
2868- *
2869- * Authored by: Manuel de la Pena <manuel.delapena@canonical.com>
2870- */
2871-
2872-#include <list>
2873-#include <gmock/gmock.h>
2874-
2875-#include <Nux/Nux.h>
2876-#include <Nux/VLayout.h>
2877-#include <Nux/BaseWindow.h>
2878-#include <unity-shared/StaticCairoText.h>
2879-#include <unity-shared/CoverArt.h>
2880-#include <unity-shared/DashStyle.h>
2881-#include <unity-shared/PreviewStyle.h>
2882-#include <unity-shared/ThumbnailGenerator.h>
2883-
2884-#include <unity-protocol.h>
2885-#include "dash/previews/MusicPaymentPreview.h"
2886-#include "test_utils.h"
2887-
2888-using namespace testing;
2889-
2890-namespace unity
2891-{
2892-
2893-namespace dash
2894-{
2895-
2896-namespace previews
2897-{
2898-
2899-class MockedMusicPaymentPreview : public MusicPaymentPreview
2900-{
2901-public:
2902- typedef nux::ObjectPtr<MockedMusicPaymentPreview> Ptr;
2903-
2904- MockedMusicPaymentPreview(dash::Preview::Ptr preview_model)
2905- : MusicPaymentPreview(preview_model)
2906- {}
2907-
2908- using MusicPaymentPreview::image_;
2909- using MusicPaymentPreview::intro_;
2910- using MusicPaymentPreview::title_;
2911- using MusicPaymentPreview::subtitle_;
2912- using MusicPaymentPreview::email_label_;
2913- using MusicPaymentPreview::email_;
2914- using MusicPaymentPreview::payment_label_;
2915- using MusicPaymentPreview::payment_;
2916- using MusicPaymentPreview::password_label_;
2917- using MusicPaymentPreview::password_entry_;
2918- using MusicPaymentPreview::purchase_hint_;
2919- using MusicPaymentPreview::purchase_prize_;
2920- using MusicPaymentPreview::purchase_type_;
2921- using MusicPaymentPreview::change_payment_;
2922- using MusicPaymentPreview::forgotten_password_;
2923- using MusicPaymentPreview::error_label_;
2924- using MusicPaymentPreview::form_layout_;
2925- using MusicPaymentPreview::SetupViews;
2926-};
2927-
2928-class TestMusicPaymentPreview : public ::testing::Test
2929-{
2930- protected:
2931- TestMusicPaymentPreview() :
2932- Test(),
2933- parent_window_(new nux::BaseWindow("TestPreviewMusicPayment"))
2934- {
2935- title = "Turning Japanese";
2936- subtitle = "The vapors";
2937- header = "Hi test, you purchased in the past from Ubuntu One.";
2938- email = "test@canonical.com";
2939- payment_method = "*** *** ** 12";
2940- purchase_prize = "65$";
2941- purchase_type = "Mp3";
2942- preview_type = UNITY_PROTOCOL_PREVIEW_PAYMENT_TYPE_MUSIC;
2943-
2944- glib::Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_payment_preview_new()));
2945-
2946- unity_protocol_preview_set_title(proto_obj, title.c_str());
2947- unity_protocol_preview_set_subtitle(proto_obj, subtitle.c_str());
2948- unity_protocol_preview_add_action(proto_obj, "change_payment_method", "Change payment", NULL, 0);
2949- unity_protocol_preview_add_action(proto_obj, "forgot_password", "Forgot password", NULL, 0);
2950- unity_protocol_preview_add_action(proto_obj, "cancel_purchase", "Cancel", NULL, 0);
2951- unity_protocol_preview_add_action(proto_obj, "purchase_album", "Purchase", NULL, 0);
2952-
2953-
2954- unity_protocol_payment_preview_set_header(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), header.c_str());
2955- unity_protocol_payment_preview_set_email(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), email.c_str());
2956- unity_protocol_payment_preview_set_payment_method(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), payment_method.c_str());
2957- unity_protocol_payment_preview_set_purchase_prize(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), purchase_prize.c_str());
2958- unity_protocol_payment_preview_set_purchase_type(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), purchase_type.c_str());
2959- unity_protocol_payment_preview_set_preview_type(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), preview_type);
2960-
2961- glib::Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), glib::StealRef());
2962-
2963- preview_model = dash::Preview::PreviewForVariant(v);
2964- }
2965-
2966- nux::ObjectPtr<nux::BaseWindow> parent_window_;
2967- dash::Preview::Ptr preview_model;
2968-
2969- // testing data
2970- std::string title;
2971- std::string subtitle;
2972- std::string header;
2973- std::string email;
2974- std::string payment_method;
2975- std::string purchase_prize;
2976- std::string purchase_type;
2977- UnityProtocolPreviewPaymentType preview_type;
2978-
2979- // needed for styles
2980- previews::Style previews_style;
2981- dash::Style dash_style;
2982-};
2983-
2984-TEST_F(TestMusicPaymentPreview, TestContentLoading)
2985-{
2986- MockedMusicPaymentPreview::Ptr preview_view(new MockedMusicPaymentPreview(preview_model));
2987-
2988- EXPECT_EQ(preview_view->title_->GetText(), title);
2989- EXPECT_EQ(preview_view->subtitle_->GetText(), subtitle);
2990- EXPECT_EQ(preview_view->intro_->GetText(), header);
2991- EXPECT_EQ(preview_view->email_->GetText(), email);
2992- EXPECT_EQ(preview_view->payment_->GetText(), payment_method);
2993- EXPECT_EQ(preview_view->purchase_type_->GetText(), purchase_type);
2994- EXPECT_EQ(preview_view->purchase_prize_->GetText(), purchase_prize);
2995-}
2996-
2997-
2998-} // previews
2999-
3000-} // dash
3001-
3002-} // unity
3003diff --git a/tests/test_previews_payment.cpp b/tests/test_previews_payment.cpp
3004deleted file mode 100644
3005index 53f5417..0000000
3006--- a/tests/test_previews_payment.cpp
3007+++ /dev/null
3008@@ -1,184 +0,0 @@
3009-// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
3010-/*
3011- * Copyright (C) 2012-2013 Canonical Ltd
3012- *
3013- * This program is free software: you can redistribute it and/or modify
3014- * it under the terms of the GNU General Public License version 3 as
3015- * published by the Free Software Foundation.
3016- *
3017- * This program is distributed in the hope that it will be useful,
3018- * but WITHOUT ANY WARRANTY; without even the implied warranty of
3019- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3020- * GNU General Public License for more details.
3021- *
3022- * You should have received a copy of the GNU General Public License
3023- * along with this program. If not, see <http://www.gnu.org/licenses/>.
3024- *
3025- * Authored by: Manuel de la Pena <manuel.delapena@canonical.com>
3026- */
3027-#include <list>
3028-#include <gmock/gmock.h>
3029-
3030-#include <Nux/Nux.h>
3031-#include <Nux/Layout.h>
3032-#include <Nux/VLayout.h>
3033-#include <Nux/BaseWindow.h>
3034-#include <unity-shared/StaticCairoText.h>
3035-#include <unity-shared/DashStyle.h>
3036-#include <unity-shared/PreviewStyle.h>
3037-#include <unity-shared/ThumbnailGenerator.h>
3038-#include <unity-shared/CoverArt.h>
3039-
3040-#include <unity-protocol.h>
3041-#include "dash/previews/PaymentPreview.h"
3042-#include "dash/previews/ActionButton.h"
3043-#include "dash/previews/ActionLink.h"
3044-#include "test_utils.h"
3045-
3046-using namespace testing;
3047-using ::testing::Return;
3048-
3049-namespace unity
3050-{
3051-
3052-namespace dash
3053-{
3054-
3055-namespace previews
3056-{
3057-
3058-class NonAbstractPreview : public PaymentPreview
3059-{
3060-public:
3061- NonAbstractPreview(dash::Preview::Ptr preview_model)
3062- : PaymentPreview(preview_model)
3063- {}
3064-
3065- virtual nux::Layout* GetTitle()
3066- {
3067- return new nux::VLayout();
3068- }
3069-
3070- virtual nux::Layout* GetPrice()
3071- {
3072- return new nux::VLayout();
3073- }
3074-
3075- virtual nux::Layout* GetBody()
3076- {
3077- return new nux::VLayout();
3078- }
3079-
3080- virtual nux::Layout* GetFooter()
3081- {
3082- return new nux::VLayout();
3083- }
3084-
3085- virtual void OnActionActivated(ActionButton* button, std::string const& id)
3086- {
3087- // do nothing
3088- }
3089-
3090- virtual void OnActionLinkActivated(ActionLink* link, std::string const& id)
3091- {
3092- // do nothing
3093- }
3094-
3095- virtual void PreLayoutManagement()
3096- {
3097- // do nothing
3098- }
3099-
3100- virtual void LoadActions()
3101- {
3102- // do nothing
3103- }
3104-
3105- using PaymentPreview::GetHeader;
3106- using PaymentPreview::full_data_layout_;
3107- using PaymentPreview::content_data_layout_;
3108- using PaymentPreview::overlay_layout_;
3109- using PaymentPreview::header_layout_;
3110- using PaymentPreview::body_layout_;
3111- using PaymentPreview::footer_layout_;
3112- using PaymentPreview::SetupViews;
3113-
3114-};
3115-
3116-class MockedPaymentPreview : public NonAbstractPreview
3117-{
3118-public:
3119- typedef nux::ObjectPtr<MockedPaymentPreview> Ptr;
3120-
3121- MockedPaymentPreview(dash::Preview::Ptr preview_model)
3122- : NonAbstractPreview(preview_model)
3123- {}
3124-
3125- // Mock methods that should be implemented so that we can assert that they are
3126- // called in the correct moments.
3127- MOCK_METHOD0(GetTitle, nux::Layout*());
3128- MOCK_METHOD0(GetPrice, nux::Layout*());
3129- MOCK_METHOD0(GetBody, nux::Layout*());
3130- MOCK_METHOD0(GetFooter, nux::Layout*());
3131- MOCK_METHOD2(OnActionActivated, void(unity::dash::ActionButton*, std::string));
3132- MOCK_METHOD2(OnActionLinkActivated, void(unity::dash::ActionLink*, std::string));
3133- MOCK_METHOD0(PreLayoutManagement, void());
3134- MOCK_METHOD0(LoadActions, void());
3135-
3136-};
3137-
3138-class TestPaymentPreview : public ::testing::Test
3139-{
3140- protected:
3141- TestPaymentPreview() : Test()
3142- {
3143- glib::Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_payment_preview_new()));
3144- // we are not testing how the info is really used is more asserting the method calls, we do not add any data then
3145- glib::Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), glib::StealRef());
3146-
3147- preview_model = dash::Preview::PreviewForVariant(v);
3148-
3149- preview = new MockedPaymentPreview(preview_model);
3150-
3151- }
3152- nux::ObjectPtr<MockedPaymentPreview> preview;
3153- dash::Preview::Ptr preview_model;
3154-
3155- // needed for styles
3156- previews::Style previews_style;
3157- dash::Style dash_style;
3158-};
3159-
3160-TEST_F(TestPaymentPreview, GetHeaderCallsCorrectMethods)
3161-{
3162- ON_CALL(*preview.GetPointer(), GetTitle()).WillByDefault(Return(new nux::VLayout()));
3163- EXPECT_CALL(*preview.GetPointer(), GetTitle()).Times(1);
3164-
3165- ON_CALL(*preview.GetPointer(), GetPrice()).WillByDefault(Return(new nux::VLayout()));
3166- EXPECT_CALL(*preview.GetPointer(), GetPrice()).Times(1);
3167-
3168- preview->GetHeader()->UnReference();
3169-}
3170-
3171-TEST_F(TestPaymentPreview, SetupViewsCallCorrectMethods)
3172-{
3173- ON_CALL(*preview.GetPointer(), GetTitle()).WillByDefault(Return(new nux::VLayout()));
3174- EXPECT_CALL(*preview.GetPointer(), GetTitle()).Times(1);
3175-
3176- ON_CALL(*preview.GetPointer(), GetPrice()).WillByDefault(Return(new nux::VLayout()));
3177- EXPECT_CALL(*preview.GetPointer(), GetPrice()).Times(1);
3178-
3179- ON_CALL(*preview.GetPointer(), GetBody()).WillByDefault(Return(new nux::VLayout()));
3180- EXPECT_CALL(*preview.GetPointer(), GetBody()).Times(1);
3181-
3182- ON_CALL(*preview.GetPointer(), GetFooter()).WillByDefault(Return(new nux::VLayout()));
3183- EXPECT_CALL(*preview.GetPointer(), GetFooter()).Times(1);
3184-
3185- preview->SetupViews();
3186-}
3187-
3188-} // previews
3189-
3190-} // dash
3191-
3192-} // unity
3193diff --git a/tests/test_previews_social.cpp b/tests/test_previews_social.cpp
3194deleted file mode 100644
3195index 76b42e0..0000000
3196--- a/tests/test_previews_social.cpp
3197+++ /dev/null
3198@@ -1,107 +0,0 @@
3199-// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
3200-/*
3201- * Copyright (C) 2012 Canonical Ltd
3202- *
3203- * This program is free software: you can redistribute it and/or modify
3204- * it under the terms of the GNU General Public License version 3 as
3205- * published by the Free Software Foundation.
3206- *
3207- * This program is distributed in the hope that it will be useful,
3208- * but WITHOUT ANY WARRANTY; without even the implied warranty of
3209- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3210- * GNU General Public License for more details.
3211- *
3212- * You should have received a copy of the GNU General Public License
3213- * along with this program. If not, see <http://www.gnu.org/licenses/>.
3214- *
3215- * Authored by: Ken VanDine <ken.vandine@canonical.com>
3216- */
3217-
3218-#include <list>
3219-#include <gmock/gmock.h>
3220-using namespace testing;
3221-
3222-#include <Nux/Nux.h>
3223-#include <Nux/BaseWindow.h>
3224-#include <unity-shared/StaticCairoText.h>
3225-#include <unity-shared/DashStyle.h>
3226-#include <unity-shared/PreviewStyle.h>
3227-#include <unity-shared/ThumbnailGenerator.h>
3228-
3229-#include <unity-protocol.h>
3230-#include "UnityCore/SocialPreview.h"
3231-#include "dash/previews/SocialPreview.h"
3232-#include "dash/previews/SocialPreviewContent.h"
3233-#include "dash/previews/SocialPreviewComments.h"
3234-#include "dash/previews/PreviewInfoHintWidget.h"
3235-#include "dash/previews/PreviewRatingsWidget.h"
3236-#include "test_utils.h"
3237-using namespace unity;
3238-using namespace unity::dash;
3239-
3240-namespace
3241-{
3242-
3243-class MockSocialPreview : public previews::SocialPreview
3244-{
3245-public:
3246- typedef nux::ObjectPtr<MockSocialPreview> Ptr;
3247-
3248- MockSocialPreview(dash::Preview::Ptr preview_model)
3249- : SocialPreview(preview_model)
3250- {}
3251-
3252- using SocialPreview::title_;
3253- using SocialPreview::subtitle_;
3254- using SocialPreview::content_;
3255- using SocialPreview::action_buttons_;
3256- using SocialPreview::preview_info_hints_;
3257-};
3258-
3259-class TestPreviewSocial : public Test
3260-{
3261-public:
3262- TestPreviewSocial()
3263- : parent_window_(new nux::BaseWindow("TestPreviewSocial"))
3264- {
3265- glib::Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_social_preview_new()));
3266-
3267- unity_protocol_preview_set_image_source_uri(proto_obj, "http://ia.media-imdb.com/images/M/MV5BMTM3NDM5MzY5Ml5BMl5BanBnXkFtZTcwNjExMDUwOA@@._V1._SY317_.jpg");
3268- unity_protocol_preview_set_title(proto_obj, "Social Title & special char");
3269- unity_protocol_preview_set_subtitle(proto_obj, "Social Subtitle > special char");
3270- unity_protocol_preview_set_description(proto_obj, "Social Desctiption &lt; special char");
3271- unity_protocol_preview_add_action(proto_obj, "action1", "Action 1", NULL, 0);
3272- unity_protocol_preview_add_action(proto_obj, "action2", "Action 2", NULL, 0);
3273- unity_protocol_preview_add_info_hint(proto_obj, "hint1", "Hint 1", NULL, g_variant_new("s", "string hint 1"));
3274- unity_protocol_preview_add_info_hint(proto_obj, "hint2", "Hint 2", NULL, g_variant_new("s", "string hint 2"));
3275- unity_protocol_preview_add_info_hint(proto_obj, "hint3", "Hint 3", NULL, g_variant_new("i", 12));
3276-
3277- glib::Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), glib::StealRef());
3278- preview_model_ = dash::Preview::PreviewForVariant(v);
3279- }
3280-
3281- nux::ObjectPtr<nux::BaseWindow> parent_window_;
3282- dash::Preview::Ptr preview_model_;
3283-
3284- previews::Style panel_style;
3285- dash::Style dash_style;
3286- ThumbnailGenerator thumbnail_generator;
3287-};
3288-
3289-TEST_F(TestPreviewSocial, TestCreate)
3290-{
3291- previews::Preview::Ptr preview_view = previews::Preview::PreviewForModel(preview_model_);
3292-
3293- EXPECT_TRUE(dynamic_cast<previews::SocialPreview*>(preview_view.GetPointer()) != NULL);
3294-}
3295-
3296-TEST_F(TestPreviewSocial, TestUIValues)
3297-{
3298- MockSocialPreview::Ptr preview_view(new MockSocialPreview(preview_model_));
3299-
3300- EXPECT_EQ(preview_view->title_->GetText(), "Social Title &amp; special char");
3301- EXPECT_EQ(preview_view->subtitle_->GetText(), "Social Subtitle &gt; special char");
3302- EXPECT_EQ(preview_view->action_buttons_.size(), 2u);
3303-}
3304-
3305-}
3306diff --git a/unity-shared/BackgroundEffectHelper.cpp b/unity-shared/BackgroundEffectHelper.cpp
3307index 507c3ea..274f184 100644
3308--- a/unity-shared/BackgroundEffectHelper.cpp
3309+++ b/unity-shared/BackgroundEffectHelper.cpp
3310@@ -27,7 +27,7 @@ namespace
3311 DECLARE_LOGGER(logger, "unity.background_effect_helper");
3312
3313 const int BLUR_RADIUS = 3;
3314-const float sigma_high = 5.0f;
3315+const float sigma_high = 10.0f;
3316 const float sigma_med = 3.0f;
3317 const float sigma_low = 1.0f;
3318 }
3319diff --git a/unity-shared/CMakeLists.txt b/unity-shared/CMakeLists.txt
3320index eddc807..673c7dd 100644
3321--- a/unity-shared/CMakeLists.txt
3322+++ b/unity-shared/CMakeLists.txt
3323@@ -30,9 +30,9 @@ set (UNITY_SHARED_SOURCES
3324 DesktopApplicationManager.cpp
3325 EMConverter.cpp
3326 ExpanderView.cpp
3327- FileManager.cpp
3328 GnomeFileManager.cpp
3329 FontSettings.cpp
3330+ FileManager.cpp
3331 GraphicsUtils.cpp
3332 IMTextEntry.cpp
3333 IconLoader.cpp
3334diff --git a/unity-shared/DashStyle.cpp b/unity-shared/DashStyle.cpp
3335index 66ed48c..b0c3eac 100755
3336--- a/unity-shared/DashStyle.cpp
3337+++ b/unity-shared/DashStyle.cpp
3338@@ -374,35 +374,8 @@ Style::Impl::~Impl()
3339
3340 void Style::Impl::Refresh()
3341 {
3342- const char* const SAMPLE_MAX_TEXT = "Chromium Web Browser";
3343-
3344- nux::CairoGraphics util_cg(CAIRO_FORMAT_ARGB32, 1, 1);
3345- cairo_t* cr = util_cg.GetInternalContext();
3346-
3347- auto const& font = theme::Settings::Get()->font();
3348- PangoFontDescription* desc = ::pango_font_description_from_string(font.c_str());
3349- ::pango_font_description_set_weight(desc, PANGO_WEIGHT_NORMAL);
3350- ::pango_font_description_set_size(desc, 9 * PANGO_SCALE);
3351-
3352- glib::Object<PangoLayout> layout(::pango_cairo_create_layout(cr));
3353- ::pango_layout_set_font_description(layout, desc);
3354- ::pango_layout_set_text(layout, SAMPLE_MAX_TEXT, -1);
3355-
3356- PangoContext* cxt = ::pango_layout_get_context(layout);
3357-
3358- GdkScreen* screen = ::gdk_screen_get_default();
3359- ::pango_cairo_context_set_font_options(cxt, ::gdk_screen_get_font_options(screen));
3360- ::pango_cairo_context_set_resolution(cxt, 96.0 * Settings::Instance().font_scaling());
3361- ::pango_layout_context_changed(layout);
3362-
3363- PangoRectangle log_rect;
3364- ::pango_layout_get_pixel_extents(layout, NULL, &log_rect);
3365- text_width_ = log_rect.width;
3366- text_height_ = log_rect.height;
3367-
3368- owner_->changed.emit();
3369-
3370- pango_font_description_free(desc);
3371+ text_width_ = 56;
3372+ text_height_ = 12;
3373 }
3374
3375 void Style::Impl::UpdateFormFactor(FormFactor form_factor)
3376@@ -2186,6 +2159,11 @@ BaseTexturePtr Style::GetDashRightCornerMask(double scale) const
3377 return pimpl->LoadScaledTexture("dash_top_right_corner_mask", scale);
3378 }
3379
3380+BaseTexturePtr Style::GetEmpty(double scale) const
3381+{
3382+ return pimpl->LoadScaledTexture("empty", scale);
3383+}
3384+
3385 BaseTexturePtr Style::GetSearchMagnifyIcon(double scale) const
3386 {
3387 return pimpl->LoadScaledTexture("search_magnify", scale);
3388@@ -2236,33 +2214,33 @@ nux::Color const& Style::GetTextColor() const
3389
3390 RawPixel Style::GetTileGIconSize() const
3391 {
3392- return 64;
3393+ return 48;
3394 }
3395
3396 RawPixel Style::GetTileImageSize() const
3397 {
3398- return 96;
3399+ return 48;
3400 }
3401
3402 RawPixel Style::GetTileWidth() const
3403 {
3404- return std::max(pimpl->text_width_, 150);
3405+ return std::max(pimpl->text_width_, 106);
3406 }
3407
3408 RawPixel Style::GetTileHeight() const
3409 {
3410 return std::max(GetTileImageSize() + (pimpl->text_height_ * 2) + 15,
3411- GetTileImageSize() + 32); // magic design numbers.
3412+ GetTileImageSize() + 80); // magic design numbers.
3413 }
3414
3415 RawPixel Style::GetTileIconHightlightHeight() const
3416 {
3417- return 106;
3418+ return 48;
3419 }
3420
3421 RawPixel Style::GetTileIconHightlightWidth() const
3422 {
3423- return 106;
3424+ return 48;
3425 }
3426
3427 RawPixel Style::GetHomeTileIconSize() const
3428@@ -2363,7 +2341,7 @@ RawPixel Style::GetHSeparatorSize() const
3429
3430 RawPixel Style::GetFilterBarWidth() const
3431 {
3432- return 300;
3433+ return 250;
3434 }
3435
3436 RawPixel Style::GetFilterBarLeftPadding() const
3437@@ -2418,7 +2396,7 @@ RawPixel Style::GetFilterHighlightPadding() const
3438
3439 RawPixel Style::GetSpaceBetweenFilterWidgets() const
3440 {
3441- return 12;
3442+ return 6;
3443 }
3444
3445 RawPixel Style::GetAllButtonHeight() const
3446@@ -2498,12 +2476,12 @@ RawPixel Style::GetPlacesGroupTopSpace() const
3447
3448 RawPixel Style::GetPlacesGroupResultTopPadding() const
3449 {
3450- return 2;
3451+ return 19;
3452 }
3453
3454 RawPixel Style::GetPlacesGroupResultLeftPadding() const
3455 {
3456- return 25;
3457+ return 19;
3458 }
3459
3460 RawPixel Style::GetCategoryHeaderLeftPadding() const
3461diff --git a/unity-shared/DashStyle.h b/unity-shared/DashStyle.h
3462index f080297..dd127c4 100755
3463--- a/unity-shared/DashStyle.h
3464+++ b/unity-shared/DashStyle.h
3465@@ -178,6 +178,8 @@ public:
3466 BaseTexturePtr GetDashLeftTile(double scale) const;
3467 BaseTexturePtr GetDashTopTile(double scale) const;
3468
3469+ BaseTexturePtr GetEmpty(double scale) const;
3470+
3471 BaseTexturePtr GetDashCorner(double scale) const;
3472 BaseTexturePtr GetDashCornerMask(double scale) const;
3473 BaseTexturePtr GetDashLeftCorner(double scale) const;
3474diff --git a/unity-shared/FileManager.cpp b/unity-shared/FileManager.cpp
3475index c48a466..6fc574e 100644
3476--- a/unity-shared/FileManager.cpp
3477+++ b/unity-shared/FileManager.cpp
3478@@ -24,7 +24,7 @@
3479 #include "GnomeFileManager.h"
3480 #include "NemoFileManager.h"
3481
3482-#include <gio/gdesktopappinfo.h>
3483+#include <gio/gio.h>
3484
3485 namespace unity
3486 {
3487diff --git a/unity-shared/FileManager.h b/unity-shared/FileManager.h
3488index bb636d4..6b802c6 100644
3489--- a/unity-shared/FileManager.h
3490+++ b/unity-shared/FileManager.h
3491@@ -61,4 +61,4 @@ private:
3492
3493 } // namespace unity
3494
3495-#endif
3496+#endif
3497\ No newline at end of file
3498diff --git a/unity-shared/GnomeFileManager.h b/unity-shared/GnomeFileManager.h
3499index b9c3dd8..6fa53a6 100644
3500--- a/unity-shared/GnomeFileManager.h
3501+++ b/unity-shared/GnomeFileManager.h
3502@@ -51,4 +51,4 @@ private:
3503
3504 }
3505
3506-#endif
3507+#endif
3508\ No newline at end of file
3509diff --git a/unity-shared/NemoFileManager.cpp b/unity-shared/NemoFileManager.cpp
3510index 81432cf..e8889e6 100644
3511--- a/unity-shared/NemoFileManager.cpp
3512+++ b/unity-shared/NemoFileManager.cpp
3513@@ -19,12 +19,12 @@
3514
3515 #include "NemoFileManager.h"
3516 #include <NuxCore/Logger.h>
3517-
3518+#include <UnityCore/DesktopUtilities.h>
3519 #include <UnityCore/GLibDBusProxy.h>
3520 #include <UnityCore/GLibWrapper.h>
3521-#include <gio/gdesktopappinfo.h>
3522 #include <gdk/gdk.h>
3523 #include <gio/gio.h>
3524+#include <gio/gdesktopappinfo.h>
3525
3526 namespace unity
3527 {
3528@@ -38,30 +38,48 @@ const std::string FILE_SCHEMA = "file://";
3529
3530 const std::string NEMO_DESKTOP_ID = "nemo.desktop";
3531 const std::string NEMO_NAME = "org.Nemo";
3532-const std::string NEMO_PATH = "/org/Nemo";
3533+const std::string NEMO_FILE_OPS_PATH = "/org/Nemo";
3534 }
3535
3536 struct NemoFileManager::Impl
3537 {
3538 Impl(NemoFileManager* parent)
3539 : parent_(parent)
3540- , app_info_(g_desktop_app_info_new(NEMO_DESKTOP_ID.c_str()))
3541 {
3542 }
3543
3544 glib::DBusProxy::Ptr NemoOperationsProxy() const
3545 {
3546 auto flags = static_cast<GDBusProxyFlags>(G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES|G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS);
3547- return std::make_shared<glib::DBusProxy>(NEMO_NAME, NEMO_PATH,
3548+ return std::make_shared<glib::DBusProxy>(NEMO_NAME, NEMO_FILE_OPS_PATH,
3549 "org.Nemo.FileOperations",
3550 G_BUS_TYPE_SESSION, flags);
3551 }
3552
3553- void Activate(uint64_t timestamp)
3554- {
3555- if (!app_info_)
3556- return;
3557+ NemoFileManager* parent_;
3558+};
3559+
3560+
3561+FileManager::Ptr NemoFileManager::Get()
3562+{
3563+ static FileManager::Ptr instance(new NemoFileManager());
3564+ return instance;
3565+}
3566+
3567+NemoFileManager::NemoFileManager()
3568+ : impl_(new Impl(this))
3569+{}
3570+
3571+NemoFileManager::~NemoFileManager()
3572+{}
3573
3574+void Activate(uint64_t timestamp)
3575+{
3576+ glib::Cancellable cancellable;
3577+ glib::Object<GAppInfo> app_info(G_APP_INFO (g_desktop_app_info_new(NEMO_DESKTOP_ID.c_str())));
3578+
3579+ if (app_info)
3580+ {
3581 GdkDisplay* display = gdk_display_get_default();
3582 glib::Object<GdkAppLaunchContext> context(gdk_display_get_app_launch_context(display));
3583
3584@@ -69,11 +87,10 @@ struct NemoFileManager::Impl
3585 gdk_app_launch_context_set_timestamp(context, timestamp);
3586
3587 auto const& gcontext = glib::object_cast<GAppLaunchContext>(context);
3588- auto proxy = std::make_shared<glib::DBusProxy>(NEMO_NAME, NEMO_PATH,
3589- "org.freedesktop.Application");
3590+ auto proxy = std::make_shared<glib::DBusProxy>(NEMO_NAME, NEMO_FILE_OPS_PATH,
3591+ "org.freedesktop.Application");
3592
3593- glib::String context_string(g_app_launch_context_get_startup_notify_id(
3594- gcontext, glib::object_cast<GAppInfo>(app_info_), nullptr));
3595+ glib::String context_string(g_app_launch_context_get_startup_notify_id(gcontext, app_info, nullptr));
3596
3597 if (context_string && g_utf8_validate(context_string, -1, nullptr))
3598 {
3599@@ -86,25 +103,8 @@ struct NemoFileManager::Impl
3600 proxy->CallBegin("Activate", param, [proxy] (GVariant*, glib::Error const&) {});
3601 }
3602 }
3603-
3604- glib::Object<GDesktopAppInfo> app_info_;
3605- NemoFileManager* parent_;
3606-};
3607-
3608-
3609-FileManager::Ptr NemoFileManager::Get()
3610-{
3611- static FileManager::Ptr instance(new NemoFileManager());
3612- return instance;
3613 }
3614
3615-NemoFileManager::NemoFileManager()
3616- : impl_(new Impl(this))
3617-{}
3618-
3619-NemoFileManager::~NemoFileManager()
3620-{}
3621-
3622 void NemoFileManager::Open(std::string const& uri, uint64_t timestamp)
3623 {
3624 if (uri.empty())
3625@@ -152,7 +152,7 @@ void NemoFileManager::EmptyTrash(uint64_t timestamp, Window parent_xid)
3626 auto const& proxy = impl_->NemoOperationsProxy();
3627
3628 // Passing the proxy to the lambda we ensure that it will be destroyed when needed
3629- impl_->Activate(timestamp);
3630+ Activate(timestamp);
3631 proxy->CallBegin("EmptyTrash", nullptr, [proxy] (GVariant*, glib::Error const&) {});
3632 }
3633
3634@@ -184,7 +184,7 @@ void NemoFileManager::CopyFiles(std::set<std::string> const& uris, std::string c
3635 // Passing the proxy to the lambda we ensure that it will be destroyed when needed
3636 auto const& proxy = impl_->NemoOperationsProxy();
3637 proxy->CallBegin("CopyURIs", parameters, [proxy] (GVariant*, glib::Error const&) {});
3638- impl_->Activate(timestamp);
3639+ Activate(timestamp);
3640 }
3641 }
3642
3643@@ -199,4 +199,4 @@ std::string NemoFileManager::LocationForWindow(ApplicationWindowPtr const& win)
3644 return std::string();
3645 }
3646
3647-} // namespace unity
3648+} // namespace unity
3649\ No newline at end of file
3650diff --git a/unity-shared/NemoFileManager.h b/unity-shared/NemoFileManager.h
3651index aaa4e91..94321a9 100644
3652--- a/unity-shared/NemoFileManager.h
3653+++ b/unity-shared/NemoFileManager.h
3654@@ -47,4 +47,4 @@ private:
3655 std::unique_ptr<Impl> impl_;
3656 };
3657
3658-} // namespace unity
3659+}
3660diff --git a/unity-shared/OverlayRenderer.cpp b/unity-shared/OverlayRenderer.cpp
3661index 475ad5e..e35a3e8 100644
3662--- a/unity-shared/OverlayRenderer.cpp
3663+++ b/unity-shared/OverlayRenderer.cpp
3664@@ -99,6 +99,8 @@ public:
3665 nux::ObjectPtr<nux::BaseTexture> right_corner_;
3666 nux::ObjectPtr<nux::BaseTexture> right_corner_mask_;
3667
3668+ OverlayPosition dash_position = OverlayPosition::LEFT;
3669+
3670 // temporary variable that stores the number of backgrounds we have rendered
3671 int bgs;
3672 bool visible;
3673@@ -140,20 +142,37 @@ void OverlayRendererImpl::LoadScaledTextures()
3674 double scale = parent->scale;
3675 auto& style = dash::Style::Instance();
3676
3677- horizontal_texture_ = style.GetDashHorizontalTile(scale);
3678- horizontal_texture_mask_ = style.GetDashHorizontalTileMask(scale);
3679- right_texture_ = style.GetDashRightTile(scale);
3680- right_texture_mask_ = style.GetDashRightTileMask(scale);
3681- top_left_texture_ = style.GetDashTopLeftTile(scale);
3682- left_texture_ = style.GetDashLeftTile(scale);
3683- top_texture_ = style.GetDashTopTile(scale);
3684-
3685- corner_ = style.GetDashCorner(scale);
3686- corner_mask_ = style.GetDashCornerMask(scale);
3687- left_corner_ = style.GetDashLeftCorner(scale);
3688- left_corner_mask_ = style.GetDashLeftCornerMask(scale);
3689- right_corner_ = style.GetDashRightCorner(scale);
3690- right_corner_mask_ = style.GetDashRightCornerMask(scale);
3691+ if (parent->owner_type == OverlayOwner::Hud) {
3692+ horizontal_texture_ = style.GetDashHorizontalTile(scale);
3693+ horizontal_texture_mask_ = style.GetDashHorizontalTileMask(scale);
3694+ right_texture_ = style.GetDashRightTile(scale);
3695+ right_texture_mask_ = style.GetDashRightTileMask(scale);
3696+ top_left_texture_ = style.GetDashTopLeftTile(scale);
3697+ left_texture_ = style.GetDashLeftTile(scale);
3698+ top_texture_ = style.GetDashTopTile(scale);
3699+
3700+ corner_ = style.GetDashCorner(scale);
3701+ corner_mask_ = style.GetDashCornerMask(scale);
3702+ left_corner_ = style.GetDashLeftCorner(scale);
3703+ left_corner_mask_ = style.GetDashLeftCornerMask(scale);
3704+ right_corner_ = style.GetDashRightCorner(scale);
3705+ right_corner_mask_ = style.GetDashRightCornerMask(scale);
3706+ } else {
3707+ horizontal_texture_ = style.GetEmpty(scale);
3708+ horizontal_texture_mask_ = style.GetEmpty(scale);
3709+ right_texture_ = style.GetEmpty(scale);
3710+ right_texture_mask_ = style.GetEmpty(scale);
3711+ top_left_texture_ = style.GetEmpty(scale);
3712+ left_texture_ = style.GetEmpty(scale);
3713+ top_texture_ = style.GetEmpty(scale);
3714+
3715+ corner_ = style.GetEmpty(scale);
3716+ corner_mask_ = style.GetEmpty(scale);
3717+ left_corner_ = style.GetEmpty(scale);
3718+ left_corner_mask_ = style.GetEmpty(scale);
3719+ right_corner_ = style.GetEmpty(scale);
3720+ right_corner_mask_ = style.GetEmpty(scale);
3721+ }
3722 }
3723
3724 void OverlayRendererImpl::OnBgColorChanged(nux::Color const& new_color)
3725@@ -186,7 +205,7 @@ void OverlayRendererImpl::UpdateTextures()
3726 rop.Blend = true;
3727 rop.SrcBlend = GL_ZERO;
3728 rop.DstBlend = GL_SRC_COLOR;
3729- nux::Color darken_colour = nux::Color(0.9f, 0.9f, 0.9f, 1.0f);
3730+ nux::Color darken_colour = nux::Color(1.0f, 1.0f, 1.0f, 1.0f);
3731
3732 //When we are in low gfx mode then our darken layer will act as a background.
3733 if (Settings::Instance().low_gfx())
3734@@ -198,7 +217,7 @@ void OverlayRendererImpl::UpdateTextures()
3735 }
3736
3737 bg_darken_layer_ = std::make_shared<nux::ColorLayer>(darken_colour, false, rop);
3738- bg_shine_texture_ = dash::Style::Instance().GetDashShine()->GetDeviceTexture();
3739+ // bg_shine_texture_ = dash::Style::Instance().GetDashShine()->GetDeviceTexture();
3740
3741 auto const& bg_refine_tex = dash::Style::Instance().GetRefineTextureDash();
3742
3743@@ -619,7 +638,6 @@ void OverlayRendererImpl::Draw(nux::GraphicsEngine& gfx_context, nux::Geometry c
3744 int launcher_size = Settings::Instance().LauncherSize(monitor);
3745 int panel_height = panel::Style::Instance().PanelHeight(monitor);
3746
3747- auto dash_position = OverlayPosition::LEFT;
3748 int border_y = content_geo.y;
3749 int border_height = larger_absolute_geo.height;
3750 if (parent->owner_type() == OverlayOwner::Dash && settings.launcher_position() == LauncherPosition::BOTTOM)
3751diff --git a/unity-shared/OverlayWindowButtons.cpp b/unity-shared/OverlayWindowButtons.cpp
3752index c373ad1..6b17182 100644
3753--- a/unity-shared/OverlayWindowButtons.cpp
3754+++ b/unity-shared/OverlayWindowButtons.cpp
3755@@ -23,7 +23,7 @@
3756
3757 namespace
3758 {
3759- const int MAIN_LEFT_PADDING = 4;
3760+ const int MAIN_LEFT_PADDING = 6;
3761 const int MENUBAR_PADDING = 4;
3762 }
3763
3764diff --git a/unity-shared/PanelStyle.cpp b/unity-shared/PanelStyle.cpp
3765index e2fb22d..92d6751 100644
3766--- a/unity-shared/PanelStyle.cpp
3767+++ b/unity-shared/PanelStyle.cpp
3768@@ -41,8 +41,8 @@ Style* style_instance = nullptr;
3769
3770 DECLARE_LOGGER(logger, "unity.panel.style");
3771 const int BUTTONS_SIZE = 16;
3772-const int BUTTONS_PADDING = 1;
3773-const int BASE_PANEL_HEIGHT = 24;
3774+const int BUTTONS_PADDING = 9;
3775+const int BASE_PANEL_HEIGHT = 30;
3776 const std::string PANEL_STYLE_CSS_NAME = "UnityPanelWidget";
3777
3778 inline std::string button_id(std::string const& prefix, double scale, WindowButtonType type, WindowState ws)
3779diff --git a/unity-shared/SearchBar.cpp b/unity-shared/SearchBar.cpp
3780index 9c3741f..8e90c58 100644
3781--- a/unity-shared/SearchBar.cpp
3782+++ b/unity-shared/SearchBar.cpp
3783@@ -74,11 +74,11 @@ const RawPixel FILTER_HORIZONTAL_MARGIN = 8_em;
3784
3785 // Fonts
3786 const std::string HINT_LABEL_FONT_SIZE = "15"; // == 20px
3787-const std::string HINT_LABEL_FONT_STYLE = "Italic";
3788+const std::string HINT_LABEL_FONT_STYLE = "Light";
3789 const std::string HINT_LABEL_DEFAULT_FONT = "Ubuntu " + HINT_LABEL_FONT_STYLE + " " + HINT_LABEL_FONT_SIZE;
3790
3791-const std::string PANGO_ENTRY_DEFAULT_FONT_FAMILY = "Ubuntu";
3792-const RawPixel PANGO_ENTRY_FONT_SIZE = 22_em;
3793+const std::string PANGO_ENTRY_DEFAULT_FONT_FAMILY = "Ubuntu Light";
3794+const RawPixel PANGO_ENTRY_FONT_SIZE = 15_em;
3795
3796 const std::string SHOW_FILTERS_LABEL_FONT_SIZE = "13";
3797 const std::string SHOW_FILTERS_LABEL_FONT_STYLE = "";
3798@@ -403,8 +403,6 @@ void SearchBar::Draw(nux::GraphicsEngine& graphics_engine, bool force_draw)
3799 {
3800 nux::Geometry const& base = GetGeometry();
3801
3802- UpdateBackground(false);
3803-
3804 graphics_engine.PushClippingRectangle(base);
3805
3806 if (RedirectedAncestor())
3807@@ -513,64 +511,6 @@ void SearchBar::SetSearchFinished()
3808 spinner_->SetState(is_empty ? STATE_READY : STATE_CLEAR);
3809 }
3810
3811-void SearchBar::UpdateBackground(bool force)
3812-{
3813- nux::Geometry geo(GetGeometry());
3814- geo.width = layered_layout_->GetAbsoluteX() +
3815- layered_layout_->GetAbsoluteWidth() -
3816- GetAbsoluteX() +
3817- SEARCH_ENTRY_RIGHT_BORDER.CP(scale());
3818-
3819- LOG_TRACE(logger) << "height: "
3820- << geo.height << " - "
3821- << layered_layout_->GetGeometry().height << " - "
3822- << pango_entry_->GetGeometry().height;
3823-
3824- if (!bg_layer_ &&
3825- geo.width == last_width_
3826- && geo.height == last_height_
3827- && force == false)
3828- return;
3829-
3830- last_width_ = geo.width;
3831- last_height_ = geo.height;
3832-
3833- nux::CairoGraphics cairo_graphics(CAIRO_FORMAT_ARGB32, last_width_, last_height_);
3834- cairo_t* cr = cairo_graphics.GetInternalContext();
3835- cairo_surface_set_device_scale(cairo_get_target(cr), scale, scale);
3836-
3837- cairo_graphics.DrawRoundedRectangle(cr,
3838- 1.0f,
3839- 0.5, 0.5,
3840- CORNER_RADIUS,
3841- (last_width_/scale) - 1, (last_height_/scale) - 1,
3842- false);
3843-
3844- cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
3845- cairo_set_source_rgba(cr, 0.0f, 0.0f, 0.0f, 0.35f);
3846- cairo_fill_preserve(cr);
3847- cairo_set_line_width(cr, 1);
3848- cairo_set_source_rgba(cr, 1.0f, 1.0f, 1.0f, 0.7f);
3849- cairo_stroke(cr);
3850-
3851- auto texture2D = texture_ptr_from_cairo_graphics(cairo_graphics);
3852-
3853- nux::TexCoordXForm texxform;
3854- texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_COORD);
3855- texxform.SetWrap(nux::TEXWRAP_REPEAT, nux::TEXWRAP_REPEAT);
3856-
3857- nux::ROPConfig rop;
3858- rop.Blend = true;
3859- rop.SrcBlend = GL_ONE;
3860- rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA;
3861-
3862- bg_layer_.reset(new nux::TextureLayer(texture2D->GetDeviceTexture(),
3863- texxform,
3864- nux::color::White,
3865- true,
3866- rop));
3867-}
3868-
3869 void SearchBar::OnMouseButtonDown(int x, int y, unsigned long button, unsigned long key)
3870 {
3871 hint_->SetVisible(false);
3872diff --git a/unity-shared/SearchBar.h b/unity-shared/SearchBar.h
3873index c9af1db..fa28332 100644
3874--- a/unity-shared/SearchBar.h
3875+++ b/unity-shared/SearchBar.h
3876@@ -82,7 +82,6 @@ private:
3877 void OnMouseButtonDown(int x, int y, unsigned long button_flags, unsigned long key_flags);
3878 void OnEndKeyFocus();
3879
3880- void UpdateBackground(bool force);
3881 void OnSearchChanged(nux::TextEntry* text_entry);
3882 void OnClearClicked(int x, int y, unsigned long button_flags, unsigned long key_flags);
3883 void OnEntryActivated();
3884diff --git a/unity-standalone/StandaloneUnity.cpp b/unity-standalone/StandaloneUnity.cpp
3885index 6a0af61..29ec25c 100644
3886--- a/unity-standalone/StandaloneUnity.cpp
3887+++ b/unity-standalone/StandaloneUnity.cpp
3888@@ -157,6 +157,8 @@ int main(int argc, char **argv)
3889 GError *error = NULL;
3890 GOptionContext *context;
3891
3892+ unity::Settings settings;
3893+
3894 nux::NuxInitialize(0);
3895 nux::logging::configure_logging(::getenv("UNITY_LOG_SEVERITY"));
3896
3897@@ -177,7 +179,6 @@ int main(int argc, char **argv)
3898 FontSettings font_settings;
3899
3900 // The instances for the pseudo-singletons.
3901- Settings settings;
3902 settings.is_standalone = true;
3903 if (force_tv) Settings::Instance().form_factor(FormFactor::TV);
3904
3905diff --git a/uwidgets/LICENCE b/uwidgets/LICENCE
3906new file mode 100644
3907index 0000000..32b38d4
3908--- /dev/null
3909+++ b/uwidgets/LICENCE
3910@@ -0,0 +1,636 @@
3911+# GNU GENERAL PUBLIC LICENSE
3912+Version 3, 29 June 2007
3913+
3914+Copyright (C) 2007 [Free Software Foundation, Inc.](http://fsf.org/)
3915+
3916+Everyone is permitted to copy and distribute verbatim copies of this license
3917+document, but changing it is not allowed.
3918+
3919+## Preamble
3920+
3921+The GNU General Public License is a free, copyleft license for software and
3922+other kinds of works.
3923+
3924+The licenses for most software and other practical works are designed to take
3925+away your freedom to share and change the works. By contrast, the GNU General
3926+Public License is intended to guarantee your freedom to share and change all
3927+versions of a program--to make sure it remains free software for all its users.
3928+We, the Free Software Foundation, use the GNU General Public License for most
3929+of our software; it applies also to any other work released this way by its
3930+authors. You can apply it to your programs, too.
3931+
3932+When we speak of free software, we are referring to freedom, not price. Our
3933+General Public Licenses are designed to make sure that you have the freedom to
3934+distribute copies of free software (and charge for them if you wish), that you
3935+receive source code or can get it if you want it, that you can change the
3936+software or use pieces of it in new free programs, and that you know you can do
3937+these things.
3938+
3939+To protect your rights, we need to prevent others from denying you these rights
3940+or asking you to surrender the rights. Therefore, you have certain
3941+responsibilities if you distribute copies of the software, or if you modify it:
3942+responsibilities to respect the freedom of others.
3943+
3944+For example, if you distribute copies of such a program, whether gratis or for
3945+a fee, you must pass on to the recipients the same freedoms that you received.
3946+You must make sure that they, too, receive or can get the source code. And you
3947+must show them these terms so they know their rights.
3948+
3949+Developers that use the GNU GPL protect your rights with two steps:
3950+
3951+ 1. assert copyright on the software, and
3952+ 2. offer you this License giving you legal permission to copy, distribute
3953+ and/or modify it.
3954+
3955+For the developers' and authors' protection, the GPL clearly explains that
3956+there is no warranty for this free software. For both users' and authors' sake,
3957+the GPL requires that modified versions be marked as changed, so that their
3958+problems will not be attributed erroneously to authors of previous versions.
3959+
3960+Some devices are designed to deny users access to install or run modified
3961+versions of the software inside them, although the manufacturer can do so. This
3962+is fundamentally incompatible with the aim of protecting users' freedom to
3963+change the software. The systematic pattern of such abuse occurs in the area of
3964+products for individuals to use, which is precisely where it is most
3965+unacceptable. Therefore, we have designed this version of the GPL to prohibit
3966+the practice for those products. If such problems arise substantially in other
3967+domains, we stand ready to extend this provision to those domains in future
3968+versions of the GPL, as needed to protect the freedom of users.
3969+
3970+Finally, every program is threatened constantly by software patents. States
3971+should not allow patents to restrict development and use of software on
3972+general-purpose computers, but in those that do, we wish to avoid the special
3973+danger that patents applied to a free program could make it effectively
3974+proprietary. To prevent this, the GPL assures that patents cannot be used to
3975+render the program non-free.
3976+
3977+The precise terms and conditions for copying, distribution and modification
3978+follow.
3979+
3980+## TERMS AND CONDITIONS
3981+
3982+### 0. Definitions.
3983+
3984+*This License* refers to version 3 of the GNU General Public License.
3985+
3986+*Copyright* also means copyright-like laws that apply to other kinds of works,
3987+such as semiconductor masks.
3988+
3989+*The Program* refers to any copyrightable work licensed under this License.
3990+Each licensee is addressed as *you*. *Licensees* and *recipients* may be
3991+individuals or organizations.
3992+
3993+To *modify* a work means to copy from or adapt all or part of the work in a
3994+fashion requiring copyright permission, other than the making of an exact copy.
3995+The resulting work is called a *modified version* of the earlier work or a work
3996+*based on* the earlier work.
3997+
3998+A *covered work* means either the unmodified Program or a work based on the
3999+Program.
4000+
4001+To *propagate* a work means to do anything with it that, without permission,
4002+would make you directly or secondarily liable for infringement under applicable
4003+copyright law, except executing it on a computer or modifying a private copy.
4004+Propagation includes copying, distribution (with or without modification),
4005+making available to the public, and in some countries other activities as well.
4006+
4007+To *convey* a work means any kind of propagation that enables other parties to
4008+make or receive copies. Mere interaction with a user through a computer
4009+network, with no transfer of a copy, is not conveying.
4010+
4011+An interactive user interface displays *Appropriate Legal Notices* to the
4012+extent that it includes a convenient and prominently visible feature that
4013+
4014+ 1. displays an appropriate copyright notice, and
4015+ 2. tells the user that there is no warranty for the work (except to the
4016+ extent that warranties are provided), that licensees may convey the work
4017+ under this License, and how to view a copy of this License.
4018+
4019+If the interface presents a list of user commands or options, such as a menu, a
4020+prominent item in the list meets this criterion.
4021+
4022+### 1. Source Code.
4023+
4024+The *source code* for a work means the preferred form of the work for making
4025+modifications to it. *Object code* means any non-source form of a work.
4026+
4027+A *Standard Interface* means an interface that either is an official standard
4028+defined by a recognized standards body, or, in the case of interfaces specified
4029+for a particular programming language, one that is widely used among developers
4030+working in that language.
4031+
4032+The *System Libraries* of an executable work include anything, other than the
4033+work as a whole, that (a) is included in the normal form of packaging a Major
4034+Component, but which is not part of that Major Component, and (b) serves only
4035+to enable use of the work with that Major Component, or to implement a Standard
4036+Interface for which an implementation is available to the public in source code
4037+form. A *Major Component*, in this context, means a major essential component
4038+(kernel, window system, and so on) of the specific operating system (if any) on
4039+which the executable work runs, or a compiler used to produce the work, or an
4040+object code interpreter used to run it.
4041+
4042+The *Corresponding Source* for a work in object code form means all the source
4043+code needed to generate, install, and (for an executable work) run the object
4044+code and to modify the work, including scripts to control those activities.
4045+However, it does not include the work's System Libraries, or general-purpose
4046+tools or generally available free programs which are used unmodified in
4047+performing those activities but which are not part of the work. For example,
4048+Corresponding Source includes interface definition files associated with source
4049+files for the work, and the source code for shared libraries and dynamically
4050+linked subprograms that the work is specifically designed to require, such as
4051+by intimate data communication or control flow between those subprograms and
4052+other parts of the work.
4053+
4054+The Corresponding Source need not include anything that users can regenerate
4055+automatically from other parts of the Corresponding Source.
4056+
4057+The Corresponding Source for a work in source code form is that same work.
4058+
4059+### 2. Basic Permissions.
4060+
4061+All rights granted under this License are granted for the term of copyright on
4062+the Program, and are irrevocable provided the stated conditions are met. This
4063+License explicitly affirms your unlimited permission to run the unmodified
4064+Program. The output from running a covered work is covered by this License only
4065+if the output, given its content, constitutes a covered work. This License
4066+acknowledges your rights of fair use or other equivalent, as provided by
4067+copyright law.
4068+
4069+You may make, run and propagate covered works that you do not convey, without
4070+conditions so long as your license otherwise remains in force. You may convey
4071+covered works to others for the sole purpose of having them make modifications
4072+exclusively for you, or provide you with facilities for running those works,
4073+provided that you comply with the terms of this License in conveying all
4074+material for which you do not control copyright. Those thus making or running
4075+the covered works for you must do so exclusively on your behalf, under your
4076+direction and control, on terms that prohibit them from making any copies of
4077+your copyrighted material outside their relationship with you.
4078+
4079+Conveying under any other circumstances is permitted solely under the
4080+conditions stated below. Sublicensing is not allowed; section 10 makes it
4081+unnecessary.
4082+
4083+### 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
4084+
4085+No covered work shall be deemed part of an effective technological measure
4086+under any applicable law fulfilling obligations under article 11 of the WIPO
4087+copyright treaty adopted on 20 December 1996, or similar laws prohibiting or
4088+restricting circumvention of such measures.
4089+
4090+When you convey a covered work, you waive any legal power to forbid
4091+circumvention of technological measures to the extent such circumvention is
4092+effected by exercising rights under this License with respect to the covered
4093+work, and you disclaim any intention to limit operation or modification of the
4094+work as a means of enforcing, against the work's users, your or third parties'
4095+legal rights to forbid circumvention of technological measures.
4096+
4097+### 4. Conveying Verbatim Copies.
4098+
4099+You may convey verbatim copies of the Program's source code as you receive it,
4100+in any medium, provided that you conspicuously and appropriately publish on
4101+each copy an appropriate copyright notice; keep intact all notices stating that
4102+this License and any non-permissive terms added in accord with section 7 apply
4103+to the code; keep intact all notices of the absence of any warranty; and give
4104+all recipients a copy of this License along with the Program.
4105+
4106+You may charge any price or no price for each copy that you convey, and you may
4107+offer support or warranty protection for a fee.
4108+
4109+### 5. Conveying Modified Source Versions.
4110+
4111+You may convey a work based on the Program, or the modifications to produce it
4112+from the Program, in the form of source code under the terms of section 4,
4113+provided that you also meet all of these conditions:
4114+
4115+ - a) The work must carry prominent notices stating that you modified it, and
4116+ giving a relevant date.
4117+ - b) The work must carry prominent notices stating that it is released under
4118+ this License and any conditions added under section 7. This requirement
4119+ modifies the requirement in section 4 to *keep intact all notices*.
4120+ - c) You must license the entire work, as a whole, under this License to
4121+ anyone who comes into possession of a copy. This License will therefore
4122+ apply, along with any applicable section 7 additional terms, to the whole
4123+ of the work, and all its parts, regardless of how they are packaged. This
4124+ License gives no permission to license the work in any other way, but it
4125+ does not invalidate such permission if you have separately received it.
4126+ - d) If the work has interactive user interfaces, each must display
4127+ Appropriate Legal Notices; however, if the Program has interactive
4128+ interfaces that do not display Appropriate Legal Notices, your work need
4129+ not make them do so.
4130+
4131+A compilation of a covered work with other separate and independent works,
4132+which are not by their nature extensions of the covered work, and which are not
4133+combined with it such as to form a larger program, in or on a volume of a
4134+storage or distribution medium, is called an *aggregate* if the compilation and
4135+its resulting copyright are not used to limit the access or legal rights of the
4136+compilation's users beyond what the individual works permit. Inclusion of a
4137+covered work in an aggregate does not cause this License to apply to the other
4138+parts of the aggregate.
4139+
4140+### 6. Conveying Non-Source Forms.
4141+
4142+You may convey a covered work in object code form under the terms of sections 4
4143+and 5, provided that you also convey the machine-readable Corresponding Source
4144+under the terms of this License, in one of these ways:
4145+
4146+ - a) Convey the object code in, or embodied in, a physical product (including
4147+ a physical distribution medium), accompanied by the Corresponding Source
4148+ fixed on a durable physical medium customarily used for software
4149+ interchange.
4150+ - b) Convey the object code in, or embodied in, a physical product (including
4151+ a physical distribution medium), accompanied by a written offer, valid for
4152+ at least three years and valid for as long as you offer spare parts or
4153+ customer support for that product model, to give anyone who possesses the
4154+ object code either
4155+ 1. a copy of the Corresponding Source for all the software in the product
4156+ that is covered by this License, on a durable physical medium
4157+ customarily used for software interchange, for a price no more than your
4158+ reasonable cost of physically performing this conveying of source, or
4159+ 2. access to copy the Corresponding Source from a network server at no
4160+ charge.
4161+ - c) Convey individual copies of the object code with a copy of the written
4162+ offer to provide the Corresponding Source. This alternative is allowed only
4163+ occasionally and noncommercially, and only if you received the object code
4164+ with such an offer, in accord with subsection 6b.
4165+ - d) Convey the object code by offering access from a designated place
4166+ (gratis or for a charge), and offer equivalent access to the Corresponding
4167+ Source in the same way through the same place at no further charge. You
4168+ need not require recipients to copy the Corresponding Source along with the
4169+ object code. If the place to copy the object code is a network server, the
4170+ Corresponding Source may be on a different server operated by you or a
4171+ third party) that supports equivalent copying facilities, provided you
4172+ maintain clear directions next to the object code saying where to find the
4173+ Corresponding Source. Regardless of what server hosts the Corresponding
4174+ Source, you remain obligated to ensure that it is available for as long as
4175+ needed to satisfy these requirements.
4176+ - e) Convey the object code using peer-to-peer transmission, provided you
4177+ inform other peers where the object code and Corresponding Source of the
4178+ work are being offered to the general public at no charge under subsection
4179+ 6d.
4180+
4181+A separable portion of the object code, whose source code is excluded from the
4182+Corresponding Source as a System Library, need not be included in conveying the
4183+object code work.
4184+
4185+A *User Product* is either
4186+
4187+ 1. a *consumer product*, which means any tangible personal property which is
4188+ normally used for personal, family, or household purposes, or
4189+ 2. anything designed or sold for incorporation into a dwelling.
4190+
4191+In determining whether a product is a consumer product, doubtful cases shall be
4192+resolved in favor of coverage. For a particular product received by a
4193+particular user, *normally used* refers to a typical or common use of that
4194+class of product, regardless of the status of the particular user or of the way
4195+in which the particular user actually uses, or expects or is expected to use,
4196+the product. A product is a consumer product regardless of whether the product
4197+has substantial commercial, industrial or non-consumer uses, unless such uses
4198+represent the only significant mode of use of the product.
4199+
4200+*Installation Information* for a User Product means any methods, procedures,
4201+authorization keys, or other information required to install and execute
4202+modified versions of a covered work in that User Product from a modified
4203+version of its Corresponding Source. The information must suffice to ensure
4204+that the continued functioning of the modified object code is in no case
4205+prevented or interfered with solely because modification has been made.
4206+
4207+If you convey an object code work under this section in, or with, or
4208+specifically for use in, a User Product, and the conveying occurs as part of a
4209+transaction in which the right of possession and use of the User Product is
4210+transferred to the recipient in perpetuity or for a fixed term (regardless of
4211+how the transaction is characterized), the Corresponding Source conveyed under
4212+this section must be accompanied by the Installation Information. But this
4213+requirement does not apply if neither you nor any third party retains the
4214+ability to install modified object code on the User Product (for example, the
4215+work has been installed in ROM).
4216+
4217+The requirement to provide Installation Information does not include a
4218+requirement to continue to provide support service, warranty, or updates for a
4219+work that has been modified or installed by the recipient, or for the User
4220+Product in which it has been modified or installed. Access to a network may be
4221+denied when the modification itself materially and adversely affects the
4222+operation of the network or violates the rules and protocols for communication
4223+across the network.
4224+
4225+Corresponding Source conveyed, and Installation Information provided, in accord
4226+with this section must be in a format that is publicly documented (and with an
4227+implementation available to the public in source code form), and must require
4228+no special password or key for unpacking, reading or copying.
4229+
4230+### 7. Additional Terms.
4231+
4232+*Additional permissions* are terms that supplement the terms of this License by
4233+making exceptions from one or more of its conditions. Additional permissions
4234+that are applicable to the entire Program shall be treated as though they were
4235+included in this License, to the extent that they are valid under applicable
4236+law. If additional permissions apply only to part of the Program, that part may
4237+be used separately under those permissions, but the entire Program remains
4238+governed by this License without regard to the additional permissions.
4239+
4240+When you convey a copy of a covered work, you may at your option remove any
4241+additional permissions from that copy, or from any part of it. (Additional
4242+permissions may be written to require their own removal in certain cases when
4243+you modify the work.) You may place additional permissions on material, added
4244+by you to a covered work, for which you have or can give appropriate copyright
4245+permission.
4246+
4247+Notwithstanding any other provision of this License, for material you add to a
4248+covered work, you may (if authorized by the copyright holders of that material)
4249+supplement the terms of this License with terms:
4250+
4251+ - a) Disclaiming warranty or limiting liability differently from the terms of
4252+ sections 15 and 16 of this License; or
4253+ - b) Requiring preservation of specified reasonable legal notices or author
4254+ attributions in that material or in the Appropriate Legal Notices displayed
4255+ by works containing it; or
4256+ - c) Prohibiting misrepresentation of the origin of that material, or
4257+ requiring that modified versions of such material be marked in reasonable
4258+ ways as different from the original version; or
4259+ - d) Limiting the use for publicity purposes of names of licensors or authors
4260+ of the material; or
4261+ - e) Declining to grant rights under trademark law for use of some trade
4262+ names, trademarks, or service marks; or
4263+ - f) Requiring indemnification of licensors and authors of that material by
4264+ anyone who conveys the material (or modified versions of it) with
4265+ contractual assumptions of liability to the recipient, for any liability
4266+ that these contractual assumptions directly impose on those licensors and
4267+ authors.
4268+
4269+All other non-permissive additional terms are considered *further restrictions*
4270+within the meaning of section 10. If the Program as you received it, or any
4271+part of it, contains a notice stating that it is governed by this License along
4272+with a term that is a further restriction, you may remove that term. If a
4273+license document contains a further restriction but permits relicensing or
4274+conveying under this License, you may add to a covered work material governed
4275+by the terms of that license document, provided that the further restriction
4276+does not survive such relicensing or conveying.
4277+
4278+If you add terms to a covered work in accord with this section, you must place,
4279+in the relevant source files, a statement of the additional terms that apply to
4280+those files, or a notice indicating where to find the applicable terms.
4281+
4282+Additional terms, permissive or non-permissive, may be stated in the form of a
4283+separately written license, or stated as exceptions; the above requirements
4284+apply either way.
4285+
4286+### 8. Termination.
4287+
4288+You may not propagate or modify a covered work except as expressly provided
4289+under this License. Any attempt otherwise to propagate or modify it is void,
4290+and will automatically terminate your rights under this License (including any
4291+patent licenses granted under the third paragraph of section 11).
4292+
4293+However, if you cease all violation of this License, then your license from a
4294+particular copyright holder is reinstated
4295+
4296+ - a) provisionally, unless and until the copyright holder explicitly and
4297+ finally terminates your license, and
4298+ - b) permanently, if the copyright holder fails to notify you of the
4299+ violation by some reasonable means prior to 60 days after the cessation.
4300+
4301+Moreover, your license from a particular copyright holder is reinstated
4302+permanently if the copyright holder notifies you of the violation by some
4303+reasonable means, this is the first time you have received notice of violation
4304+of this License (for any work) from that copyright holder, and you cure the
4305+violation prior to 30 days after your receipt of the notice.
4306+
4307+Termination of your rights under this section does not terminate the licenses
4308+of parties who have received copies or rights from you under this License. If
4309+your rights have been terminated and not permanently reinstated, you do not
4310+qualify to receive new licenses for the same material under section 10.
4311+
4312+### 9. Acceptance Not Required for Having Copies.
4313+
4314+You are not required to accept this License in order to receive or run a copy
4315+of the Program. Ancillary propagation of a covered work occurring solely as a
4316+consequence of using peer-to-peer transmission to receive a copy likewise does
4317+not require acceptance. However, nothing other than this License grants you
4318+permission to propagate or modify any covered work. These actions infringe
4319+copyright if you do not accept this License. Therefore, by modifying or
4320+propagating a covered work, you indicate your acceptance of this License to do
4321+so.
4322+
4323+### 10. Automatic Licensing of Downstream Recipients.
4324+
4325+Each time you convey a covered work, the recipient automatically receives a
4326+license from the original licensors, to run, modify and propagate that work,
4327+subject to this License. You are not responsible for enforcing compliance by
4328+third parties with this License.
4329+
4330+An *entity transaction* is a transaction transferring control of an
4331+organization, or substantially all assets of one, or subdividing an
4332+organization, or merging organizations. If propagation of a covered work
4333+results from an entity transaction, each party to that transaction who receives
4334+a copy of the work also receives whatever licenses to the work the party's
4335+predecessor in interest had or could give under the previous paragraph, plus a
4336+right to possession of the Corresponding Source of the work from the
4337+predecessor in interest, if the predecessor has it or can get it with
4338+reasonable efforts.
4339+
4340+You may not impose any further restrictions on the exercise of the rights
4341+granted or affirmed under this License. For example, you may not impose a
4342+license fee, royalty, or other charge for exercise of rights granted under this
4343+License, and you may not initiate litigation (including a cross-claim or
4344+counterclaim in a lawsuit) alleging that any patent claim is infringed by
4345+making, using, selling, offering for sale, or importing the Program or any
4346+portion of it.
4347+
4348+### 11. Patents.
4349+
4350+A *contributor* is a copyright holder who authorizes use under this License of
4351+the Program or a work on which the Program is based. The work thus licensed is
4352+called the contributor's *contributor version*.
4353+
4354+A contributor's *essential patent claims* are all patent claims owned or
4355+controlled by the contributor, whether already acquired or hereafter acquired,
4356+that would be infringed by some manner, permitted by this License, of making,
4357+using, or selling its contributor version, but do not include claims that would
4358+be infringed only as a consequence of further modification of the contributor
4359+version. For purposes of this definition, *control* includes the right to grant
4360+patent sublicenses in a manner consistent with the requirements of this
4361+License.
4362+
4363+Each contributor grants you a non-exclusive, worldwide, royalty-free patent
4364+license under the contributor's essential patent claims, to make, use, sell,
4365+offer for sale, import and otherwise run, modify and propagate the contents of
4366+its contributor version.
4367+
4368+In the following three paragraphs, a *patent license* is any express agreement
4369+or commitment, however denominated, not to enforce a patent (such as an express
4370+permission to practice a patent or covenant not to sue for patent
4371+infringement). To *grant* such a patent license to a party means to make such
4372+an agreement or commitment not to enforce a patent against the party.
4373+
4374+If you convey a covered work, knowingly relying on a patent license, and the
4375+Corresponding Source of the work is not available for anyone to copy, free of
4376+charge and under the terms of this License, through a publicly available
4377+network server or other readily accessible means, then you must either
4378+
4379+ 1. cause the Corresponding Source to be so available, or
4380+ 2. arrange to deprive yourself of the benefit of the patent license for this
4381+ particular work, or
4382+ 3. arrange, in a manner consistent with the requirements of this License, to
4383+ extend the patent license to downstream recipients.
4384+
4385+*Knowingly relying* means you have actual knowledge that, but for the patent
4386+license, your conveying the covered work in a country, or your recipient's use
4387+of the covered work in a country, would infringe one or more identifiable
4388+patents in that country that you have reason to believe are valid.
4389+
4390+If, pursuant to or in connection with a single transaction or arrangement, you
4391+convey, or propagate by procuring conveyance of, a covered work, and grant a
4392+patent license to some of the parties receiving the covered work authorizing
4393+them to use, propagate, modify or convey a specific copy of the covered work,
4394+then the patent license you grant is automatically extended to all recipients
4395+of the covered work and works based on it.
4396+
4397+A patent license is *discriminatory* if it does not include within the scope of
4398+its coverage, prohibits the exercise of, or is conditioned on the non-exercise
4399+of one or more of the rights that are specifically granted under this License.
4400+You may not convey a covered work if you are a party to an arrangement with a
4401+third party that is in the business of distributing software, under which you
4402+make payment to the third party based on the extent of your activity of
4403+conveying the work, and under which the third party grants, to any of the
4404+parties who would receive the covered work from you, a discriminatory patent
4405+license
4406+
4407+ - a) in connection with copies of the covered work conveyed by you (or copies
4408+ made from those copies), or
4409+ - b) primarily for and in connection with specific products or compilations
4410+ that contain the covered work, unless you entered into that arrangement, or
4411+ that patent license was granted, prior to 28 March 2007.
4412+
4413+Nothing in this License shall be construed as excluding or limiting any implied
4414+license or other defenses to infringement that may otherwise be available to
4415+you under applicable patent law.
4416+
4417+### 12. No Surrender of Others' Freedom.
4418+
4419+If conditions are imposed on you (whether by court order, agreement or
4420+otherwise) that contradict the conditions of this License, they do not excuse
4421+you from the conditions of this License. If you cannot convey a covered work so
4422+as to satisfy simultaneously your obligations under this License and any other
4423+pertinent obligations, then as a consequence you may not convey it at all. For
4424+example, if you agree to terms that obligate you to collect a royalty for
4425+further conveying from those to whom you convey the Program, the only way you
4426+could satisfy both those terms and this License would be to refrain entirely
4427+from conveying the Program.
4428+
4429+### 13. Use with the GNU Affero General Public License.
4430+
4431+Notwithstanding any other provision of this License, you have permission to
4432+link or combine any covered work with a work licensed under version 3 of the
4433+GNU Affero General Public License into a single combined work, and to convey
4434+the resulting work. The terms of this License will continue to apply to the
4435+part which is the covered work, but the special requirements of the GNU Affero
4436+General Public License, section 13, concerning interaction through a network
4437+will apply to the combination as such.
4438+
4439+### 14. Revised Versions of this License.
4440+
4441+The Free Software Foundation may publish revised and/or new versions of the GNU
4442+General Public License from time to time. Such new versions will be similar in
4443+spirit to the present version, but may differ in detail to address new problems
4444+or concerns.
4445+
4446+Each version is given a distinguishing version number. If the Program specifies
4447+that a certain numbered version of the GNU General Public License *or any later
4448+version* applies to it, you have the option of following the terms and
4449+conditions either of that numbered version or of any later version published by
4450+the Free Software Foundation. If the Program does not specify a version number
4451+of the GNU General Public License, you may choose any version ever published by
4452+the Free Software Foundation.
4453+
4454+If the Program specifies that a proxy can decide which future versions of the
4455+GNU General Public License can be used, that proxy's public statement of
4456+acceptance of a version permanently authorizes you to choose that version for
4457+the Program.
4458+
4459+Later license versions may give you additional or different permissions.
4460+However, no additional obligations are imposed on any author or copyright
4461+holder as a result of your choosing to follow a later version.
4462+
4463+### 15. Disclaimer of Warranty.
4464+
4465+THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
4466+LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
4467+PARTIES PROVIDE THE PROGRAM *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER
4468+EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
4469+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE
4470+QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
4471+DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
4472+CORRECTION.
4473+
4474+### 16. Limitation of Liability.
4475+
4476+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY
4477+COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS
4478+PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
4479+INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
4480+THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
4481+INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE
4482+PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY
4483+HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
4484+
4485+### 17. Interpretation of Sections 15 and 16.
4486+
4487+If the disclaimer of warranty and limitation of liability provided above cannot
4488+be given local legal effect according to their terms, reviewing courts shall
4489+apply local law that most closely approximates an absolute waiver of all civil
4490+liability in connection with the Program, unless a warranty or assumption of
4491+liability accompanies a copy of the Program in return for a fee.
4492+
4493+## END OF TERMS AND CONDITIONS ###
4494+
4495+### How to Apply These Terms to Your New Programs
4496+
4497+If you develop a new program, and you want it to be of the greatest possible
4498+use to the public, the best way to achieve this is to make it free software
4499+which everyone can redistribute and change under these terms.
4500+
4501+To do so, attach the following notices to the program. It is safest to attach
4502+them to the start of each source file to most effectively state the exclusion
4503+of warranty; and each file should have at least the *copyright* line and a
4504+pointer to where the full notice is found.
4505+
4506+ <one line to give the program's name and a brief idea of what it does.>
4507+ Copyright (C) <year> <name of author>
4508+
4509+ This program is free software: you can redistribute it and/or modify
4510+ it under the terms of the GNU General Public License as published by
4511+ the Free Software Foundation, either version 3 of the License, or
4512+ (at your option) any later version.
4513+
4514+ This program is distributed in the hope that it will be useful,
4515+ but WITHOUT ANY WARRANTY; without even the implied warranty of
4516+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4517+ GNU General Public License for more details.
4518+
4519+ You should have received a copy of the GNU General Public License
4520+ along with this program. If not, see <http://www.gnu.org/licenses/>.
4521+
4522+Also add information on how to contact you by electronic and paper mail.
4523+
4524+If the program does terminal interaction, make it output a short notice like
4525+this when it starts in an interactive mode:
4526+
4527+ <program> Copyright (C) <year> <name of author>
4528+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
4529+ This is free software, and you are welcome to redistribute it
4530+ under certain conditions; type `show c' for details.
4531+
4532+The hypothetical commands `show w` and `show c` should show the appropriate
4533+parts of the General Public License. Of course, your program's commands might
4534+be different; for a GUI interface, you would use an *about box*.
4535+
4536+You should also get your employer (if you work as a programmer) or school, if
4537+any, to sign a *copyright disclaimer* for the program, if necessary. For more
4538+information on this, and how to apply and follow the GNU GPL, see
4539+[http://www.gnu.org/licenses/](http://www.gnu.org/licenses/).
4540+
4541+The GNU General Public License does not permit incorporating your program into
4542+proprietary programs. If your program is a subroutine library, you may consider
4543+it more useful to permit linking proprietary applications with the library. If
4544+this is what you want to do, use the GNU Lesser General Public License instead
4545+of this License. But first, please read
4546+[http://www.gnu.org/philosophy/why-not-lgpl.html](http://www.gnu.org/philosophy/why-not-lgpl.html).
4547diff --git a/uwidgets/MANIFEST.in b/uwidgets/MANIFEST.in
4548new file mode 100644
4549index 0000000..a47d446
4550--- /dev/null
4551+++ b/uwidgets/MANIFEST.in
4552@@ -0,0 +1,3 @@
4553+include LICENSE
4554+include README.md
4555+include uwidgets/x11/*.h
4556diff --git a/uwidgets/official-widgets/clock/clock.py b/uwidgets/official-widgets/clock/clock.py
4557new file mode 100755
4558index 0000000..121a106
4559--- /dev/null
4560+++ b/uwidgets/official-widgets/clock/clock.py
4561@@ -0,0 +1,104 @@
4562+#!/usr/bin/env python3
4563+
4564+"""
4565+This file is part of "blighty" and "uwidgets" which is released under GPL.
4566+
4567+See file LICENCE or go to http://www.gnu.org/licenses/ for full license
4568+details.
4569+
4570+uwidgets is a desktop widget creation and management library for Python 3.
4571+
4572+Copyright (c) 2022 Rudra Saraswat <rs2009@ubuntu.com>.
4573+Copyright (c) 2018 Gabriele N. Tornetta <phoenix1987@gmail.com>.
4574+All rights reserved.
4575+
4576+This program is free software: you can redistribute it and/or modify
4577+it under the terms of the GNU General Public License as published by
4578+the Free Software Foundation, either version 3 of the License, or
4579+(at your option) any later version.
4580+
4581+This program is distributed in the hope that it will be useful,
4582+but WITHOUT ANY WARRANTY; without even the implied warranty of
4583+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4584+GNU General Public License for more details.
4585+You should have received a copy of the GNU General Public License
4586+along with this program. If not, see <http://www.gnu.org/licenses/>.
4587+"""
4588+
4589+from uwidgets import CanvasGravity, brush
4590+from uwidgets.x11 import Canvas, start_event_loop
4591+
4592+import datetime
4593+import subprocess
4594+import configparser
4595+
4596+from math import pi as PI
4597+
4598+
4599+class Clock(Canvas):
4600+ def on_button_pressed(self, button, state, x, y):
4601+ if button == 3: # Right button
4602+ subprocess.run(['unity-control-center', 'datetime'])
4603+
4604+ def draw_circle_background(ctx):
4605+ ctx.arc(2, 1, 90, 0, 2*PI)
4606+ ctx.set_source_rgba(0, 0, 0, 0.6)
4607+ ctx.fill()
4608+
4609+ def draw_rect_background(ctx):
4610+ ctx.rectangle(-180, -180, 360, 360)
4611+ ctx.set_source_rgba(0, 0, 0, 0.6)
4612+ ctx.fill()
4613+
4614+ ctx.rectangle(-180, -100, 360, 3)
4615+ ctx.set_source_rgba(1, 1, 1, 1)
4616+ ctx.fill()
4617+
4618+ @brush
4619+ def hand(ctx, angle, length, thickness):
4620+ ctx.save()
4621+ ctx.set_source_rgba(1, 1, 1, 1)
4622+ ctx.set_line_width(thickness)
4623+ ctx.rotate(angle)
4624+ ctx.move_to(0, length * .2)
4625+ ctx.line_to(0, -length)
4626+ ctx.stroke()
4627+ ctx.restore()
4628+
4629+ def on_draw(self, ctx):
4630+ now = datetime.datetime.now()
4631+
4632+ ctx.translate(self.width >> 1, self.height >> 1)
4633+
4634+ getattr(ctx, f"draw_{config.get('settings', 'clock_style')}_background")()
4635+
4636+ ctx.hand(
4637+ angle = now.second / 30 * PI,
4638+ length = ((self.height >> 1) * .9) - 20,
4639+ thickness = 1
4640+ )
4641+
4642+ mins = now.minute + now.second / 60
4643+ ctx.hand(
4644+ angle = mins / 30 * PI,
4645+ length = ((self.height >> 1) * .8) - 20,
4646+ thickness = 3
4647+ )
4648+
4649+ hours = (now.hour % 12) + mins / 60
4650+ ctx.hand(
4651+ angle = hours / 6 * PI,
4652+ length = ((self.height >> 1) * .5) - 20,
4653+ thickness = 4.5
4654+ )
4655+
4656+if __name__ == "__main__":
4657+ config = configparser.ConfigParser()
4658+ config.read('settings.ini')
4659+ clock = Clock(int(config.get('settings', 'margin_x')),
4660+ int(config.get('settings', 'margin_y')),
4661+ 200,
4662+ 200,
4663+ gravity = getattr(CanvasGravity, str(config.get('settings', 'gravity'))))
4664+ clock.show()
4665+ start_event_loop()
4666diff --git a/uwidgets/official-widgets/clock/settings.ini b/uwidgets/official-widgets/clock/settings.ini
4667new file mode 100644
4668index 0000000..cae5b6b
4669--- /dev/null
4670+++ b/uwidgets/official-widgets/clock/settings.ini
4671@@ -0,0 +1,7 @@
4672+[settings]
4673+# supported options for gravity: NORTH_WEST, NORTH, NORTH_EAST, WEST, CENTER, EAST, SOUTH_WEST, SOUTH, SOUTH_EAST (default)
4674+gravity=SOUTH_EAST
4675+margin_x=360
4676+margin_y=150
4677+# supported options for gravity: rect (default), circle
4678+clock_style=rect
4679\ No newline at end of file
4680diff --git a/uwidgets/official-widgets/clock/widget.ini b/uwidgets/official-widgets/clock/widget.ini
4681new file mode 100644
4682index 0000000..b7d474e
4683--- /dev/null
4684+++ b/uwidgets/official-widgets/clock/widget.ini
4685@@ -0,0 +1,5 @@
4686+[widget]
4687+name=Clock
4688+summary=A clock widget for the Unity desktop.
4689+exec=python3 clock.py
4690+enabled=true
4691\ No newline at end of file
4692diff --git a/uwidgets/official-widgets/cpu/cpu.py b/uwidgets/official-widgets/cpu/cpu.py
4693new file mode 100755
4694index 0000000..acca57f
4695--- /dev/null
4696+++ b/uwidgets/official-widgets/cpu/cpu.py
4697@@ -0,0 +1,169 @@
4698+#!/usr/bin/env python3
4699+
4700+from math import pi as PI
4701+
4702+import configparser
4703+import psutil
4704+import cairo
4705+import os
4706+from uwidgets import CanvasGravity, TextAlign
4707+from uwidgets.legacy import Graph
4708+from uwidgets.x11 import Canvas, start_event_loop
4709+
4710+
4711+class AttrDict(dict):
4712+ def __init__(self, *args, **kwargs):
4713+ super(AttrDict, self).__init__(*args, **kwargs)
4714+ self.__dict__ = self
4715+
4716+class Fonts:
4717+ UBUNTU_NORMAL = "Ubuntu", cairo.FontSlant.NORMAL, cairo.FontWeight.NORMAL
4718+
4719+
4720+class Cpu(Canvas):
4721+ SIZE = (256, 256)
4722+ CORE_POLYGON = AttrDict({"height": 30, "length": 20})
4723+
4724+ def __init__(self, *args, **kwargs):
4725+ super().__init__(*args, **kwargs)
4726+
4727+ with open('/proc/cpuinfo', 'r') as fin:
4728+ raw_cpuinfo = fin.read().strip()
4729+
4730+ self.coreinfo = [
4731+ {
4732+ k.strip(): v
4733+ for k, v in [p.split(":") for p in core.split('\n')]
4734+ }
4735+ for core in raw_cpuinfo.split('\n\n')
4736+ ]
4737+
4738+ self.graph = Graph(0, 110, self.width, 40)
4739+
4740+ @staticmethod
4741+ def build(x = 0, y = 0, gravity = CanvasGravity.CENTER):
4742+ return Cpu(x, y, *Cpu.SIZE, gravity = gravity, interval = 2000)
4743+
4744+ def on_button_pressed(self, button, *args):
4745+ os.system('stacer')
4746+
4747+ def draw_polygon(c, n, x, y, size):
4748+ a = 2 * PI / n
4749+
4750+ c.save()
4751+
4752+ c.translate(x, y)
4753+ c.move_to(size, 0)
4754+ for i in range(n):
4755+ c.rotate(a)
4756+ c.line_to(size, 0)
4757+ c.stroke()
4758+
4759+ c.restore()
4760+
4761+ def draw_core_polygon(c, x, y):
4762+ size = Cpu.CORE_POLYGON.height
4763+ length = Cpu.CORE_POLYGON.length
4764+
4765+ c.save()
4766+
4767+ c.translate(x, y)
4768+
4769+ c.set_source_rgb(.8, .8, .8)
4770+
4771+ cpus = psutil.cpu_percent(0.1, percpu = True)
4772+ n = len(cpus)
4773+ a = 2 * PI / n
4774+
4775+ c.set_line_width(1)
4776+ c.draw_polygon(n, 0, 0, size)
4777+
4778+ c.set_line_width(2)
4779+ c.set_source_rgb(1, 1, 1)
4780+ c.move_to(size + length * cpus[-1] / 100, 0)
4781+ for i in range(n):
4782+ c.rotate(a)
4783+ c.line_to(size + length * cpus[i] / 100, 0)
4784+ c.stroke()
4785+
4786+ value = int(sum(cpus) / n)
4787+ c.canvas.graph.push_value(value)
4788+
4789+ c.set_font_size(18)
4790+ c.write_text(0, 0, '{}%'.format(value), TextAlign.CENTER_MIDDLE)
4791+
4792+ c.restore()
4793+
4794+ return value
4795+
4796+ def draw_processes(c):
4797+ ps = [
4798+ p.info
4799+ for p in psutil.process_iter(attrs=['pid', 'name', 'cpu_percent'])
4800+ ]
4801+
4802+ ps = sorted(ps, key=lambda p: p["cpu_percent"], reverse=True)[:5]
4803+
4804+ y = 170
4805+ c.save()
4806+ c.select_font_face(*Fonts.UBUNTU_NORMAL)
4807+ c.set_font_size(12)
4808+ for p in ps:
4809+ c.write_text(48, y, str(p["pid"]), align = TextAlign.TOP_RIGHT)
4810+ c.write_text(52, y, p["name"][:24])
4811+ c.write_text(
4812+ c.canvas.width - 15, y, "{}%".format(p["cpu_percent"]),
4813+ align=TextAlign.TOP_RIGHT
4814+ )
4815+ y += 18
4816+
4817+ c.restore()
4818+
4819+ def draw_cpu_name(c):
4820+ c.save()
4821+ c.set_font_size(12)
4822+ c.write_text(
4823+ 15, 110,
4824+ c.canvas.coreinfo[0]["model name"].strip()
4825+ .replace("(TM)", "™")
4826+ .replace("(R)", "©")
4827+ )
4828+ c.restore()
4829+
4830+ def draw_background(c):
4831+ size = c.canvas.get_size()
4832+ c.rectangle(0, 0, *size)
4833+ c.set_source_rgba(0, 0, 0, 0.6)
4834+ c.fill()
4835+
4836+ c.rectangle(0, 0, c.canvas.width, 3)
4837+ c.set_source_rgba(1, 1, 1, 1)
4838+ c.fill()
4839+
4840+ def on_draw(self, c):
4841+ c.draw_background()
4842+
4843+ c.select_font_face(*Fonts.UBUNTU_NORMAL)
4844+ c.set_font_size(36)
4845+ c.set_source_rgb(1, 1, 1)
4846+
4847+ w, h = Cpu.SIZE
4848+
4849+ y_poly = (Cpu.CORE_POLYGON.height + Cpu.CORE_POLYGON.length)
4850+
4851+ c.write_text(15, y_poly, "CPU", align = TextAlign.TOP_LEFT)
4852+ c.draw_core_polygon(w - y_poly, y_poly)
4853+ c.draw_processes()
4854+ c.draw_cpu_name()
4855+
4856+ c.set_source_rgb(1, 1, 1)
4857+ self.graph.draw(c)
4858+
4859+
4860+if __name__ == "__main__":
4861+ config = configparser.ConfigParser()
4862+ config.read('settings.ini')
4863+ Cpu.build(int(config.get('settings', 'margin_x')),
4864+ int(config.get('settings', 'margin_y')),
4865+ gravity = getattr(CanvasGravity, config.get('settings', 'gravity'))).show()
4866+ start_event_loop()
4867diff --git a/uwidgets/official-widgets/cpu/settings.ini b/uwidgets/official-widgets/cpu/settings.ini
4868new file mode 100644
4869index 0000000..f3f8091
4870--- /dev/null
4871+++ b/uwidgets/official-widgets/cpu/settings.ini
4872@@ -0,0 +1,5 @@
4873+[settings]
4874+# supported options for gravity: NORTH_WEST, NORTH, NORTH_EAST, WEST, CENTER, EAST, SOUTH_WEST, SOUTH, SOUTH_EAST (default)
4875+gravity=SOUTH_EAST
4876+margin_x=20
4877+margin_y=150
4878\ No newline at end of file
4879diff --git a/uwidgets/official-widgets/cpu/widget.ini b/uwidgets/official-widgets/cpu/widget.ini
4880new file mode 100644
4881index 0000000..49532fd
4882--- /dev/null
4883+++ b/uwidgets/official-widgets/cpu/widget.ini
4884@@ -0,0 +1,5 @@
4885+[widget]
4886+name=CPU
4887+summary=A system monitor widget for the Unity desktop (that links to Stacer).
4888+exec=python3 cpu.py
4889+enabled=true
4890\ No newline at end of file
4891diff --git a/uwidgets/official-widgets/spotify/settings.ini b/uwidgets/official-widgets/spotify/settings.ini
4892new file mode 100644
4893index 0000000..4784595
4894--- /dev/null
4895+++ b/uwidgets/official-widgets/spotify/settings.ini
4896@@ -0,0 +1,5 @@
4897+[settings]
4898+# supported options for gravity: NORTH_WEST, NORTH, NORTH_EAST, WEST, CENTER, EAST, SOUTH_WEST, SOUTH, SOUTH_EAST (default)
4899+gravity=SOUTH_EAST
4900+margin_x=20
4901+margin_y=20
4902\ No newline at end of file
4903diff --git a/uwidgets/official-widgets/spotify/spotify.py b/uwidgets/official-widgets/spotify/spotify.py
4904new file mode 100755
4905index 0000000..a8e4c86
4906--- /dev/null
4907+++ b/uwidgets/official-widgets/spotify/spotify.py
4908@@ -0,0 +1,176 @@
4909+#!/usr/bin/env python3
4910+
4911+"""
4912+This file is part of "blighty" and "uwidgets" which is released under GPL.
4913+
4914+See file LICENCE or go to http://www.gnu.org/licenses/ for full license
4915+details.
4916+
4917+uwidgets is a desktop widget creation and management library for Python 3.
4918+
4919+Copyright (c) 2022 Rudra Saraswat <rs2009@ubuntu.com>.
4920+Copyright (c) 2018 Gabriele N. Tornetta <phoenix1987@gmail.com>.
4921+All rights reserved.
4922+
4923+This program is free software: you can redistribute it and/or modify
4924+it under the terms of the GNU General Public License as published by
4925+the Free Software Foundation, either version 3 of the License, or
4926+(at your option) any later version.
4927+
4928+This program is distributed in the hope that it will be useful,
4929+but WITHOUT ANY WARRANTY; without even the implied warranty of
4930+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4931+GNU General Public License for more details.
4932+You should have received a copy of the GNU General Public License
4933+along with this program. If not, see <http://www.gnu.org/licenses/>.
4934+"""
4935+
4936+from uwidgets import CanvasGravity
4937+from uwidgets.x11 import Canvas, start_event_loop
4938+from uwidgets import CanvasType
4939+
4940+import cairo
4941+import shutil
4942+import requests
4943+import subprocess
4944+import configparser
4945+
4946+from gi.repository import GLib
4947+
4948+from PIL import Image
4949+from pydbus import SessionBus
4950+
4951+
4952+class Fonts:
4953+ UBUNTU_NORMAL = "Ubuntu", cairo.FontSlant.NORMAL, cairo.FontWeight.NORMAL
4954+
4955+
4956+class SpotifyDBus:
4957+ def __init__(self):
4958+ self.proxy = SessionBus().get(
4959+ 'org.mpris.MediaPlayer2.spotify',
4960+ '/org/mpris/MediaPlayer2'
4961+ )
4962+
4963+ def get_metadata(self):
4964+ return {k.split(':')[1]: v for k, v in self.proxy.Metadata.items()}
4965+
4966+ def toggle_play(self):
4967+ self.proxy.PlayPause()
4968+
4969+ def is_paused(self):
4970+ return self.proxy.PlaybackStatus == "Paused"
4971+
4972+
4973+class Spotify(Canvas):
4974+ def __init__(self, *args, **kwargs):
4975+ super().__init__(*args, **kwargs)
4976+
4977+ self.init_dbus()
4978+
4979+ def init_dbus(self):
4980+ try:
4981+ self.spotify = SpotifyDBus()
4982+ except GLib.Error:
4983+ self.spotify = None
4984+
4985+ self.last_art_url = ""
4986+
4987+ def on_button_pressed(self, button, state, x, y):
4988+ if button == 1: # Left button
4989+ self.spotify.toggle_play()
4990+ elif button == 3: # Right button
4991+ subprocess.run(['spotify'])
4992+
4993+ def draw_background(ctx):
4994+ size = ctx.canvas.get_size()
4995+ ctx.rectangle(0, 0, *size)
4996+ ctx.set_source_rgba(0, 0, 0, 0.6)
4997+ ctx.fill()
4998+
4999+ def draw_decoration(ctx):
5000+ ctx.rectangle(0, 0, ctx.canvas.width, 3)
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches