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
diff --git a/.gitignore b/.gitignore
index d58747c..da7cffb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,16 +1,90 @@
1build1build
2services/panel-marshal.c
3services/panel-marshal.h
4.AUTHORS.sed2.AUTHORS.sed
5tests/autopilot/dist
6tests/autopilot/unity.egg-info
7*.log3*.log
8*.debhelper4*.debhelper
9*.substvars5*.substvars
10*.swp6*.swp
7.vscode/
11debian/tmp8debian/tmp
12debian/files9debian/files
13obj-*/10obj-*/
14debian/libunity-core-*/11debian/libunity-core-6.0-9/
15debian/unity-*/12debian/libunity-core-6.0-dev/
13debian/unity-autopilot/
14debian/unity-uwidgets/
15debian/unity-services/
16debian/unity-schemas/
16debian/unity/17debian/unity/
18
19### UWidgets
20
21# Byte-compiled / optimized / DLL files
22__pycache__/
23*.py[cod]
24*$py.class
25
26# C extensions
27*.so
28
29# Distribution / packaging
30.Python
31build/
32develop-eggs/
33dist/
34downloads/
35eggs/
36.eggs/
37lib/
38lib64/
39parts/
40sdist/
41var/
42wheels/
43*.egg-info/
44.installed.cfg
45*.egg
46MANIFEST
47
48# PyInstaller
49# Usually these files are written by a python script from a template
50# before PyInstaller builds the exe, so as to inject date/other infos into it.
51*.manifest
52*.spec
53
54# Installer logs
55pip-log.txt
56pip-delete-this-directory.txt
57
58# Unit test / coverage reports
59htmlcov/
60.tox/
61.coverage
62.coverage.*
63.cache
64nosetests.xml
65coverage.xml
66*.cover
67.hypothesis/
68.pytest_cache/
69
70# Translations
71*.mo
72*.pot
73
74# Sphinx documentation
75docs/*build/
76
77# PyBuilder
78target/
79
80# pyenv
81.python-version
82
83# Environments
84.env
85.venv
86env/
87venv/
88ENV/
89env.bak/
90venv.bak/
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1d58a46..bd237ca 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,7 +10,7 @@ include (GNUInstallDirs)
10#10#
11set (PROJECT_NAME "unity")11set (PROJECT_NAME "unity")
12set (UNITY_MAJOR 7)12set (UNITY_MAJOR 7)
13set (UNITY_MINOR 6)13set (UNITY_MINOR 7)
14set (UNITY_MICRO 0)14set (UNITY_MICRO 0)
15set (UNITY_VERSION "${UNITY_MAJOR}.${UNITY_MINOR}.${UNITY_MICRO}")15set (UNITY_VERSION "${UNITY_MAJOR}.${UNITY_MINOR}.${UNITY_MICRO}")
16set (UNITY_API_VERSION "6.0")16set (UNITY_API_VERSION "6.0")
diff --git a/README b/README
index 801461a..131489c 100644
--- a/README
+++ b/README
@@ -19,3 +19,7 @@
19 D-Bus activation. This is used for testing how the panel reacts when it19 D-Bus activation. This is used for testing how the panel reacts when it
20 starts before the service does.20 starts before the service does.
2121
22 Credits
23--------------------------------------------------------------------------------
24
25UWidgets is based on the Blighty project.
22\ No newline at end of file26\ No newline at end of file
diff --git a/dash/DashView.cpp b/dash/DashView.cpp
index dc4e1b2..0fd0597 100644
--- a/dash/DashView.cpp
+++ b/dash/DashView.cpp
@@ -39,6 +39,7 @@
39#include "unity-shared/UBusMessages.h"39#include "unity-shared/UBusMessages.h"
40#include "unity-shared/UnitySettings.h"40#include "unity-shared/UnitySettings.h"
41#include "unity-shared/WindowManager.h"41#include "unity-shared/WindowManager.h"
42#include "unity-shared/FileManager.h"
4243
43namespace unity44namespace unity
44{45{
@@ -231,83 +232,12 @@ void DashView::OnResultActivated(ResultView::ActivateType type, LocalResult cons
231232
232void DashView::BuildPreview(Preview::Ptr model)233void DashView::BuildPreview(Preview::Ptr model)
233{234{
234 if (!preview_displaying_)235 // Previews have been removed, so this function has been left blank until we eliminate all of the preview-related code.
235 {
236 StartPreviewAnimation();
237
238 content_view_->SetPresentRedirectedView(false);
239 preview_scope_view_ = active_scope_view_;
240 if (preview_scope_view_)
241 {
242 preview_scope_view_->ForceCategoryExpansion(stored_activated_unique_id_, true);
243 preview_scope_view_->EnableResultTextures(true);
244 preview_scope_view_->PushFilterExpansion(false);
245 }
246
247 if (!preview_container_)
248 {
249 preview_container_ = new previews::PreviewContainer();
250 preview_container_->SetRedirectRenderingToTexture(true);
251 AddChild(preview_container_.GetPointer());
252 preview_container_->SetParentObject(this);
253 }
254 preview_container_->Preview(model, previews::Navigation::NONE); // no swipe left or right
255 preview_container_->scale = scale();
256 preview_container_->SetGeometry(scopes_layout_->GetGeometry());
257 preview_displaying_ = true;
258
259 // connect to nav left/right signals to request nav left/right movement.
260 preview_container_->navigate_left.connect([this] () {
261 preview_navigation_mode_ = previews::Navigation::LEFT;
262
263 // sends a message to all result views, sending the the uri of the current preview result
264 // and the unique id of the result view that should be handling the results
265 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()));
266 });
267
268 preview_container_->navigate_right.connect([this] () {
269 preview_navigation_mode_ = previews::Navigation::RIGHT;
270
271 // sends a message to all result views, sending the the uri of the current preview result
272 // and the unique id of the result view that should be handling the results
273 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()));
274 });
275
276 preview_container_->request_close.connect([this] () { ClosePreview(); });
277 }
278 else
279 {
280 // got a new preview whilst already displaying, we probably clicked a navigation button.
281 preview_container_->Preview(model, preview_navigation_mode_); // TODO
282 preview_container_->scale = scale();
283 }
284
285 if (G_LIKELY(preview_state_machine_.left_results() > 0 && preview_state_machine_.right_results() > 0))
286 preview_container_->DisableNavButton(previews::Navigation::NONE);
287 else if (preview_state_machine_.left_results() > 0)
288 preview_container_->DisableNavButton(previews::Navigation::RIGHT);
289 else if (preview_state_machine_.right_results() > 0)
290 preview_container_->DisableNavButton(previews::Navigation::LEFT);
291 else
292 preview_container_->DisableNavButton(previews::Navigation::BOTH);
293
294 QueueDraw();
295}236}
296237
297void DashView::ClosePreview()238void DashView::ClosePreview()
298{239{
299 if (preview_displaying_)240 // Previews have been removed, so this function has been left blank until we eliminate all of the preview-related code.
300 {
301 EndPreviewAnimation();
302
303 preview_displaying_ = false;
304 }
305
306 preview_navigation_mode_ = previews::Navigation::NONE;
307
308 // re-focus dash view component.
309 nux::GetWindowCompositor().SetKeyFocusArea(default_focus());
310 QueueDraw();
311}241}
312242
313void DashView::StartPreviewAnimation()243void DashView::StartPreviewAnimation()
@@ -555,6 +485,11 @@ void DashView::SetupViews()
555 content_view_->SetLayout(content_layout_);485 content_view_->SetLayout(content_layout_);
556 layout_->AddView(content_view_, 1, nux::MINOR_POSITION_START, nux::MINOR_SIZE_FULL);486 layout_->AddView(content_view_, 1, nux::MINOR_POSITION_START, nux::MINOR_SIZE_FULL);
557487
488 scope_bar_ = new ScopeBar();
489 AddChild(scope_bar_);
490 scope_bar_->scope_activated.connect(sigc::mem_fun(this, &DashView::OnScopeBarActivated));
491 content_layout_->AddView(scope_bar_, 0, nux::MINOR_POSITION_CENTER);
492
558 search_bar_layout_ = new nux::HLayout();493 search_bar_layout_ = new nux::HLayout();
559 content_layout_->AddLayout(search_bar_layout_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);494 content_layout_->AddLayout(search_bar_layout_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);
560495
@@ -578,11 +513,6 @@ void DashView::SetupViews()
578 scopes_layout_ = new nux::VLayout();513 scopes_layout_ = new nux::VLayout();
579 content_layout_->AddLayout(scopes_layout_, 1, nux::MINOR_POSITION_START);514 content_layout_->AddLayout(scopes_layout_, 1, nux::MINOR_POSITION_START);
580515
581 scope_bar_ = new ScopeBar();
582 AddChild(scope_bar_);
583 scope_bar_->scope_activated.connect(sigc::mem_fun(this, &DashView::OnScopeBarActivated));
584 content_layout_->AddView(scope_bar_, 0, nux::MINOR_POSITION_CENTER);
585
586 OnDPIChanged();516 OnDPIChanged();
587}517}
588518
@@ -701,24 +631,24 @@ nux::Geometry DashView::GetBestFitGeometry(nux::Geometry const& for_geo)
701 style.GetPlacesGroupResultTopPadding().CP(scale) +631 style.GetPlacesGroupResultTopPadding().CP(scale) +
702 style.GetTileHeight().CP(scale));632 style.GetTileHeight().CP(scale));
703633
704 int half = for_geo.width / 2;634 // let's show five tiles per row
705635 width = tile_width * 5;
706 // if default dash size is bigger than half a screens worth of items, go for that.
707 while ((width += tile_width) < half);
708636
709 width = std::max(width, tile_width * DASH_TILE_HORIZONTAL_COUNT);
710 width += style.GetVSeparatorSize().CP(scale);637 width += style.GetVSeparatorSize().CP(scale);
711 width += style.GetPlacesGroupResultLeftPadding().CP(scale) + DASH_RESULT_RIGHT_PAD.CP(scale);638 width += style.GetPlacesGroupResultLeftPadding().CP(scale) + DASH_RESULT_RIGHT_PAD.CP(scale);
712639
713 height = style.GetHSeparatorSize().CP(scale);640 // width shouldn't be bigger than the geo available.
714 height += style.GetDashViewTopPadding().CP(scale);
715 height += search_bar_->GetGeometry().height;
716 height += category_height * DASH_DEFAULT_CATEGORY_COUNT; // adding three categories
717 height += scope_bar_->GetGeometry().height;
718
719 // width/height shouldn't be bigger than the geo available.
720 width = std::min(width, for_geo.width); // launcher width is taken into account in for_geo.641 width = std::min(width, for_geo.width); // launcher width is taken into account in for_geo.
721 height = std::min(height, for_geo.height - vertical_offset); // panel height is not taken into account in for_geo.642 height = for_geo.height - vertical_offset;
643
644 if (Settings::Instance().launcher_position() == LauncherPosition::BOTTOM) {
645 height = style.GetHSeparatorSize().CP(scale);
646 height += style.GetDashViewTopPadding().CP(scale);
647 height += search_bar_->GetGeometry().height;
648 height += category_height * 3;
649 height += scope_bar_->GetGeometry().height;
650 height = std::min(height, for_geo.height - vertical_offset);
651 }
722652
723 return nux::Geometry(0, vertical_offset, width, height);653 return nux::Geometry(0, vertical_offset, width, height);
724}654}
@@ -1091,59 +1021,7 @@ void DashView::DrawPreviewResultTextures(nux::GraphicsEngine& graphics_engine, b
1091}1021}
10921022
1093void DashView::DrawPreview(nux::GraphicsEngine& graphics_engine, bool force_draw)1023void DashView::DrawPreview(nux::GraphicsEngine& graphics_engine, bool force_draw)
1094{1024{ }
1095 if (animate_preview_value_ > 0.0f)
1096 {
1097 bool animating = animate_split_value_ != 1.0f || animate_preview_value_ < 1.0f;
1098 bool preview_force_draw = force_draw || animating || IsFullRedraw();
1099
1100 if (preview_force_draw)
1101 nux::GetPainter().PushBackgroundStack();
1102
1103 if (animate_preview_value_ < 1.0f && preview_container_->RedirectRenderingToTexture())
1104 {
1105 preview_container_->SetPresentRedirectedView(false);
1106 preview_container_->ProcessDraw(graphics_engine, preview_force_draw);
1107
1108 unsigned int alpha, src, dest = 0;
1109 graphics_engine.GetRenderStates().GetBlend(alpha, src, dest);
1110 graphics_engine.GetRenderStates().SetBlend(true, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
1111
1112 nux::ObjectPtr<nux::IOpenGLBaseTexture> preview_texture = preview_container_->BackupTexture();
1113 if (preview_texture)
1114 {
1115 nux::TexCoordXForm texxform;
1116 texxform.FlipVCoord(true);
1117 texxform.uoffset = 0.0f;
1118 texxform.voffset = 0.0f;
1119 texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_COORD);
1120
1121 nux::Geometry const& geo_preview = preview_container_->GetGeometry();
1122 graphics_engine.QRP_1Tex
1123 (
1124 geo_preview.x,
1125 geo_preview.y,
1126 geo_preview.width,
1127 geo_preview.height,
1128 preview_texture,
1129 texxform,
1130 nux::Color(animate_preview_value_, animate_preview_value_, animate_preview_value_, animate_preview_value_)
1131 );
1132 }
1133
1134 preview_container_->SetPresentRedirectedView(true);
1135
1136 graphics_engine.GetRenderStates().SetBlend(alpha, src, dest);
1137 }
1138 else
1139 {
1140 preview_container_->ProcessDraw(graphics_engine, preview_force_draw);
1141 }
1142
1143 if (preview_force_draw)
1144 nux::GetPainter().PopBackgroundStack();
1145 }
1146}
11471025
1148void DashView::OnActivateRequest(GVariant* args)1026void DashView::OnActivateRequest(GVariant* args)
1149{1027{
diff --git a/dash/PlacesGroup.cpp b/dash/PlacesGroup.cpp
index 7a1f8db..b83be9b 100755
--- a/dash/PlacesGroup.cpp
+++ b/dash/PlacesGroup.cpp
@@ -52,6 +52,9 @@ namespace
52const nux::Color EXPAND_DEFAULT_TEXT_COLOR(1.0f, 1.0f, 1.0f, 0.5f);52const nux::Color EXPAND_DEFAULT_TEXT_COLOR(1.0f, 1.0f, 1.0f, 0.5f);
53const float EXPAND_DEFAULT_ICON_OPACITY = 0.5f;53const float EXPAND_DEFAULT_ICON_OPACITY = 0.5f;
5454
55// Category heading
56const RawPixel HEADER_VERTICAL_MARGIN = 10_em;
57
55// Category highlight58// Category highlight
56const RawPixel HIGHLIGHT_RIGHT_PADDING = 10_em;59const RawPixel HIGHLIGHT_RIGHT_PADDING = 10_em;
57const RawPixel HIGHLIGHT_HEIGHT = 24_em;60const RawPixel HIGHLIGHT_HEIGHT = 24_em;
@@ -229,6 +232,7 @@ PlacesGroup::UpdatePlacesGroupSize()
229232
230 _header_layout->SetSpaceBetweenChildren(SPACE_BETWEEN_CHILDREN.CP(scale()));233 _header_layout->SetSpaceBetweenChildren(SPACE_BETWEEN_CHILDREN.CP(scale()));
231 _header_layout->SetLeftAndRightPadding(_style.GetCategoryHeaderLeftPadding().CP(scale), 0);234 _header_layout->SetLeftAndRightPadding(_style.GetCategoryHeaderLeftPadding().CP(scale), 0);
235 _header_layout->SetVerticalExternalMargin(HEADER_VERTICAL_MARGIN);
232236
233 _icon->SetMinMaxSize(icon_size, icon_size);237 _icon->SetMinMaxSize(icon_size, icon_size);
234238
diff --git a/dash/ResultViewGrid.cpp b/dash/ResultViewGrid.cpp
index 78a01de..1669260 100644
--- a/dash/ResultViewGrid.cpp
+++ b/dash/ResultViewGrid.cpp
@@ -55,7 +55,7 @@ namespace
5555
56 const int DOUBLE_CLICK_SPEED = 500; //500 ms (double-click speed hardcoded to 400 ms in nux)56 const int DOUBLE_CLICK_SPEED = 500; //500 ms (double-click speed hardcoded to 400 ms in nux)
5757
58 const RawPixel WIDTH_PADDING = 25_em;58 const RawPixel WIDTH_PADDING = 25_em;
59 const RawPixel SCROLLBAR_WIDTH = 3_em;59 const RawPixel SCROLLBAR_WIDTH = 3_em;
6060
61 const std::string APPLICATION_URI_PREFIX = "application://";61 const std::string APPLICATION_URI_PREFIX = "application://";
diff --git a/dash/ScopeBar.cpp b/dash/ScopeBar.cpp
index 027675c..5bba477 100644
--- a/dash/ScopeBar.cpp
+++ b/dash/ScopeBar.cpp
@@ -58,7 +58,7 @@ void ScopeBar::SetupBackground()
58 rop.Blend = true;58 rop.Blend = true;
59 rop.SrcBlend = GL_ONE;59 rop.SrcBlend = GL_ONE;
60 rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA;60 rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA;
61 bg_layer_.reset(new nux::ColorLayer(nux::Color(0.0f, 0.0f, 0.0f, 0.2f), true, rop));61 bg_layer_.reset(new nux::ColorLayer(nux::Color(0.0f, 0.0f, 0.0f, 0.0f), true, rop));
62}62}
6363
64void ScopeBar::UpdateScale(double scale)64void ScopeBar::UpdateScale(double scale)
diff --git a/dash/StandaloneDash.cpp b/dash/StandaloneDash.cpp
index e869ace..b14d360 100644
--- a/dash/StandaloneDash.cpp
+++ b/dash/StandaloneDash.cpp
@@ -41,8 +41,8 @@
41#include <UnityCore/GSettingsScopes.h>41#include <UnityCore/GSettingsScopes.h>
42#include <UnityCore/ScopeProxyInterface.h>42#include <UnityCore/ScopeProxyInterface.h>
4343
44const unity::RawPixel WIDTH(1024);44const unity::RawPixel WIDTH(1280);
45const unity::RawPixel HEIGHT(768);45const unity::RawPixel HEIGHT(720);
4646
47using namespace unity::dash;47using namespace unity::dash;
4848
@@ -126,7 +126,7 @@ int main(int argc, char **argv)
126 0, &TestRunner::InitWindowThread, test_runner));126 0, &TestRunner::InitWindowThread, test_runner));
127127
128 nux::ObjectPtr<nux::BaseTexture> background_tex;128 nux::ObjectPtr<nux::BaseTexture> background_tex;
129 background_tex.Adopt(nux::CreateTextureFromFile("/usr/share/backgrounds/warty-final-ubuntu.png"));129 background_tex.Adopt(nux::CreateTextureFromFile("/usr/share/backgrounds/ubuntu-unity/ubuntu-unity-default.png"));
130 nux::TexCoordXForm texxform;130 nux::TexCoordXForm texxform;
131 auto tex_layer = std::make_shared<nux::TextureLayer>(background_tex->GetDeviceTexture(), texxform, nux::color::White);131 auto tex_layer = std::make_shared<nux::TextureLayer>(background_tex->GetDeviceTexture(), texxform, nux::color::White);
132 wt->SetWindowBackgroundPaintLayer(tex_layer.get());132 wt->SetWindowBackgroundPaintLayer(tex_layer.get());
diff --git a/debian/changelog b/debian/changelog
index a3a4d5d..1767d6d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
1unity (7.7.0+23.04.20230222-0ubuntu1) lunar; urgency=medium
2
3 * Added UWidgets, a new widget system for Unity based on Blighty
4 * Made the dash vertical and moved the scope bar to the top
5 * Increased the panel height to 30
6 * Added indicator-notifications as a Recommend
7
8 -- Rudra Saraswat <ruds@ruds.io> Tue, 21 Feb 2022 15:38:23 +0530
9
1unity (7.6.0+22.10.20220913-0ubuntu1) kinetic; urgency=medium10unity (7.6.0+22.10.20220913-0ubuntu1) kinetic; urgency=medium
211
3 [ Rudra Saraswat ]12 [ Rudra Saraswat ]
diff --git a/debian/control b/debian/control
index c61edb5..2484f22 100644
--- a/debian/control
+++ b/debian/control
@@ -11,6 +11,8 @@ Build-Depends: cmake (>= 3.17.0),
11 dh-translations (>= 94),11 dh-translations (>= 94),
12 dh-python,12 dh-python,
13 google-mock (>= 1.6.0+svn437),13 google-mock (>= 1.6.0+svn437),
14 gir1.2-gtk-3.0,
15 gir1.2-glib-2.0,
14 gsettings-desktop-schemas-dev,16 gsettings-desktop-schemas-dev,
15 gsettings-ubuntu-schemas (>= 0.0.7+17.10.20170922),17 gsettings-ubuntu-schemas (>= 0.0.7+17.10.20170922),
16 intltool (>= 0.35.0),18 intltool (>= 0.35.0),
@@ -48,17 +50,21 @@ Build-Depends: cmake (>= 3.17.0),
48 libxcb-icccm4-dev,50 libxcb-icccm4-dev,
49 libxfixes-dev (>= 1:5.0.1),51 libxfixes-dev (>= 1:5.0.1),
50 libxi-dev (>= 2:1.7.1.901),52 libxi-dev (>= 2:1.7.1.901),
53 libxinerama-dev,
51 libxpathselect-dev (>=1.4),54 libxpathselect-dev (>=1.4),
52 libxtst-dev,55 libxtst-dev,
53 libzeitgeist-2.0-dev,56 libzeitgeist-2.0-dev,
54 pkg-config,57 pkg-config,
55 python3-all (>= 3.4),58 python3-all (>= 3.4),
59 python3-dev,
60 python3-gi,
56 python3-setuptools,61 python3-setuptools,
57 quilt,62 quilt,
58 systemd,63 systemd,
64 xorg,
59 xserver-xorg-video-dummy,65 xserver-xorg-video-dummy,
60 xsltproc,66 xsltproc,
61 yaru-theme-icon,67 yaru-theme-icon
62Standards-Version: 3.9.568Standards-Version: 3.9.5
63Homepage: https://launchpad.net/unity69Homepage: https://launchpad.net/unity
64# If you aren't a member of ~unity-team but need to upload packaging changes,70# If you aren't a member of ~unity-team but need to upload packaging changes,
@@ -95,6 +101,8 @@ Recommends: unity-control-center,
95 hud,101 hud,
96 session-shortcuts,102 session-shortcuts,
97 unity-session,103 unity-session,
104 unity-uwidgets,
105 indicator-notifications
98Breaks: unity-lens-applications (<< 5.12.0-0ubuntu2),106Breaks: unity-lens-applications (<< 5.12.0-0ubuntu2),
99 unity-lens-files (<< 5.10.0-0ubuntu2),107 unity-lens-files (<< 5.10.0-0ubuntu2),
100 unity-lens-music (<< 6.0.0),108 unity-lens-music (<< 6.0.0),
@@ -220,3 +228,28 @@ Description: Autopiloted tests for Unity
220 bindings to be able to write tests in python as well as the full test suite228 bindings to be able to write tests in python as well as the full test suite
221 for Unity.229 for Unity.
222230
231Package: unity-uwidgets
232Section: python
233Architecture: all
234Depends: ${misc:Depends},
235 ${python3:Depends},
236 python3,
237 xorg,
238 libxinerama-dev,
239 libcairo2-dev,
240 python3-gi,
241 python3-pil,
242 python3-pydbus,
243 python3-psutil,
244 gir1.2-gtk-3.0,
245 gir1.2-glib-2.0,
246Description: Widgets for Unity
247 Unity is a desktop experience that sings. Designed by Canonical and the Ayatana
248 community, Unity is all about the combination of familiarity and the future. We
249 bring together visual design, analysis of user experience testing, modern
250 graphics technologies and a deep understanding of the free software landscape
251 to produce what we hope will be the lightest, most elegant and most delightful
252 way to use your PC.
253 .
254 This package contains support for widgets for Unity, based on Blighty.
255
diff --git a/debian/rules b/debian/rules
index 4b29c43..0386984 100755
--- a/debian/rules
+++ b/debian/rules
@@ -35,13 +35,12 @@ override_dh_auto_configure:
3535
36override_dh_install:36override_dh_install:
37 # install autopilot tests37 # install autopilot tests
38 cd tests/autopilot; \38 cd tests/autopilot; python3 setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb;
39 set -ex; for python in $(shell py3versions -r); do \
40 $$python setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; \
41 done; \
42 cd $(CURDIR)
43 find debian/tmp/usr/lib -name \*.*a -exec rm {} \;39 find debian/tmp/usr/lib -name \*.*a -exec rm {} \;
44 rm -rf debian/tmp/usr/share/gconf/schemas40 rm -rf debian/tmp/usr/share/gconf/schemas
41 # install uwidgets
42 cd uwidgets; python3 setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb
43 install -Dm755 uwidgets/uwidgets-runner.desktop $(CURDIR)/debian/tmp/etc/xdg/autostart/uwidgets-runner.desktop
45 dh_install --fail-missing44 dh_install --fail-missing
4645
47override_dh_gencontrol:46override_dh_gencontrol:
diff --git a/debian/unity-uwidgets.install b/debian/unity-uwidgets.install
48new file mode 10064447new file mode 100644
index 0000000..5bbbd88
--- /dev/null
+++ b/debian/unity-uwidgets.install
@@ -0,0 +1,3 @@
1usr/lib/python*/*/uwidgets*
2usr/bin/uwidgets-runner
3etc/xdg/autostart/uwidgets-runner.desktop
0\ No newline at end of file4\ No newline at end of file
diff --git a/debian/unity.install b/debian/unity.install
index b60c762..224959e 100644
--- a/debian/unity.install
+++ b/debian/unity.install
@@ -1,6 +1,6 @@
1etc/compizconfig1etc/compizconfig
2etc/pam.d2etc/pam.d
3usr/bin3usr/bin/unity
4usr/lib/*/compiz/libunity*.so4usr/lib/*/compiz/libunity*.so
5usr/lib/*/unity/unity-active-plugins-safety-check5usr/lib/*/unity/unity-active-plugins-safety-check
6usr/lib/*/unity/compiz-config-profile-setter6usr/lib/*/unity/compiz-config-profile-setter
diff --git a/launcher/BFBLauncherIcon.cpp b/launcher/BFBLauncherIcon.cpp
index 68ff72d..eece73a 100644
--- a/launcher/BFBLauncherIcon.cpp
+++ b/launcher/BFBLauncherIcon.cpp
@@ -143,9 +143,7 @@ void BFBLauncherIcon::UpdateDefaultSearchText()
143{143{
144 auto home_scope = reader_->GetScopeDataById("home.scope");144 auto home_scope = reader_->GetScopeDataById("home.scope");
145145
146 tooltip_text = ((Settings::Instance().remote_content) ?146 tooltip_text = _("Search your computer");
147 _("Search your computer and online sources") :
148 _("Search your computer"));
149147
150 if (home_scope)148 if (home_scope)
151 {149 {
diff --git a/launcher/FileManagerLauncherIcon.cpp b/launcher/FileManagerLauncherIcon.cpp
index 019c550..7e1560a 100644
--- a/launcher/FileManagerLauncherIcon.cpp
+++ b/launcher/FileManagerLauncherIcon.cpp
@@ -23,7 +23,7 @@
23#include <NuxCore/Logger.h>23#include <NuxCore/Logger.h>
24#include <UnityCore/DesktopUtilities.h>24#include <UnityCore/DesktopUtilities.h>
2525
26#include "unity-shared/FileManager.h"26#include "unity-shared/GnomeFileManager.h"
2727
28namespace unity28namespace unity
29{29{
diff --git a/launcher/Launcher.cpp b/launcher/Launcher.cpp
index e744757..a4f880a 100644
--- a/launcher/Launcher.cpp
+++ b/launcher/Launcher.cpp
@@ -562,10 +562,8 @@ void Launcher::SetupRenderArg(AbstractLauncherIcon::Ptr const& icon, RenderArg&
562 arg.progress_bias = IconProgressBias(icon);562 arg.progress_bias = IconProgressBias(icon);
563 arg.progress = CLAMP(icon->GetProgress(), 0.0f, 1.0f);563 arg.progress = CLAMP(icon->GetProgress(), 0.0f, 1.0f);
564 arg.draw_shortcut = shortcuts_shown_ && !hide_machine_.GetQuirk(LauncherHideMachine::PLACES_VISIBLE);564 arg.draw_shortcut = shortcuts_shown_ && !hide_machine_.GetQuirk(LauncherHideMachine::PLACES_VISIBLE);
565 arg.system_item = icon->GetIconType() == AbstractLauncherIcon::IconType::HOME ||565 arg.system_item = icon->GetIconType() == AbstractLauncherIcon::IconType::HUD;
566 icon->GetIconType() == AbstractLauncherIcon::IconType::HUD;566 arg.colorify_background = icon->GetIconType() == AbstractLauncherIcon::IconType::HUD ||
567 arg.colorify_background = icon->GetIconType() == AbstractLauncherIcon::IconType::HOME ||
568 icon->GetIconType() == AbstractLauncherIcon::IconType::HUD ||
569 icon->GetIconType() == AbstractLauncherIcon::IconType::TRASH ||567 icon->GetIconType() == AbstractLauncherIcon::IconType::TRASH ||
570 icon->GetIconType() == AbstractLauncherIcon::IconType::DESKTOP ||568 icon->GetIconType() == AbstractLauncherIcon::IconType::DESKTOP ||
571 icon->GetIconType() == AbstractLauncherIcon::IconType::DEVICE ||569 icon->GetIconType() == AbstractLauncherIcon::IconType::DEVICE ||
@@ -1113,13 +1111,6 @@ void Launcher::OnOverlayShown(GVariant* data)
11131111
1114 bg_effect_helper_.enabled = true;1112 bg_effect_helper_.enabled = true;
11151113
1116 // Don't desaturate icons if the mouse is over the launcher:
1117 if (!hovered_)
1118 {
1119 LOG_DEBUG(logger) << "Desaturate on monitor " << monitor();
1120 DesaturateIcons();
1121 }
1122
1123 if (icon_under_mouse_)1114 if (icon_under_mouse_)
1124 icon_under_mouse_->HideTooltip();1115 icon_under_mouse_->HideTooltip();
1125 }1116 }
@@ -2769,242 +2760,22 @@ bool Launcher::DndIsSpecialRequest(std::string const& uri) const
2769}2760}
27702761
2771void Launcher::ProcessDndEnter()2762void Launcher::ProcessDndEnter()
2772{2763{ }
2773#ifdef USE_X11
2774 SetStateMouseOverLauncher(true);
2775
2776 dnd_data_.Reset();
2777 drag_action_ = nux::DNDACTION_NONE;
2778 steal_drag_ = false;
2779 data_checked_ = false;
2780 dnd_hovered_icon_ = nullptr;
2781 drag_edge_touching_ = false;
2782 dnd_hide_animation_.Stop();
2783#endif
2784}
27852764
2786void Launcher::DndReset()2765void Launcher::DndReset()
2787{2766{ }
2788#ifdef USE_X11
2789 dnd_data_.Reset();
2790
2791 bool is_overlay_open = IsOverlayOpen();
2792
2793 for (auto it : *model_)
2794 {
2795 auto icon_type = it->GetIconType();
2796 bool desaturate = false;
2797
2798 if (icon_type != AbstractLauncherIcon::IconType::HOME &&
2799 icon_type != AbstractLauncherIcon::IconType::HUD)
2800 {
2801 desaturate = is_overlay_open && !hovered_;
2802 }
2803
2804 it->SetQuirk(AbstractLauncherIcon::Quirk::DESAT, desaturate, monitor());
2805 it->SetQuirk(AbstractLauncherIcon::Quirk::UNFOLDED, false, monitor());
2806 }
2807
2808 DndHoveredIconReset();
2809#endif
2810}
28112767
2812void Launcher::DndHoveredIconReset()2768void Launcher::DndHoveredIconReset()
2813{2769{ }
2814#ifdef USE_X11
2815 SetActionState(ACTION_NONE);
2816
2817 if (steal_drag_ && dnd_hovered_icon_)
2818 {
2819 dnd_hovered_icon_->SetQuirk(AbstractLauncherIcon::Quirk::VISIBLE, false, monitor());
2820 dnd_hovered_icon_->remove.emit(dnd_hovered_icon_);
2821 }
2822
2823 if (!steal_drag_ && dnd_hovered_icon_)
2824 {
2825 dnd_hovered_icon_->SendDndLeave();
2826 dnd_hovered_icon_->SetQuirk(AbstractLauncherIcon::Quirk::GLOW, false, monitor());
2827 }
2828
2829 steal_drag_ = false;
2830 drag_edge_touching_ = false;
2831 dnd_hovered_icon_ = nullptr;
2832#endif
2833}
28342770
2835void Launcher::ProcessDndLeave()2771void Launcher::ProcessDndLeave()
2836{2772{ }
2837#ifdef USE_X11
2838 SetStateMouseOverLauncher(false);
2839 DndHoveredIconReset();
2840#endif
2841}
28422773
2843void Launcher::ProcessDndMove(int x, int y, std::list<char*> mimes)2774void Launcher::ProcessDndMove(int x, int y, std::list<char*> mimes)
2844{2775{ }
2845#ifdef USE_X11
2846 if (!data_checked_)
2847 {
2848 const std::string uri_list = "text/uri-list";
2849 data_checked_ = true;
2850 dnd_data_.Reset();
2851 auto& display = nux::GetWindowThread()->GetGraphicsDisplay();
2852
2853 // get the data
2854 for (auto const& mime : mimes)
2855 {
2856 if (mime != uri_list)
2857 continue;
2858
2859 dnd_data_.Fill(display.GetDndData(const_cast<char*>(uri_list.c_str())));
2860 break;
2861 }
2862
2863 // see if the launcher wants this one
2864 auto const& uris = dnd_data_.Uris();
2865 if (std::find_if(uris.begin(), uris.end(), [this] (std::string const& uri)
2866 {return DndIsSpecialRequest(uri);}) != uris.end())
2867 {
2868 steal_drag_ = true;
2869 }
2870
2871 // only set hover once we know our first x/y
2872 SetActionState(ACTION_DRAG_EXTERNAL);
2873 SetStateMouseOverLauncher(true);
2874 }
2875
2876 SetMousePosition(x - parent_->GetGeometry().x, y - parent_->GetGeometry().y);
2877
2878 if (options()->hide_mode != LAUNCHER_HIDE_NEVER)
2879 {
2880 if ((monitor() == 0 && !IsOverlayOpen() && mouse_position_.x == 0 && !drag_edge_touching_) &&
2881 ((launcher_position_ == LauncherPosition::LEFT &&
2882 mouse_position_.y <= (parent_->GetGeometry().height - icon_size_.CP(cv_) - 2 * SPACE_BETWEEN_ICONS.CP(cv_))) ||
2883 (launcher_position_ == LauncherPosition::BOTTOM &&
2884 mouse_position_.x <= (parent_->GetGeometry().width - icon_size_.CP(cv_) - 2 * SPACE_BETWEEN_ICONS.CP(cv_)))))
2885 {
2886 if (dnd_hovered_icon_)
2887 {
2888 dnd_hovered_icon_->SendDndLeave();
2889 dnd_hovered_icon_->SetQuirk(AbstractLauncherIcon::Quirk::GLOW, false, monitor());
2890 }
2891
2892 animation::StartOrReverse(dnd_hide_animation_, animation::Direction::FORWARD);
2893 drag_edge_touching_ = true;
2894 }
2895 else if (drag_edge_touching_ &&
2896 ((launcher_position_ == LauncherPosition::LEFT && mouse_position_.x != 0) ||
2897 (launcher_position_ == LauncherPosition::BOTTOM && mouse_position_.y != 0)))
2898 {
2899 animation::StartOrReverse(dnd_hide_animation_, animation::Direction::BACKWARD);
2900 drag_edge_touching_ = false;
2901 }
2902 }
2903
2904 EventLogic();
2905 auto const& hovered_icon = MouseIconIntersection(mouse_position_.x, mouse_position_.y);
2906
2907 bool hovered_icon_is_appropriate = false;
2908 if (hovered_icon)
2909 {
2910 if (hovered_icon->GetIconType() == AbstractLauncherIcon::IconType::TRASH)
2911 steal_drag_ = false;
2912
2913 if (hovered_icon->position() == AbstractLauncherIcon::Position::FLOATING)
2914 hovered_icon_is_appropriate = true;
2915 }
2916
2917 if (steal_drag_)
2918 {
2919 drag_action_ = nux::DNDACTION_COPY;
2920 if (!dnd_hovered_icon_ && hovered_icon_is_appropriate)
2921 {
2922 dnd_hovered_icon_ = new SpacerLauncherIcon(monitor());
2923 model_->AddIcon(dnd_hovered_icon_);
2924 model_->ReorderBefore(dnd_hovered_icon_, hovered_icon, true);
2925 }
2926 else if (dnd_hovered_icon_)
2927 {
2928 if (hovered_icon)
2929 {
2930 if (hovered_icon_is_appropriate)
2931 {
2932 model_->ReorderSmart(dnd_hovered_icon_, hovered_icon, true);
2933 }
2934 else
2935 {
2936 dnd_hovered_icon_->SetQuirk(AbstractLauncherIcon::Quirk::VISIBLE, false, monitor());
2937 dnd_hovered_icon_->remove.emit(dnd_hovered_icon_);
2938 dnd_hovered_icon_ = nullptr;
2939 }
2940 }
2941 }
2942 }
2943 else
2944 {
2945 if (!drag_edge_touching_ && hovered_icon != dnd_hovered_icon_)
2946 {
2947 if (hovered_icon)
2948 {
2949 hovered_icon->SendDndEnter();
2950 drag_action_ = hovered_icon->QueryAcceptDrop(dnd_data_);
2951
2952 if (drag_action_ != nux::DNDACTION_NONE)
2953 hovered_icon->SetQuirk(AbstractLauncherIcon::Quirk::GLOW, true, monitor());
2954 }
2955 else
2956 {
2957 drag_action_ = nux::DNDACTION_NONE;
2958 }
2959
2960 if (dnd_hovered_icon_)
2961 {
2962 dnd_hovered_icon_->SendDndLeave();
2963 dnd_hovered_icon_->SetQuirk(AbstractLauncherIcon::Quirk::GLOW, false, monitor());
2964 }
2965
2966 dnd_hovered_icon_ = hovered_icon;
2967 }
2968 }
2969
2970 bool accept;
2971 if (drag_action_ != nux::DNDACTION_NONE)
2972 accept = true;
2973 else
2974 accept = false;
2975
2976 SendDndStatus(accept, drag_action_, nux::Geometry(x, y, 1, 1));
2977#endif
2978}
29792776
2980void Launcher::ProcessDndDrop(int x, int y)2777void Launcher::ProcessDndDrop(int x, int y)
2981{2778{ }
2982#ifdef USE_X11
2983 if (steal_drag_)
2984 {
2985 for (auto const& uri : dnd_data_.Uris())
2986 {
2987 if (DndIsSpecialRequest(uri))
2988 add_request.emit(uri, dnd_hovered_icon_);
2989 }
2990 }
2991 else if (dnd_hovered_icon_ && drag_action_ != nux::DNDACTION_NONE)
2992 {
2993 if (IsOverlayOpen())
2994 ubus_.SendMessage(UBUS_OVERLAY_CLOSE_REQUEST);
2995
2996 dnd_hovered_icon_->AcceptDrop(dnd_data_);
2997 }
2998
2999 if (drag_action_ != nux::DNDACTION_NONE)
3000 SendDndFinished(true, drag_action_);
3001 else
3002 SendDndFinished(false, drag_action_);
3003
3004 // reset our shiz
3005 DndReset();
3006#endif
3007}
30082779
3009/*2780/*
3010 * Returns the current selected icon if it is in keynavmode2781 * Returns the current selected icon if it is in keynavmode
@@ -3035,81 +2806,16 @@ int Launcher::GetDragDelta() const
3035}2806}
30362807
3037void Launcher::DndStarted(std::string const& data)2808void Launcher::DndStarted(std::string const& data)
3038{2809{ }
3039#ifdef USE_X11
3040 SetDndQuirk();
3041
3042 dnd_data_.Fill(data.c_str());
3043
3044 auto const& uris = dnd_data_.Uris();
3045 if (std::find_if(uris.begin(), uris.end(), [this] (std::string const& uri)
3046 {return DndIsSpecialRequest(uri);}) != uris.end())
3047 {
3048 steal_drag_ = true;
3049
3050 if (IsOverlayOpen())
3051 SaturateIcons();
3052 }
3053 else
3054 {
3055 for (auto const& it : *model_)
3056 {
3057 if (it->ShouldHighlightOnDrag(dnd_data_))
3058 {
3059 it->SetQuirk(AbstractLauncherIcon::Quirk::DESAT, false, monitor());
3060 it->SetQuirk(AbstractLauncherIcon::Quirk::UNFOLDED, true, monitor());
3061 }
3062 else
3063 {
3064 it->SetQuirk(AbstractLauncherIcon::Quirk::DESAT, true, monitor());
3065 it->SetQuirk(AbstractLauncherIcon::Quirk::UNFOLDED, false, monitor());
3066 }
3067 }
3068 }
3069#endif
3070}
30712810
3072void Launcher::DndFinished()2811void Launcher::DndFinished()
3073{2812{ }
3074#ifdef USE_X11
3075 UnsetDndQuirk();
3076
3077 data_checked_ = false;
3078
3079 DndReset();
3080#endif
3081}
30822813
3083void Launcher::SetDndQuirk()2814void Launcher::SetDndQuirk()
3084{2815{ }
3085#ifdef USE_X11
3086 hide_machine_.SetQuirk(LauncherHideMachine::EXTERNAL_DND_ACTIVE, true);
3087#endif
3088}
30892816
3090void Launcher::UnsetDndQuirk()2817void Launcher::UnsetDndQuirk()
3091{2818{ }
3092#ifdef USE_X11
3093
3094 if (IsOverlayOpen() && !hovered_)
3095 {
3096 DesaturateIcons();
3097 }
3098 else
3099 {
3100 for (auto const& it : *model_)
3101 {
3102 it->SetQuirk(AbstractLauncherIcon::Quirk::DESAT, false, monitor());
3103 it->SetQuirk(AbstractLauncherIcon::Quirk::UNFOLDED, false, monitor());
3104 }
3105 }
3106
3107
3108 hide_machine_.SetQuirk(LauncherHideMachine::MT_DRAG_OUT, drag_out_delta_x_ >= DRAG_OUT_PIXELS - 90.0f);
3109 hide_machine_.SetQuirk(LauncherHideMachine::EXTERNAL_DND_ACTIVE, false);
3110 animation::SetValue(dnd_hide_animation_, animation::Direction::BACKWARD);
3111#endif
3112}
31132819
3114} // namespace launcher2820} // namespace launcher
3115} // namespace unity2821} // namespace unity
diff --git a/launcher/StandaloneLauncher.cpp b/launcher/StandaloneLauncher.cpp
index 0af7d0c..7795283 100644
--- a/launcher/StandaloneLauncher.cpp
+++ b/launcher/StandaloneLauncher.cpp
@@ -40,7 +40,7 @@ using namespace unity;
4040
41namespace41namespace
42{42{
43const nux::Size win_size(1024, 768);43const nux::Size win_size(1280, 720);
44const nux::Color bg_color(95/255.0f, 18/255.0f, 45/255.0f, 1.0f);44const nux::Color bg_color(95/255.0f, 18/255.0f, 45/255.0f, 1.0f);
45}45}
4646
diff --git a/launcher/TrashLauncherIcon.cpp b/launcher/TrashLauncherIcon.cpp
index 15dc9a6..edf5eea 100644
--- a/launcher/TrashLauncherIcon.cpp
+++ b/launcher/TrashLauncherIcon.cpp
@@ -29,7 +29,7 @@
2929
30#include "QuicklistMenuItemLabel.h"30#include "QuicklistMenuItemLabel.h"
31#include "unity-shared/DesktopApplicationManager.h"31#include "unity-shared/DesktopApplicationManager.h"
32#include "unity-shared/FileManager.h"32#include "unity-shared/GnomeFileManager.h"
3333
34namespace unity34namespace unity
35{35{
diff --git a/lockscreen/LockScreenPanel.cpp b/lockscreen/LockScreenPanel.cpp
index e54e2f1..b3087a5 100644
--- a/lockscreen/LockScreenPanel.cpp
+++ b/lockscreen/LockScreenPanel.cpp
@@ -37,8 +37,8 @@ namespace lockscreen
37{37{
38namespace38namespace
39{39{
40const RawPixel PADDING = 5_em;40const RawPixel PADDING = 14_em;
41const nux::Color BG_COLOR(0.1, 0.1, 0.1, 0.4);41nux::Color BG_COLOR(0.1, 0.1, 0.1, 0.9);
42}42}
4343
44using namespace indicator;44using namespace indicator;
diff --git a/panel/PanelController.cpp b/panel/PanelController.cpp
index f24eb46..c6496b7 100644
--- a/panel/PanelController.cpp
+++ b/panel/PanelController.cpp
@@ -66,7 +66,7 @@ Controller::Impl::Impl(Controller* parent, menu::Manager::Ptr const& indicators,
66 : parent_(parent)66 : parent_(parent)
67 , indicators_(indicators)67 , indicators_(indicators)
68 , edge_barriers_(edge_barriers)68 , edge_barriers_(edge_barriers)
69 , opacity_(1.0f)69 , opacity_(0.7f)
70 , opacity_maximized_toggle_(false)70 , opacity_maximized_toggle_(false)
71{71{
72 UScreen* screen = UScreen::GetDefault();72 UScreen* screen = UScreen::GetDefault();
diff --git a/panel/PanelIndicatorsView.cpp b/panel/PanelIndicatorsView.cpp
index 20f0638..8bf3c80 100644
--- a/panel/PanelIndicatorsView.cpp
+++ b/panel/PanelIndicatorsView.cpp
@@ -46,6 +46,7 @@ PanelIndicatorsView::PanelIndicatorsView()
46{46{
47 opacity.DisableNotifications();47 opacity.DisableNotifications();
48 layout_->SetContentDistribution(nux::MAJOR_POSITION_END);48 layout_->SetContentDistribution(nux::MAJOR_POSITION_END);
49 layout_->SetLeftAndRightPadding(layout_->GetLeftPadding(), 6);
49 SetLayout(layout_);50 SetLayout(layout_);
5051
51 LOG_DEBUG(logger) << "Indicators View Added: ";52 LOG_DEBUG(logger) << "Indicators View Added: ";
diff --git a/panel/PanelIndicatorsView.h b/panel/PanelIndicatorsView.h
index bb11df4..8e3a1ec 100644
--- a/panel/PanelIndicatorsView.h
+++ b/panel/PanelIndicatorsView.h
@@ -52,7 +52,7 @@ public:
52 typedef PanelIndicatorEntryView::IndicatorEntryType IndicatorEntryType;52 typedef PanelIndicatorEntryView::IndicatorEntryType IndicatorEntryType;
5353
54 PanelIndicatorEntryView* AddEntry(indicator::Entry::Ptr const& entry,54 PanelIndicatorEntryView* AddEntry(indicator::Entry::Ptr const& entry,
55 int padding = 5,55 int padding = 9,
56 IndicatorEntryPosition pos = AUTO,56 IndicatorEntryPosition pos = AUTO,
57 IndicatorEntryType type = IndicatorEntryType::INDICATOR);57 IndicatorEntryType type = IndicatorEntryType::INDICATOR);
58 void RemoveEntry(indicator::Entry::Ptr const&);58 void RemoveEntry(indicator::Entry::Ptr const&);
diff --git a/panel/PanelMenuView.cpp b/panel/PanelMenuView.cpp
index 2bcdd49..abaa420 100644
--- a/panel/PanelMenuView.cpp
+++ b/panel/PanelMenuView.cpp
@@ -45,8 +45,8 @@ DECLARE_LOGGER(logger, "unity.panel.menu");
4545
46namespace46namespace
47{47{
48 const RawPixel MAIN_LEFT_PADDING = 4_em;48 const RawPixel MAIN_LEFT_PADDING = 13_em;
49 const RawPixel TITLE_PADDING = 2_em;49 const RawPixel TITLE_PADDING = 1_em;
50 const RawPixel MENUBAR_PADDING = 4_em;50 const RawPixel MENUBAR_PADDING = 4_em;
51 const int MENU_ENTRIES_PADDING = 6;51 const int MENU_ENTRIES_PADDING = 6;
5252
diff --git a/panel/PanelTray.cpp b/panel/PanelTray.cpp
index 20be87f..afdf7d4 100644
--- a/panel/PanelTray.cpp
+++ b/panel/PanelTray.cpp
@@ -29,7 +29,7 @@ DECLARE_LOGGER(logger, "unity.panel.tray");
29namespace29namespace
30{30{
31const std::string SETTINGS_NAME = "com.canonical.Unity.Panel";31const std::string SETTINGS_NAME = "com.canonical.Unity.Panel";
32const int PADDING = 3;32const int PADDING = 12;
33const std::array<std::string, 2> WHITELIST {{ "JavaEmbeddedFrame", "Wine" }};33const std::array<std::string, 2> WHITELIST {{ "JavaEmbeddedFrame", "Wine" }};
34}34}
3535
@@ -63,7 +63,7 @@ PanelTray::PanelTray(int monitor)
63 GTK_ORIENTATION_HORIZONTAL,63 GTK_ORIENTATION_HORIZONTAL,
64 (NaTrayFilterCallback)FilterTrayCallback,64 (NaTrayFilterCallback)FilterTrayCallback,
65 this);65 this);
66 na_tray_set_icon_size(tray_, panel_height);66 na_tray_set_icon_size(tray_, panel_height-6);
6767
68 icon_removed_signal_.Connect(na_tray_get_manager(tray_), "tray_icon_removed",68 icon_removed_signal_.Connect(na_tray_get_manager(tray_), "tray_icon_removed",
69 sigc::mem_fun(this, &PanelTray::OnTrayIconRemoved));69 sigc::mem_fun(this, &PanelTray::OnTrayIconRemoved));
@@ -97,7 +97,7 @@ Window PanelTray::xid()
9797
98void PanelTray::Draw(nux::GraphicsEngine& gfx_context, bool force_draw)98void PanelTray::Draw(nux::GraphicsEngine& gfx_context, bool force_draw)
99{99{
100 nux::Geometry const& geo = GetAbsoluteGeometry();100 nux::Geometry geo = GetAbsoluteGeometry();
101101
102 gfx_context.PushClippingRectangle(geo);102 gfx_context.PushClippingRectangle(geo);
103 nux::GetPainter().PaintBackground(gfx_context, geo);103 nux::GetPainter().PaintBackground(gfx_context, geo);
diff --git a/panel/PanelView.cpp b/panel/PanelView.cpp
index fd492b6..1a54ab1 100644
--- a/panel/PanelView.cpp
+++ b/panel/PanelView.cpp
@@ -58,7 +58,7 @@ PanelView::PanelView(MockableBaseWindow* parent, menu::Manager::Ptr const& menus
58 , opacity_maximized_toggle_(false)58 , opacity_maximized_toggle_(false)
59 , needs_geo_sync_(false)59 , needs_geo_sync_(false)
60 , overlay_is_open_(false)60 , overlay_is_open_(false)
61 , opacity_(1.0f)61 , opacity_(0.7f)
62 , monitor_(0)62 , monitor_(0)
63 , stored_dash_width_(0)63 , stored_dash_width_(0)
64 , bg_effect_helper_(this)64 , bg_effect_helper_(this)
@@ -539,7 +539,7 @@ PanelView::UpdateBackground()
539539
540 if (overlay_is_open_ || wm.IsScaleActive())540 if (overlay_is_open_ || wm.IsScaleActive())
541 {541 {
542 bg_layer_.reset(new nux::ColorLayer(wm.average_color(), true, rop));542 // bg_layer_.reset(new nux::ColorLayer(wm.average_color(), true, rop));
543 }543 }
544 else544 else
545 {545 {
diff --git a/panel/StandalonePanel.cpp b/panel/StandalonePanel.cpp
index e134602..76b4c0e 100644
--- a/panel/StandalonePanel.cpp
+++ b/panel/StandalonePanel.cpp
@@ -41,7 +41,7 @@ using namespace unity::panel;
41struct PanelWindow41struct PanelWindow
42{42{
43 PanelWindow()43 PanelWindow()
44 : wt(nux::CreateGUIThread("Unity Panel", 1024, 24, 0, &PanelWindow::ThreadWidgetInit, this))44 : wt(nux::CreateGUIThread("Unity Panel", 1024, 30, 0, &PanelWindow::ThreadWidgetInit, this))
45 , animation_controller(tick_source)45 , animation_controller(tick_source)
46 {}46 {}
4747
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp
index ff739f6..38f433a 100644
--- a/plugins/unityshell/src/unityshell.cpp
+++ b/plugins/unityshell/src/unityshell.cpp
@@ -3157,73 +3157,9 @@ bool UnityWindow::glDraw(const GLMatrix& matrix,
31573157
3158 auto draw_panel_shadow = DrawPanelShadow::NO;3158 auto draw_panel_shadow = DrawPanelShadow::NO;
31593159
3160 if (!(mask & PAINT_WINDOW_ON_TRANSFORMED_SCREEN_MASK))
3161 {
3162 Window active_window = screen->activeWindow();
3163
3164 if (G_UNLIKELY(window_type == CompWindowTypeDesktopMask))
3165 {
3166 uScreen->setPanelShadowMatrix(matrix);
3167
3168 if (active_window == 0 || active_window == window->id())
3169 {
3170 if (PluginAdapter::Default().IsWindowOnTop(window->id()))
3171 {
3172 draw_panel_shadow = DrawPanelShadow::OVER_WINDOW;
3173 }
3174 uScreen->is_desktop_active_ = true;
3175 }
3176 }
3177 else
3178 {
3179 if (window->id() == active_window)
3180 {
3181 draw_panel_shadow = DrawPanelShadow::BELOW_WINDOW;
3182 uScreen->is_desktop_active_ = false;
3183
3184 if (!(window_state & CompWindowStateMaximizedVertMask) &&
3185 !(window_state & CompWindowStateFullscreenMask) &&
3186 !(window_type & CompWindowTypeFullscreenMask))
3187 {
3188 auto const& output = uScreen->screen->currentOutputDev();
3189 int monitor = uScreen->WM.MonitorGeometryIn(NuxGeometryFromCompRect(output));
3190
3191 if (window->y() - window->border().top < output.y() + uScreen->panel_style_.PanelHeight(monitor))
3192 {
3193 draw_panel_shadow = DrawPanelShadow::OVER_WINDOW;
3194 }
3195 }
3196 }
3197 else if (uScreen->menus_->integrated_menus())
3198 {
3199 draw_panel_shadow = DrawPanelShadow::BELOW_WINDOW;
3200 }
3201 else
3202 {
3203 if (uScreen->is_desktop_active_)
3204 {
3205 if (PluginAdapter::Default().IsWindowOnTop(window->id()))
3206 {
3207 draw_panel_shadow = DrawPanelShadow::OVER_WINDOW;
3208 uScreen->panelShadowPainted = CompRegion();
3209 }
3210 }
3211 }
3212 }
3213 }
3214
3215 if (locked)
3216 draw_panel_shadow = DrawPanelShadow::NO;
3217
3218 if (draw_panel_shadow == DrawPanelShadow::BELOW_WINDOW)
3219 uScreen->paintPanelShadow(region);
3220
3221 deco_win_->Draw(matrix, attrib, region, mask);3160 deco_win_->Draw(matrix, attrib, region, mask);
3222 bool ret = gWindow->glDraw(matrix, attrib, region, mask);3161 bool ret = gWindow->glDraw(matrix, attrib, region, mask);
32233162
3224 if (draw_panel_shadow == DrawPanelShadow::OVER_WINDOW)
3225 uScreen->paintPanelShadow(region);
3226
3227 return ret;3163 return ret;
3228}3164}
32293165
diff --git a/plugins/unityshell/unityshell.xml.in b/plugins/unityshell/unityshell.xml.in
index 9294c5b..61afdea 100644
--- a/plugins/unityshell/unityshell.xml.in
+++ b/plugins/unityshell/unityshell.xml.in
@@ -104,8 +104,8 @@
104 <option name="panel_opacity" type="float">104 <option name="panel_opacity" type="float">
105 <_short>Panel Opacity</_short>105 <_short>Panel Opacity</_short>
106 <_long>The opacity of the Panel background.</_long>106 <_long>The opacity of the Panel background.</_long>
107 <default>1.0</default>107 <default>0.75</default>
108 <min>0.0</min>108 <min>0.1</min>
109 <max>1.0</max>109 <max>1.0</max>
110 <precision>0.01</precision>110 <precision>0.01</precision>
111 </option>111 </option>
@@ -419,7 +419,7 @@
419 <option name="icon_size" type="int">419 <option name="icon_size" type="int">
420 <_short>Launcher Icon Size</_short>420 <_short>Launcher Icon Size</_short>
421 <_long>The size of the icons in the Launcher.</_long>421 <_long>The size of the icons in the Launcher.</_long>
422 <default>48</default>422 <default>44</default>
423 <min>8</min>423 <min>8</min>
424 <max>64</max>424 <max>64</max>
425 <precision>1</precision>425 <precision>1</precision>
@@ -430,7 +430,7 @@
430 <_long>Change how the icons in the Launcher are backlit.</_long>430 <_long>Change how the icons in the Launcher are backlit.</_long>
431 <min>0</min>431 <min>0</min>
432 <max>4</max>432 <max>4</max>
433 <default>1</default>433 <default>4</default>
434 <desc>434 <desc>
435 <value>0</value>435 <value>0</value>
436 <_name>Backlight Always On</_name>436 <_name>Backlight Always On</_name>
diff --git a/resources/dash_sheen.png b/resources/dash_sheen.png
index fb31cdb..7cceadb 100644
437Binary files a/resources/dash_sheen.png and b/resources/dash_sheen.png differ437Binary files a/resources/dash_sheen.png and b/resources/dash_sheen.png differ
diff --git a/resources/empty.png b/resources/empty.png
438new file mode 100644438new file mode 100644
index 0000000..7cceadb
439Binary files /dev/null and b/resources/empty.png differ439Binary files /dev/null and b/resources/empty.png differ
diff --git a/resources/launcher_bfb.svg b/resources/launcher_bfb.svg
index 74e60e9..b6f1ccb 100644
--- a/resources/launcher_bfb.svg
+++ b/resources/launcher_bfb.svg
@@ -1,13 +1,126 @@
1<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">1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <defs>2<svg
3 <filter id="a" x="-.075" y="-.075" width="1.15" height="1.15" color-interpolation-filters="sRGB">3 version="1.1"
4 <feGaussianBlur stdDeviation="2.4999998"/>4 id="svg2"
5 </filter>5 width="136.53333"
6 </defs>6 height="136.53333"
7 <image width="136.53" height="136.53" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAQAAABpN6lAAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAA B3RJTUUH5QYBEzomVGX0+QAAAAJiS0dEAP7wiPwpAAAjh0lEQVR42s2deZAkV33nP++9POrqu+ce zYw0GkmjgREIRhaI2yAQQoBBWmOuxbFeNmyvHcT6iNgNEytHLGAb23sYe8HrxdgOYbP2CmHjReBD YAMSGgnEMSPNITT39F13Vl7vvf2jsrurq6uqjxkwXVGdV1Vmfn/vd/9++UrwA/qzAgEd735bvfd3 H5EUcBCApUaK7XiZrqXFCLve+xQ/cPDrI8Mg8ItbHgVAYKkT9gffXq6XBOKqQ9/8qK8G3/05RQmJ AGo0VnHACnL8CxDAXsmor3733pIU8RBAgwW4ch5w/oXAbxT48laAwAeGkcxlR+zSUNqOPfyQCGA3 xuRXAr79bmEpAiMopvuAF2BZDw84VwX8ZiV/syITISghGQGmeoFfPw84VxH8xmBcmcjENBlGMAZc vhJBcK6Coduclb9SkWmTACZJmOsN3oq1hcD5kbHyGxeZiIASgp3EVFeAB7teQRA/ACvfH8bVF5kS JQBOUu/tGa7FA+KKwV9dfb9xkRmmgCDiOEkvr0CYq0CAH6KV34zIjJEDahzv7RIN5gHnR87Kb1xk avgoRtnW1yvYLAE2aeUFY0wwwRAuHj4+CoHA0qJFQECVaZpXjXhQZQLBddQIVivDwQ6RuGpWXrGD 3WxjnGEcBBKJRGRrq5cx88xyljNUr4LIlBgFanyzV5i8YQLYjTC5ZBc72cE23CVwlpiElAQwWAwi A6/wUfh45CngI5FUOMvTnMRckchMkkPwLGd6hcn9SSA2AH71/h1cxz7yKAQSS0RCRESajbTIXrJr ubjlUKDEMCUUEaf4Fqc3bSwV21EYHqW5kQSJ2KSVn2A/11BCoBAYAgLC7Fg3TLGKHHTtVZQYYxyH Mo/yJMm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YLLGTT4WyY8zb1ExsDeWAr1wOGmf6OcR8vYRMisw7iDTj3Ff7OkO03k+gBJoCY +XXc0Mbhrgf8uqz82qmXNdITwtreRdOzDOGgKGYGsd/tsX67fBVGfYPg18EBfYLjtkG8IfuZhXqf G9rsqF+xyKz/J1fX9UtTtt98wmPsBSx1gg2B/wGKzEagr0sEVrRQdTdRVBDszp4qCK6OyroSkdk4 +HUSoEMPdOuDMj7jQIF0ySRunnmvQGQ2B369HDCog2QaxRBQBFpXwLxXIDKbB79+AgzqJbyMZghL Hkvrh6bvN6HuroAAwtr+vYSWGQwlLD5kvz3zI2Plr4oVGNg9sPhTK0OMAZaU+lJj5Y+Alb9qBOiT IOlcKzGSBS6NLJTZqJVfJw9cPfAbJ8DgaZc9RjJjGSw+bfgvbeWvIgH6dpB0TmnsMJJBTAk6RGG9 4K+6lV/77/8DTX3gKAGJXUUAAAAASUVORK5CYII= "/>7 viewBox="0 0 136.53333 136.53333"
8 <g>8 sodipodi:docname="launcher_bfb.svg"
9 <ellipse cx="68.267" cy="68.267" rx="40" ry="40" fill="#9005d5"/>9 inkscape:export-filename="/home/muqtadir/Desktop/unity-orb1.png"
10 <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"/>10 inkscape:export-xdpi="90"
11 <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"/>11 inkscape:export-ydpi="90"
12 </g>12 inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
13 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
14 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns="http://www.w3.org/2000/svg"
17 xmlns:svg="http://www.w3.org/2000/svg"
18 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
19 xmlns:cc="http://creativecommons.org/ns#"
20 xmlns:dc="http://purl.org/dc/elements/1.1/">
21 <metadata
22 id="metadata8">
23 <rdf:RDF>
24 <cc:Work
25 rdf:about="">
26 <dc:format>image/svg+xml</dc:format>
27 <dc:type
28 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
29 <dc:title />
30 </cc:Work>
31 </rdf:RDF>
32 </metadata>
33 <defs
34 id="defs6">
35 <linearGradient
36 inkscape:collect="always"
37 xlink:href="#linearGradient927"
38 id="linearGradient1686-0"
39 x1="321.99991"
40 y1="84.000153"
41 x2="365.99991"
42 y2="84.000153"
43 gradientUnits="userSpaceOnUse"
44 gradientTransform="matrix(0,2.9046321,-2.9677501,0,317.55806,-932.37102)" />
45 <linearGradient
46 inkscape:collect="always"
47 id="linearGradient927">
48 <stop
49 style="stop-color:#f3e6fa;stop-opacity:1"
50 offset="0"
51 id="stop923" />
52 <stop
53 id="stop933"
54 offset="0.125"
55 style="stop-color:#f3e6fa;stop-opacity:0.09803922" />
56 <stop
57 id="stop931"
58 offset="0.92500001"
59 style="stop-color:#f3e6fa;stop-opacity:0.09803922" />
60 <stop
61 style="stop-color:#f3e6fa;stop-opacity:0.49803922"
62 offset="1"
63 id="stop925" />
64 </linearGradient>
65 </defs>
66 <sodipodi:namedview
67 pagecolor="#3d3d3d"
68 bordercolor="#666666"
69 borderopacity="1"
70 objecttolerance="10"
71 gridtolerance="10"
72 guidetolerance="10"
73 inkscape:pageopacity="0"
74 inkscape:pageshadow="2"
75 inkscape:window-width="1920"
76 inkscape:window-height="965"
77 id="namedview4"
78 showgrid="false"
79 units="px"
80 inkscape:zoom="2.5"
81 inkscape:cx="80.2"
82 inkscape:cy="76.6"
83 inkscape:window-x="0"
84 inkscape:window-y="36"
85 inkscape:window-maximized="1"
86 inkscape:current-layer="svg2"
87 inkscape:document-rotation="0"
88 inkscape:pagecheckerboard="0" />
89 <path
90 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"
91 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"
92 id="path1020"
93 inkscape:connector-curvature="0"
94 sodipodi:nodetypes="sccsccccccsscccscsccsss" />
95 <path
96 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"
97 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"
98 id="path964"
99 inkscape:connector-curvature="0"
100 sodipodi:nodetypes="scccssscsss" />
101 <path
102 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"
103 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"
104 id="path962"
105 inkscape:connector-curvature="0"
106 sodipodi:nodetypes="ccssscccc" />
107 <path
108 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"
109 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"
110 id="path958"
111 inkscape:connector-curvature="0"
112 sodipodi:nodetypes="scccssscsss" />
113 <path
114 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"
115 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"
116 id="path964-3"
117 inkscape:connector-curvature="0" />
118 <path
119 id="path12"
120 style="fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.0633053;stroke-linejoin:round;paint-order:stroke markers fill"
121 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" />
122 <path
123 id="path12-3"
124 style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.0633053;stroke-linejoin:round;paint-order:stroke markers fill"
125 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" />
13</svg>126</svg>
diff --git a/resources/panel_shadow.png b/resources/panel_shadow.png
index d76818a..7cceadb 100644
14Binary files a/resources/panel_shadow.png and b/resources/panel_shadow.png differ127Binary files a/resources/panel_shadow.png and b/resources/panel_shadow.png differ
diff --git a/resources/refine_gradient_dash.png b/resources/refine_gradient_dash.png
index 17214cc..7cceadb 100644
15Binary files a/resources/refine_gradient_dash.png and b/resources/refine_gradient_dash.png differ128Binary files a/resources/refine_gradient_dash.png and b/resources/refine_gradient_dash.png differ
diff --git a/resources/refine_gradient_panel.png b/resources/refine_gradient_panel.png
index 0b58160..7cceadb 100644
16Binary files a/resources/refine_gradient_panel.png and b/resources/refine_gradient_panel.png differ129Binary files a/resources/refine_gradient_panel.png and b/resources/refine_gradient_panel.png differ
diff --git a/resources/refine_gradient_panel_single_column.png b/resources/refine_gradient_panel_single_column.png
index 38b9b49..7cceadb 100644
17Binary files a/resources/refine_gradient_panel_single_column.png and b/resources/refine_gradient_panel_single_column.png differ130Binary files a/resources/refine_gradient_panel_single_column.png and b/resources/refine_gradient_panel_single_column.png differ
diff --git a/shutdown/SessionButton.cpp b/shutdown/SessionButton.cpp
index 61a6e8e..6762c88 100644
--- a/shutdown/SessionButton.cpp
+++ b/shutdown/SessionButton.cpp
@@ -132,11 +132,11 @@ void Button::UpdateTextures(std::string const& texture_prefix)
132{132{
133 auto const& theme = theme::Settings::Get();133 auto const& theme = theme::Settings::Get();
134 auto texture_path = theme->ThemedFilePath(texture_prefix, {PKGDATADIR});134 auto texture_path = theme->ThemedFilePath(texture_prefix, {PKGDATADIR});
135 RawPixel const texture_size = GetDefaultMaxTextureSize(texture_path);135 RawPixel const texture_size = GetDefaultMaxTextureSize(texture_path) * 0.8;
136 normal_tex_.Adopt(nux::CreateTexture2DFromFile(texture_path.c_str(), texture_size.CP(scale), true));136 normal_tex_.Adopt(nux::CreateTexture2DFromFile(texture_path.c_str(), texture_size.CP(scale), true));
137137
138 auto texture_highlight_path = theme->ThemedFilePath(texture_prefix + "_highlight", {PKGDATADIR});138 auto texture_highlight_path = theme->ThemedFilePath(texture_prefix + "_highlight", {PKGDATADIR});
139 RawPixel const texture_highlight_size = GetDefaultMaxTextureSize(texture_path);139 RawPixel const texture_highlight_size = GetDefaultMaxTextureSize(texture_path) * 0.8;
140 highlight_tex_.Adopt(nux::CreateTexture2DFromFile(texture_highlight_path.c_str(), texture_highlight_size.CP(scale), true));140 highlight_tex_.Adopt(nux::CreateTexture2DFromFile(texture_highlight_path.c_str(), texture_highlight_size.CP(scale), true));
141}141}
142142
diff --git a/shutdown/SessionView.cpp b/shutdown/SessionView.cpp
index 422e3c9..a5667c2 100644
--- a/shutdown/SessionView.cpp
+++ b/shutdown/SessionView.cpp
@@ -39,7 +39,7 @@ namespace style
39 RawPixel const LEFT_RIGHT_PADDING = 30_em;39 RawPixel const LEFT_RIGHT_PADDING = 30_em;
40 RawPixel const TOP_PADDING = 19_em;40 RawPixel const TOP_PADDING = 19_em;
41 RawPixel const BOTTOM_PADDING = 12_em;41 RawPixel const BOTTOM_PADDING = 12_em;
42 RawPixel const MAIN_SPACE = 10_em;42 RawPixel const MAIN_SPACE = 17_em;
43 RawPixel const BUTTONS_SPACE = 20_em;43 RawPixel const BUTTONS_SPACE = 20_em;
44}44}
4545
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 58a8b10..82d92aa 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -281,7 +281,6 @@ if (GMOCK_LIB AND
281 add_unity_test_xless (launcher-options)281 add_unity_test_xless (launcher-options)
282 add_unity_test_xless (layout-system)282 add_unity_test_xless (layout-system)
283 add_unity_test_xless (model-iterator)283 add_unity_test_xless (model-iterator)
284 add_unity_test_xless (previews)
285 add_unity_test_xless (raw-pixel)284 add_unity_test_xless (raw-pixel)
286 add_unity_test_xless (scope-data)285 add_unity_test_xless (scope-data)
287 add_unity_test_xless (time-util)286 add_unity_test_xless (time-util)
@@ -382,7 +381,6 @@ if (ENABLE_X_SUPPORT)
382 add_unity_test (dash-controller)381 add_unity_test (dash-controller)
383 add_unity_test (desktop-launcher-icon)382 add_unity_test (desktop-launcher-icon)
384 add_unity_test (device-launcher-section)383 add_unity_test (device-launcher-section)
385 add_unity_test (error-preview)
386 add_unity_test (edge-barrier-controller)384 add_unity_test (edge-barrier-controller)
387 add_unity_test (expo-launcher-icon)385 add_unity_test (expo-launcher-icon)
388 add_unity_test (file-manager-launcher-icon)386 add_unity_test (file-manager-launcher-icon)
@@ -418,14 +416,6 @@ if (ENABLE_X_SUPPORT)
418 add_unity_test (panel-tray)416 add_unity_test (panel-tray)
419 add_unity_test (panel-view)417 add_unity_test (panel-view)
420 add_unity_test (places-group)418 add_unity_test (places-group)
421 add_unity_test (preview-player)
422 add_unity_test (previews-application)
423 add_unity_test (previews-generic)
424 add_unity_test (previews-movie)
425 add_unity_test (previews-music)
426 add_unity_test (previews-music-payment)
427 add_unity_test (previews-payment)
428 add_unity_test (previews-social)
429 add_unity_test (quicklist-manager)419 add_unity_test (quicklist-manager)
430 add_unity_test (quicklist-menu-item)420 add_unity_test (quicklist-menu-item)
431 add_unity_test (quicklist-view)421 add_unity_test (quicklist-view)
diff --git a/tests/mock_key_grabber.h b/tests/mock_key_grabber.h
index 2c271ca..27bccd1 100644
--- a/tests/mock_key_grabber.h
+++ b/tests/mock_key_grabber.h
@@ -18,7 +18,7 @@
18 *18 *
19 */19 */
2020
21#include "KeyGrabber.h"21#include "unity-shared/KeyGrabber.h"
22#include <gmock/gmock.h>22#include <gmock/gmock.h>
2323
24namespace unity24namespace unity
diff --git a/tests/test_error_preview.cpp b/tests/test_error_preview.cpp
25deleted file mode 10064425deleted file mode 100644
index a339e0d..0000000
--- a/tests/test_error_preview.cpp
+++ /dev/null
@@ -1,109 +0,0 @@
1/*
2 * Copyright 2012-2013 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License version 3, as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranties of
10 * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
11 * PURPOSE. See the applicable version of the GNU Lesser General Public
12 * License for more details.
13 *
14 * You should have received a copy of both the GNU Lesser General Public
15 * License version 3 along with this program. If not, see
16 * <http://www.gnu.org/licenses/>
17 *
18 * Authored by: Diego Sarmentero <diego.sarmentero@canonical.com>
19 *
20 */
21#include <list>
22#include <gmock/gmock.h>
23using namespace testing;
24
25#include <Nux/Nux.h>
26#include <Nux/BaseWindow.h>
27#include <unity-shared/StaticCairoText.h>
28#include <unity-shared/DashStyle.h>
29#include <unity-shared/PreviewStyle.h>
30#include <unity-shared/ThumbnailGenerator.h>
31
32#include <unity-protocol.h>
33#include "dash/previews/ErrorPreview.h"
34#include "test_utils.h"
35
36namespace unity
37{
38
39namespace dash
40{
41
42namespace previews
43{
44
45class ErrorPreviewMock : public ErrorPreview
46{
47 public:
48 ErrorPreviewMock(dash::Preview::Ptr preview_model)
49 : ErrorPreview(preview_model){}
50 ~ErrorPreviewMock(){}
51
52 using ErrorPreview::intro_;
53 using ErrorPreview::title_;
54 using ErrorPreview::subtitle_;
55 using ErrorPreview::purchase_hint_;
56 using ErrorPreview::purchase_prize_;
57 using ErrorPreview::purchase_type_;
58};
59
60class TestErrorPreview : public Test
61{
62 protected:
63 TestErrorPreview() :
64 Test(),
65 parent_window_(new nux::BaseWindow("TestErrorPayment"))
66 {
67 title = "Turning Japanese";
68 subtitle = "The vapors";
69 header = "Hi test, you purchased in the past from Ubuntu One.";
70 purchase_prize = "65$";
71 purchase_type = "Mp3";
72 preview_type = UNITY_PROTOCOL_PREVIEW_PAYMENT_TYPE_ERROR;
73
74 glib::Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_payment_preview_new()));
75
76 unity_protocol_preview_set_title(proto_obj, title.c_str());
77 unity_protocol_preview_set_subtitle(proto_obj, subtitle.c_str());
78
79 unity_protocol_payment_preview_set_header(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), header.c_str());
80 unity_protocol_payment_preview_set_purchase_prize(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), purchase_prize.c_str());
81 unity_protocol_payment_preview_set_purchase_type(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), purchase_type.c_str());
82 unity_protocol_payment_preview_set_preview_type(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), preview_type);
83
84 glib::Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), glib::StealRef());
85
86 preview_model = dash::Preview::PreviewForVariant(v);
87
88 }
89
90 nux::ObjectPtr<nux::BaseWindow> parent_window_;
91 dash::Preview::Ptr preview_model;
92
93 // testing data
94 std::string title;
95 std::string subtitle;
96 std::string header;
97 std::string purchase_prize;
98 std::string purchase_type;
99 UnityProtocolPreviewPaymentType preview_type;
100
101 // needed for styles
102 dash::Style dash_style;
103};
104
105} // previews
106
107} // dash
108
109} // unity
diff --git a/tests/test_launcher.cpp b/tests/test_launcher.cpp
index d49f886..dddba10 100644
--- a/tests/test_launcher.cpp
+++ b/tests/test_launcher.cpp
@@ -205,33 +205,6 @@ struct TestWindowCompositor
205 }205 }
206};206};
207207
208TEST_F(TestLauncher, TestQuirksDuringDnd)
209{
210 MockMockLauncherIcon::Ptr first(new MockMockLauncherIcon::Nice);
211 model_->AddIcon(first);
212
213 MockMockLauncherIcon::Ptr second(new MockMockLauncherIcon::Nice);
214 model_->AddIcon(second);
215
216 MockMockLauncherIcon::Ptr third(new MockMockLauncherIcon::Nice);
217 model_->AddIcon(third);
218
219 EXPECT_CALL(*first, ShouldHighlightOnDrag(_))
220 .WillRepeatedly(Return(true));
221
222 EXPECT_CALL(*second, ShouldHighlightOnDrag(_))
223 .WillRepeatedly(Return(true));
224
225 EXPECT_CALL(*third, ShouldHighlightOnDrag(_))
226 .WillRepeatedly(Return(false));
227
228 launcher_->DndStarted("");
229
230 EXPECT_FALSE(first->GetQuirk(launcher::AbstractLauncherIcon::Quirk::DESAT, launcher_->monitor()));
231 EXPECT_FALSE(second->GetQuirk(launcher::AbstractLauncherIcon::Quirk::DESAT, launcher_->monitor()));
232 EXPECT_TRUE(third->GetQuirk(launcher::AbstractLauncherIcon::Quirk::DESAT, launcher_->monitor()));
233}
234
235TEST_F(TestLauncher, TestMouseWheelScroll)208TEST_F(TestLauncher, TestMouseWheelScroll)
236{209{
237 MockMockLauncherIcon::Ptr icon(new MockMockLauncherIcon::Nice);210 MockMockLauncherIcon::Ptr icon(new MockMockLauncherIcon::Nice);
@@ -496,17 +469,6 @@ TEST_F(TestLauncher, DragLauncherIconHidesOutsideLauncherEmitsMouseEnter)
496 EXPECT_FALSE(mouse_entered);469 EXPECT_FALSE(mouse_entered);
497}470}
498471
499TEST_F(TestLauncher, EdgeReleasesDuringDnd)
500{
501 auto barrier = std::make_shared<ui::PointerBarrierWrapper>();
502 auto event = std::make_shared<ui::BarrierEvent>(0, 0, 0, 100);
503
504 launcher_->DndStarted("");
505
506 EXPECT_EQ(launcher_->HandleBarrierEvent(barrier, event),
507 ui::EdgeBarrierSubscriber::Result::NEEDS_RELEASE);
508}
509
510TEST_F(TestLauncher, EdgeBarriersIgnoreEvents)472TEST_F(TestLauncher, EdgeBarriersIgnoreEvents)
511{473{
512 auto const& launcher_geo = launcher_->GetAbsoluteGeometry();474 auto const& launcher_geo = launcher_->GetAbsoluteGeometry();
@@ -618,26 +580,6 @@ TEST_F(TestLauncher, DndIsSpecialRequest)
618 EXPECT_FALSE(launcher_->DndIsSpecialRequest("file://full/path/to/MyFile.txt"));580 EXPECT_FALSE(launcher_->DndIsSpecialRequest("file://full/path/to/MyFile.txt"));
619}581}
620582
621TEST_F(TestLauncher, AddRequestSignal)
622{
623 auto const& icons = AddMockIcons(1);
624 auto const& center = icons[0]->GetCenter(launcher_->monitor());
625 launcher_->ProcessDndEnter();
626 launcher_->FakeProcessDndMove(center.x, center.y, {"application://MyFile.desktop"});
627
628 bool add_request = false;
629 launcher_->add_request.connect([&] (std::string const& uri, AbstractLauncherIcon::Ptr const& drop_icon) {
630 EXPECT_EQ(drop_icon, icons[0]);
631 EXPECT_EQ(uri, "application://MyFile.desktop");
632 add_request = true;
633 });
634
635 launcher_->ProcessDndDrop(center.x, center.y);
636 launcher_->ProcessDndLeave();
637
638 EXPECT_TRUE(add_request);
639}
640
641TEST_F(TestLauncher, IconStartingPulseValue)583TEST_F(TestLauncher, IconStartingPulseValue)
642{584{
643 MockMockLauncherIcon::Ptr icon(new MockMockLauncherIcon::Nice);585 MockMockLauncherIcon::Ptr icon(new MockMockLauncherIcon::Nice);
diff --git a/tests/test_launcher_controller.cpp b/tests/test_launcher_controller.cpp
index 9495dff..2f74271 100644
--- a/tests/test_launcher_controller.cpp
+++ b/tests/test_launcher_controller.cpp
@@ -1758,46 +1758,6 @@ TEST_F(TestLauncherController, DisconnectWMSignalsOnDestruction)
1758 color_property.changed.emit(nux::color::RandomColor());1758 color_property.changed.emit(nux::color::RandomColor());
1759}1759}
17601760
1761TEST_F(TestLauncherController, DragAndDrop_MultipleLaunchers)
1762{
1763 lc.multiple_launchers = true;
1764 uscreen.SetupFakeMultiMonitor();
1765 lc.options()->hide_mode = LAUNCHER_HIDE_AUTOHIDE;
1766 unsigned monitor = 0;
1767 unsigned old_monitor = -1;
1768
1769 auto check_fn = [this](int index) {
1770 return lc.launchers()[index]->Hidden();
1771 };
1772
1773 ON_CALL(*xdnd_manager_, Monitor()).WillByDefault(ReturnPointee(&monitor));
1774 xdnd_manager_->dnd_started.emit("my_awesome_file", monitor);
1775
1776 for (unsigned i = 0; i < monitors::MAX; ++i)
1777 {
1778 Utils::WaitUntilMSec(std::bind(check_fn, i), i != monitor);
1779 ASSERT_EQ(i != monitor, check_fn(i));
1780 }
1781
1782 old_monitor = monitor;
1783 monitor = 3;
1784 xdnd_manager_->monitor_changed.emit("another_file", old_monitor, monitor);
1785
1786 for (unsigned i = 0; i < monitors::MAX; ++i)
1787 {
1788 Utils::WaitUntilMSec(std::bind(check_fn, i), i != monitor);
1789 ASSERT_EQ(i != monitor, check_fn(i));
1790 }
1791
1792 xdnd_manager_->dnd_finished.emit();
1793
1794 for (unsigned i = 0; i < monitors::MAX; ++i)
1795 {
1796 Utils::WaitUntilMSec(std::bind(check_fn, i), true);
1797 ASSERT_TRUE(check_fn(i));
1798 }
1799}
1800
1801TEST_F(TestLauncherController, DragAndDrop_SingleLauncher)1761TEST_F(TestLauncherController, DragAndDrop_SingleLauncher)
1802{1762{
1803 lc.multiple_launchers = false;1763 lc.multiple_launchers = false;
@@ -1824,87 +1784,6 @@ TEST_F(TestLauncherController, DragAndDrop_SingleLauncher)
1824 Utils::WaitUntilMSec(check_fn, true);1784 Utils::WaitUntilMSec(check_fn, true);
1825}1785}
18261786
1827TEST_F(TestLauncherController, DragAndDrop_MultipleLaunchers_DesaturateIcons)
1828{
1829 lc.multiple_launchers = true;
1830 uscreen.SetupFakeMultiMonitor();
1831 unsigned monitor = 0;
1832 unsigned old_monitor = -1;
1833 auto const& model = lc.Impl()->model_;
1834
1835 ON_CALL(*xdnd_manager_, Monitor()).WillByDefault(ReturnPointee(&monitor));
1836 xdnd_manager_->dnd_started.emit("my_awesome_file", monitor);
1837
1838 for (auto const& icon : *model)
1839 {
1840 bool is_trash = icon->GetIconType() == AbstractLauncherIcon::IconType::TRASH;
1841
1842 for (unsigned i = 0; i < monitors::MAX; ++i)
1843 ASSERT_EQ(monitor == i && !is_trash, icon->GetQuirk(AbstractLauncherIcon::Quirk::DESAT, i));
1844 }
1845
1846 old_monitor = monitor;
1847 monitor = 3;
1848 xdnd_manager_->monitor_changed.emit("another_file", old_monitor, monitor);
1849
1850 for (auto const& icon : *model)
1851 {
1852 bool is_trash = icon->GetIconType() == AbstractLauncherIcon::IconType::TRASH;
1853
1854 for (unsigned i = 0; i < monitors::MAX; ++i)
1855 ASSERT_EQ(monitor == i && !is_trash, icon->GetQuirk(AbstractLauncherIcon::Quirk::DESAT, i));
1856 }
1857
1858 xdnd_manager_->dnd_finished.emit();
1859
1860 for (auto const& icon : *model)
1861 {
1862 for (unsigned i = 0; i < monitors::MAX; ++i)
1863 ASSERT_FALSE(icon->GetQuirk(AbstractLauncherIcon::Quirk::DESAT, i));
1864 }
1865}
1866
1867TEST_F(TestLauncherController, DragAndDrop_SingleLauncher_DesaturateIcons)
1868{
1869 lc.multiple_launchers = false;
1870 unsigned monitor = 2;
1871 unsigned old_monitor = -1;
1872 uscreen.SetupFakeMultiMonitor(monitor);
1873 lc.options()->hide_mode = LAUNCHER_HIDE_AUTOHIDE;
1874 auto const& model = lc.Impl()->model_;
1875
1876 ON_CALL(*xdnd_manager_, Monitor()).WillByDefault(ReturnPointee(&monitor));
1877 xdnd_manager_->dnd_started.emit("my_awesome_file", monitor);
1878
1879 for (auto const& icon : *model)
1880 {
1881 bool is_trash = icon->GetIconType() == AbstractLauncherIcon::IconType::TRASH;
1882
1883 for (unsigned i = 0; i < monitors::MAX; ++i)
1884 ASSERT_EQ(monitor == i && !is_trash, icon->GetQuirk(AbstractLauncherIcon::Quirk::DESAT, i));
1885 }
1886
1887 old_monitor = monitor;
1888 monitor = 0;
1889 xdnd_manager_->monitor_changed.emit("another_file", old_monitor, monitor);
1890
1891 for (auto const& icon : *model)
1892 {
1893 bool is_trash = icon->GetIconType() == AbstractLauncherIcon::IconType::TRASH;
1894
1895 for (unsigned i = 0; i < monitors::MAX; ++i)
1896 ASSERT_EQ(old_monitor == i && !is_trash, icon->GetQuirk(AbstractLauncherIcon::Quirk::DESAT, i));
1897 }
1898
1899 xdnd_manager_->dnd_finished.emit();
1900
1901 for (auto const& icon : *model)
1902 {
1903 for (unsigned i = 0; i < monitors::MAX; ++i)
1904 ASSERT_FALSE(icon->GetQuirk(AbstractLauncherIcon::Quirk::DESAT, i));
1905 }
1906}
1907
1908TEST_F(TestLauncherController, SetExistingLauncherIconAsFavorite)1787TEST_F(TestLauncherController, SetExistingLauncherIconAsFavorite)
1909{1788{
1910 const char * desktop_file = "normal-icon.desktop";1789 const char * desktop_file = "normal-icon.desktop";
diff --git a/tests/test_preview_player.cpp b/tests/test_preview_player.cpp
1911deleted file mode 1006441790deleted file mode 100644
index df481e9..0000000
--- a/tests/test_preview_player.cpp
+++ /dev/null
@@ -1,230 +0,0 @@
1// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
2/*
3 * Copyright (C) 2013 Canonical Ltd
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Authored by: Nick Dedekind <nick.dedekinc@canonical.com>
18 */
19
20#include <gmock/gmock.h>
21#include <UnityCore/PreviewPlayer.h>
22#include <UnityCore/ConnectionManager.h>
23#include <UnityCore/GLibDBusServer.h>
24#include <UnityCore/Variant.h>
25#include "test_utils.h"
26#include "config.h"
27
28namespace unity
29{
30
31namespace
32{
33 const std::string WHITE_NOISE = "file://" BUILDDIR "/tests/data/unity/sounds/whitenoise.mp3";
34
35 const std::string PLAYER_NAME = "com.canonical.Unity.Lens.Music.PreviewPlayer";
36 const std::string PLAYER_PATH = "/com/canonical/Unity/Lens/Music/PreviewPlayer";
37 const std::string PLAYER_INTERFACE =
38 R"(<node>
39 <interface name="com.canonical.Unity.Lens.Music.PreviewPlayer">
40 <method name="Play">
41 <arg type="s" name="uri" direction="in"/>
42 </method>
43 <method name="Pause">
44 </method>
45 <method name="Resume">
46 </method>
47 <method name="PauseResume">
48 </method>
49 <method name="Stop">
50 </method>
51 <method name="Close">
52 </method>
53 <method name="VideoProperties">
54 <arg type="s" name="uri" direction="in"/>
55 <arg type="a{sv}" name="result" direction="out"/>
56 </method>
57 <signal name="Progress">
58 <arg type="s" name="uri"/>
59 <arg type="u" name="state"/>
60 <arg type="d" name="value"/>
61 </signal>
62 </interface>
63 </node>)";
64
65 void PlayAndWait(PreviewPlayer* player, std::string const& uri)
66 {
67 bool play_returned = false;
68 auto play_callback = [&play_returned] (glib::Error const& error) {
69 play_returned = true;
70 EXPECT_TRUE(!error) << "Error: " << error.Message();
71 };
72
73 bool updated_called = false;
74 auto updated_callback = [uri, &updated_called] (std::string const& _uri, PlayerState state, double) {
75 updated_called = true;
76 EXPECT_EQ(_uri, uri) << "Uri for PLAY not correct (" << _uri << " != " << _uri << ")";
77 EXPECT_EQ((int)state, (int)PlayerState::PLAYING) << "Incorrect state returned on PLAY.";
78 };
79
80 connection::Wrapper conn(player->updated.connect(updated_callback));
81 player->Play(uri, play_callback);
82 ::Utils::WaitUntilMSec(play_returned, 3000, "PLAY did not return");
83 ::Utils::WaitUntilMSec(updated_called, 5000, "Update not called on PLAY");
84 }
85
86 void PauseAndWait(PreviewPlayer* player)
87 {
88 bool pause_returned = false;
89 auto callback = [&pause_returned] (glib::Error const& error) {
90 pause_returned = true;
91 EXPECT_TRUE(!error) << "Error: " << error.Message();
92 };
93
94 bool updated_called = false;
95 auto updated_callback = [&updated_called] (std::string const&, PlayerState state, double) {
96 updated_called = true;
97 EXPECT_EQ((int)state, (int)PlayerState::PAUSED) << "Incorrect state returned on PAUSE.";
98 };
99
100 connection::Wrapper conn(player->updated.connect(updated_callback));
101 player->Pause(callback);
102 ::Utils::WaitUntilMSec(pause_returned, 3000, "PAUSE did not return");
103 ::Utils::WaitUntilMSec(updated_called, 5000, "Update not called on PAUSE");
104 }
105
106 void ResumeAndWait(PreviewPlayer* player)
107 {
108 bool resume_returned = false;
109 auto callback = [&resume_returned] (glib::Error const& error) {
110 resume_returned = true;
111 EXPECT_TRUE(!error) << "Error: " << error.Message();
112 };
113
114 bool updated_called = false;
115 auto updated_callback = [&updated_called] (std::string const&, PlayerState state, double) {
116 updated_called = true;
117 EXPECT_EQ((int)state, (int)PlayerState::PLAYING) << "Incorrect state returned on RESUME.";
118 };
119
120 connection::Wrapper conn(player->updated.connect(updated_callback));
121 player->Resume(callback);
122 ::Utils::WaitUntilMSec(resume_returned, 3000, "RESUME did not return");
123 ::Utils::WaitUntilMSec(updated_called, 5000, "Update not called on RESUME");
124 }
125
126 void StopAndWait(PreviewPlayer* player)
127 {
128 bool stop_returned = false;
129 auto callback = [&stop_returned] (glib::Error const& error) {
130 stop_returned = true;
131 EXPECT_TRUE(!error) << "Error: " << error.Message();
132 };
133
134 bool updated_called = false;
135 auto updated_callback = [&updated_called] (std::string const&, PlayerState state, double) {
136 updated_called = true;
137 EXPECT_EQ((int)state, (int)PlayerState::STOPPED) << "Incorrect state returned on STOP.";
138 };
139
140 connection::Wrapper conn(player->updated.connect(updated_callback));
141 player->Stop(callback);
142 ::Utils::WaitUntilMSec(stop_returned, 3000, "STOP did not return");
143 ::Utils::WaitUntilMSec(updated_called, 5000, "Update not called on STOP");
144 }
145
146 struct FakeRemotePlayer
147 {
148 typedef std::shared_ptr<FakeRemotePlayer> Ptr;
149 FakeRemotePlayer()
150 : server_(PLAYER_NAME)
151 {
152 server_.AddObjects(PLAYER_INTERFACE, PLAYER_PATH);
153 auto object = server_.GetObjects().front();
154
155 object->SetMethodsCallsHandler([this, object] (std::string const& method, GVariant* parameters) {
156 if (method == "Play")
157 {
158 current_uri_ = glib::Variant(parameters).GetString();
159 object->EmitSignal("Progress", g_variant_new("(sud)", current_uri_.c_str(), PlayerState::PLAYING, 0));
160 }
161 else if (method == "Pause")
162 {
163 object->EmitSignal("Progress", g_variant_new("(sud)", current_uri_.c_str(), PlayerState::PAUSED, 0));
164 }
165 else if (method == "Resume")
166 {
167 object->EmitSignal("Progress", g_variant_new("(sud)", current_uri_.c_str(), PlayerState::PLAYING, 0));
168 }
169 else if (method == "Stop")
170 {
171 object->EmitSignal("Progress", g_variant_new("(sud)", current_uri_.c_str(), PlayerState::STOPPED, 0));
172 current_uri_ = "";
173 }
174
175 return static_cast<GVariant*>(nullptr);
176 });
177 }
178
179 private:
180 glib::DBusServer server_;
181 std::string current_uri_;
182 };
183}
184
185struct TestPreviewPlayer : testing::Test
186{
187 static void SetUpTestCase()
188 {
189 remote_player_ = std::make_shared<FakeRemotePlayer>();
190 }
191
192 static void TearDownTestCase()
193 {
194 remote_player_.reset();
195 }
196
197 static FakeRemotePlayer::Ptr remote_player_;
198 PreviewPlayer player;
199};
200
201FakeRemotePlayer::Ptr TestPreviewPlayer::remote_player_;
202
203TEST_F(TestPreviewPlayer, TestConstruct)
204{
205 PreviewPlayer player1;
206}
207
208TEST_F(TestPreviewPlayer, TestPlayerControl)
209{
210 PlayAndWait(&player, WHITE_NOISE);
211
212 PauseAndWait(&player);
213
214 ResumeAndWait(&player);
215
216 StopAndWait(&player);
217}
218
219TEST_F(TestPreviewPlayer, TestMultiPlayer)
220{
221 {
222 PreviewPlayer player2;
223 PlayAndWait(&player2, WHITE_NOISE);
224 }
225
226 StopAndWait(&player);
227}
228
229
230} // namespace unity
231\ No newline at end of file0\ No newline at end of file
diff --git a/tests/test_previews.cpp b/tests/test_previews.cpp
232deleted file mode 1006441deleted file mode 100644
index 3c99a08..0000000
--- a/tests/test_previews.cpp
+++ /dev/null
@@ -1,230 +0,0 @@
1// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
2/*
3 * Copyright (C) 2011 Canonical Ltd
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Authored by: Marco Trevisan (TreviƱo) <3v1n0@ubuntu.com>
18 */
19
20#include <list>
21#include <algorithm>
22#include <gmock/gmock.h>
23#include <gio/gio.h>
24#include <UnityCore/Variant.h>
25#include <UnityCore/Preview.h>
26#include <UnityCore/ApplicationPreview.h>
27#include <UnityCore/MoviePreview.h>
28#include <UnityCore/MusicPreview.h>
29#include <unity-protocol.h>
30
31using namespace std;
32using namespace testing;
33using namespace unity;
34using namespace unity::glib;
35using namespace unity::dash;
36
37namespace
38{
39
40bool IsVariant(Variant const& variant)
41{
42 return g_variant_get_type_string(variant) != NULL;
43}
44
45static void g_variant_unref0(gpointer var)
46{
47 if (var) g_variant_unref((GVariant*)var);
48}
49
50TEST(TestPreviews, DeserializeGeneric)
51{
52 Object<GIcon> icon(g_icon_new_for_string("accessories", NULL));
53 Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_generic_preview_new()));
54 unity_protocol_preview_set_title(proto_obj, "Title");
55 unity_protocol_preview_set_subtitle(proto_obj, "Subtitle");
56 unity_protocol_preview_set_description(proto_obj, "Description");
57 unity_protocol_preview_set_image(proto_obj, icon);
58 unity_protocol_preview_set_image_source_uri(proto_obj, "Source");
59
60 Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())),
61 glib::StealRef());
62 EXPECT_TRUE(IsVariant(v));
63
64 Preview::Ptr preview = Preview::PreviewForVariant(v);
65 EXPECT_TRUE(preview != nullptr);
66
67 EXPECT_EQ(preview->renderer_name, "preview-generic");
68 EXPECT_EQ(preview->title, "Title");
69 EXPECT_EQ(preview->subtitle, "Subtitle");
70 EXPECT_EQ(preview->description, "Description");
71 EXPECT_EQ(preview->image_source_uri, "Source");
72 EXPECT_TRUE(g_icon_equal(preview->image(), icon) != FALSE);
73}
74
75TEST(TestPreviews, DeserializeGenericWithMeta)
76{
77 Object<GIcon> icon(g_icon_new_for_string("accessories", NULL));
78 Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_generic_preview_new()));
79 unity_protocol_preview_set_title(proto_obj, "Title");
80 unity_protocol_preview_set_subtitle(proto_obj, "Subtitle");
81 unity_protocol_preview_set_description(proto_obj, "Description");
82 unity_protocol_preview_set_image(proto_obj, icon);
83 unity_protocol_preview_set_image_source_uri(proto_obj, "Source");
84
85 GHashTable* hints = g_hash_table_new_full(g_str_hash, g_direct_equal, g_free, g_variant_unref0);
86 g_hash_table_insert(hints, g_strdup("extra-text"), g_variant_new_string("Foo"));
87 unity_protocol_preview_add_action(proto_obj, "action1", "Action #1", NULL, 0);
88 unity_protocol_preview_add_action_with_hints(proto_obj, "action2", "Action #2", NULL, 0, hints);
89 unity_protocol_preview_add_info_hint(proto_obj, "hint1", "Hint 1", NULL, g_variant_new("i", 34));
90 unity_protocol_preview_add_info_hint(proto_obj, "hint2", "Hint 2", NULL, g_variant_new("s", "string hint"));
91
92 Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())),
93 glib::StealRef());
94 EXPECT_TRUE(IsVariant(v));
95
96 Preview::Ptr preview = Preview::PreviewForVariant(v);
97 EXPECT_TRUE(preview != nullptr);
98
99 EXPECT_EQ(preview->renderer_name, "preview-generic");
100 EXPECT_EQ(preview->title, "Title");
101 EXPECT_EQ(preview->subtitle, "Subtitle");
102 EXPECT_EQ(preview->description, "Description");
103 EXPECT_TRUE(g_icon_equal(preview->image(), icon) != FALSE);
104 EXPECT_EQ(preview->image_source_uri, "Source");
105
106 auto actions = preview->GetActions();
107 auto info_hints = preview->GetInfoHints();
108
109 EXPECT_EQ(actions.size(), 2u);
110
111 auto action1 = actions[0];
112 EXPECT_EQ(action1->id, "action1");
113 EXPECT_EQ(action1->display_name, "Action #1");
114 EXPECT_EQ(action1->icon_hint, "");
115 EXPECT_EQ(action1->layout_hint, 0);
116 EXPECT_EQ(action1->extra_text, "");
117
118 auto action2 = actions[1];
119 EXPECT_EQ(action2->id, "action2");
120 EXPECT_EQ(action2->display_name, "Action #2");
121 EXPECT_EQ(action2->icon_hint, "");
122 EXPECT_EQ(action2->extra_text, "Foo");
123
124 EXPECT_EQ(info_hints.size(), 2u);
125 auto hint1 = info_hints[0];
126 EXPECT_EQ(hint1->id, "hint1");
127 EXPECT_EQ(hint1->display_name, "Hint 1");
128 EXPECT_EQ(hint1->icon_hint, "");
129 EXPECT_EQ(hint1->value.GetInt32(), 34);
130 auto hint2 = info_hints[1];
131 EXPECT_EQ(hint2->id, "hint2");
132 EXPECT_EQ(hint2->display_name, "Hint 2");
133 EXPECT_EQ(hint2->icon_hint, "");
134 EXPECT_EQ(hint2->value.GetString(), "string hint");
135}
136
137TEST(TestPreviews, DeserializeApplication)
138{
139 Object<GIcon> icon(g_icon_new_for_string("application", NULL));
140 Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_application_preview_new()));
141 unity_protocol_preview_set_title(proto_obj, "Title");
142 unity_protocol_preview_set_subtitle(proto_obj, "Subtitle");
143 unity_protocol_preview_set_description(proto_obj, "Description");
144 unity_protocol_preview_set_image(proto_obj, icon);
145 auto app_proto_obj = glib::object_cast<UnityProtocolApplicationPreview>(proto_obj);
146 unity_protocol_application_preview_set_last_update(app_proto_obj, "2012/06/13");
147 unity_protocol_application_preview_set_copyright(app_proto_obj, "(c) Canonical");
148 unity_protocol_application_preview_set_license(app_proto_obj, "GPLv3");
149 unity_protocol_application_preview_set_app_icon(app_proto_obj, icon);
150 unity_protocol_application_preview_set_rating(app_proto_obj, 4.0);
151 unity_protocol_application_preview_set_num_ratings(app_proto_obj, 12);
152
153 Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())),
154 glib::StealRef());
155 EXPECT_TRUE(IsVariant(v));
156
157 Preview::Ptr base_preview = Preview::PreviewForVariant(v);
158 ApplicationPreview::Ptr preview = std::dynamic_pointer_cast<ApplicationPreview>(base_preview);
159 EXPECT_TRUE(preview != nullptr);
160
161 EXPECT_EQ(preview->renderer_name, "preview-application");
162 EXPECT_EQ(preview->title, "Title");
163 EXPECT_EQ(preview->subtitle, "Subtitle");
164 EXPECT_EQ(preview->description, "Description");
165 EXPECT_TRUE(g_icon_equal(preview->image(), icon) != FALSE);
166 EXPECT_EQ(preview->last_update, "2012/06/13");
167 EXPECT_EQ(preview->copyright, "(c) Canonical");
168 EXPECT_EQ(preview->license, "GPLv3");
169 EXPECT_TRUE(g_icon_equal(preview->app_icon(), icon) != FALSE);
170 EXPECT_EQ(preview->rating, 4.0);
171 EXPECT_EQ(preview->num_ratings, static_cast<unsigned>(12));
172}
173
174TEST(TestPreviews, DeserializeMovie)
175{
176 Object<GIcon> icon(g_icon_new_for_string("movie", NULL));
177 Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_movie_preview_new()));
178 unity_protocol_preview_set_title(proto_obj, "Title");
179 unity_protocol_preview_set_subtitle(proto_obj, "Subtitle");
180 unity_protocol_preview_set_description(proto_obj, "Description");
181 unity_protocol_preview_set_image(proto_obj, icon);
182 auto movie_proto_obj = glib::object_cast<UnityProtocolMoviePreview>(proto_obj);
183 unity_protocol_movie_preview_set_year(movie_proto_obj, "2012");
184 unity_protocol_movie_preview_set_rating(movie_proto_obj, 4.0);
185 unity_protocol_movie_preview_set_num_ratings(movie_proto_obj, 12);
186
187 Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())),
188 glib::StealRef());
189 EXPECT_TRUE(IsVariant(v));
190
191 Preview::Ptr base_preview = Preview::PreviewForVariant(v);
192 MoviePreview::Ptr preview = std::dynamic_pointer_cast<MoviePreview>(base_preview);
193 EXPECT_TRUE(preview != nullptr);
194
195 EXPECT_EQ(preview->renderer_name, "preview-movie");
196 EXPECT_EQ(preview->title, "Title");
197 EXPECT_EQ(preview->subtitle, "Subtitle");
198 EXPECT_EQ(preview->description, "Description");
199 EXPECT_TRUE(g_icon_equal(preview->image(), icon) != FALSE);
200 EXPECT_EQ(preview->year, "2012");
201 EXPECT_EQ(preview->rating, 4.0);
202 EXPECT_EQ(preview->num_ratings, static_cast<unsigned int>(12));
203}
204
205TEST(TestPreviews, DeserializeMusic)
206{
207 Object<GIcon> icon(g_icon_new_for_string("music", NULL));
208 Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_music_preview_new()));
209 unity_protocol_preview_set_title(proto_obj, "Title");
210 unity_protocol_preview_set_subtitle(proto_obj, "Subtitle");
211 unity_protocol_preview_set_description(proto_obj, "Description");
212 unity_protocol_preview_set_image(proto_obj, icon);
213 auto music_proto_obj = glib::object_cast<UnityProtocolMusicPreview>(proto_obj);
214
215 Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())),
216 glib::StealRef());
217 EXPECT_TRUE(IsVariant(v));
218
219 Preview::Ptr base_preview = Preview::PreviewForVariant(v);
220 MusicPreview::Ptr preview = std::dynamic_pointer_cast<MusicPreview>(base_preview);
221 EXPECT_TRUE(preview != nullptr);
222
223 EXPECT_EQ(preview->renderer_name, "preview-music");
224 EXPECT_EQ(preview->title, "Title");
225 EXPECT_EQ(preview->subtitle, "Subtitle");
226 EXPECT_EQ(preview->description, "Description");
227 EXPECT_TRUE(g_icon_equal(preview->image(), icon) != FALSE);
228}
229
230} // Namespace
diff --git a/tests/test_previews_application.cpp b/tests/test_previews_application.cpp
231deleted file mode 1006440deleted file mode 100644
index 82afc29..0000000
--- a/tests/test_previews_application.cpp
+++ /dev/null
@@ -1,142 +0,0 @@
1// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
2/*
3 * Copyright (C) 2012 Canonical Ltd
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Authored by: Nick Dedekind <nick.dedekinc@canonical.com>
18 */
19
20#include <list>
21#include <gmock/gmock.h>
22using namespace testing;
23
24#include <Nux/Nux.h>
25#include <Nux/BaseWindow.h>
26#include <unity-shared/StaticCairoText.h>
27#include <unity-shared/DashStyle.h>
28#include <unity-shared/PreviewStyle.h>
29#include <unity-shared/ThumbnailGenerator.h>
30
31#include <unity-protocol.h>
32#include "UnityCore/ApplicationPreview.h"
33#include "dash/previews/ApplicationPreview.h"
34#include "dash/previews/PreviewInfoHintWidget.h"
35#include "dash/previews/PreviewRatingsWidget.h"
36#include "dash/previews/ActionButton.h"
37#include "test_utils.h"
38using namespace unity;
39using namespace unity::dash;
40
41namespace
42{
43
44class MockApplicationPreview : public previews::ApplicationPreview
45{
46public:
47 typedef nux::ObjectPtr<MockApplicationPreview> Ptr;
48
49 MockApplicationPreview(dash::Preview::Ptr preview_model)
50 : ApplicationPreview(preview_model)
51 {}
52
53 using ApplicationPreview::title_;
54 using ApplicationPreview::subtitle_;
55 using ApplicationPreview::license_;
56 using ApplicationPreview::last_update_;
57 using ApplicationPreview::copywrite_;
58 using ApplicationPreview::description_;
59 using ApplicationPreview::action_buttons_;
60 using ApplicationPreview::preview_info_hints_;
61 using ApplicationPreview::app_rating_;
62};
63
64class TestPreviewApplication : public Test
65{
66public:
67 TestPreviewApplication()
68 : parent_window_(new nux::BaseWindow("TestPreviewApplication"))
69 {
70 glib::Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_application_preview_new()));
71
72 GHashTable* action_hints1(g_hash_table_new(g_direct_hash, g_direct_equal));
73 g_hash_table_insert (action_hints1, g_strdup ("extra-text"), g_variant_new_string("Ā£30.99"));
74
75 unity_protocol_application_preview_set_app_icon(UNITY_PROTOCOL_APPLICATION_PREVIEW(proto_obj.RawPtr()), g_icon_new_for_string(TESTDATADIR "/bfb.png", NULL));
76 unity_protocol_application_preview_set_license(UNITY_PROTOCOL_APPLICATION_PREVIEW(proto_obj.RawPtr()), "License & special char");
77 unity_protocol_application_preview_set_copyright(UNITY_PROTOCOL_APPLICATION_PREVIEW(proto_obj.RawPtr()), "Copywrite & special char");
78 unity_protocol_application_preview_set_last_update(UNITY_PROTOCOL_APPLICATION_PREVIEW(proto_obj.RawPtr()), "11th Apr 2012");
79 unity_protocol_application_preview_set_rating(UNITY_PROTOCOL_APPLICATION_PREVIEW(proto_obj.RawPtr()), 0.8);
80 unity_protocol_application_preview_set_num_ratings(UNITY_PROTOCOL_APPLICATION_PREVIEW(proto_obj.RawPtr()), 12);
81
82 unity_protocol_preview_set_image_source_uri(proto_obj, "http://ia.media-imdb.com/images/M/MV5BMTM3NDM5MzY5Ml5BMl5BanBnXkFtZTcwNjExMDUwOA@@._V1._SY317_.jpg");
83 unity_protocol_preview_set_title(proto_obj, "Application Title & special char");
84 unity_protocol_preview_set_subtitle(proto_obj, "Application Subtitle > special char");
85 unity_protocol_preview_set_description(proto_obj, "Application Desctiption &lt; special char");
86 unity_protocol_preview_add_action(proto_obj, "action1", "Action 1", NULL, 0);
87 unity_protocol_preview_add_action_with_hints(proto_obj, "action2", "Action 2", NULL, 0, action_hints1);
88 unity_protocol_preview_add_info_hint(proto_obj, "hint1", "Hint 1", NULL, g_variant_new("s", "string hint 1"));
89 unity_protocol_preview_add_info_hint(proto_obj, "hint2", "Hint 2", NULL, g_variant_new("s", "string hint 2"));
90 unity_protocol_preview_add_info_hint(proto_obj, "hint3", "Hint 3", NULL, g_variant_new("i", 12));
91
92 glib::Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), glib::StealRef());
93 preview_model_ = dash::Preview::PreviewForVariant(v);
94
95 g_hash_table_unref(action_hints1);
96 }
97
98 nux::ObjectPtr<nux::BaseWindow> parent_window_;
99 dash::Preview::Ptr preview_model_;
100
101 previews::Style previews_style;
102 dash::Style dash_style;
103 ThumbnailGenerator thumbnail_generator;
104};
105
106TEST_F(TestPreviewApplication, TestCreate)
107{
108 previews::Preview::Ptr preview_view = previews::Preview::PreviewForModel(preview_model_);
109
110 EXPECT_TRUE(dynamic_cast<previews::ApplicationPreview*>(preview_view.GetPointer()) != NULL);
111}
112
113TEST_F(TestPreviewApplication, TestUIValues)
114{
115 MockApplicationPreview::Ptr preview_view(new MockApplicationPreview(preview_model_));
116
117 EXPECT_EQ(preview_view->title_->GetText(), "Application Title &amp; special char");
118 EXPECT_EQ(preview_view->subtitle_->GetText(), "Application Subtitle &gt; special char");
119 EXPECT_EQ(preview_view->description_->GetText(), "Application Desctiption &lt; special char");
120
121 EXPECT_EQ(preview_view->action_buttons_.size(), 2u);
122
123 if (preview_view->action_buttons_.size() >= 2)
124 {
125 auto iter = preview_view->action_buttons_.begin();
126 if ((*iter)->Type().IsDerivedFromType(ActionButton::StaticObjectType))
127 {
128 ActionButton *action = static_cast<ActionButton*>(*iter);
129 EXPECT_EQ(action->GetLabel(), "Action 1");
130 EXPECT_EQ(action->GetExtraText(), "");
131 }
132 iter++;
133 if ((*iter)->Type().IsDerivedFromType(ActionButton::StaticObjectType))
134 {
135 ActionButton *action = static_cast<ActionButton*>(*iter);
136 EXPECT_EQ(action->GetLabel(), "Action 2");
137 EXPECT_EQ(action->GetExtraText(), "Ā£30.99");
138 }
139 }
140}
141
142}
diff --git a/tests/test_previews_generic.cpp b/tests/test_previews_generic.cpp
143deleted file mode 1006440deleted file mode 100644
index c10c99e..0000000
--- a/tests/test_previews_generic.cpp
+++ /dev/null
@@ -1,129 +0,0 @@
1// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
2/*
3 * Copyright (C) 2012 Canonical Ltd
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Authored by: Nick Dedekind <nick.dedekinc@canonical.com>
18 */
19
20#include <list>
21#include <gmock/gmock.h>
22using namespace testing;
23
24#include <Nux/Nux.h>
25#include <Nux/BaseWindow.h>
26#include <unity-shared/StaticCairoText.h>
27#include <unity-shared/DashStyle.h>
28#include <unity-shared/PreviewStyle.h>
29#include <unity-shared/ThumbnailGenerator.h>
30
31#include <unity-protocol.h>
32#include "UnityCore/GenericPreview.h"
33#include "dash/previews/GenericPreview.h"
34#include "dash/previews/ActionButton.h"
35#include "test_utils.h"
36using namespace unity;
37using namespace unity::dash;
38
39namespace
40{
41
42class MockGenericPreview : public previews::GenericPreview
43{
44public:
45 typedef nux::ObjectPtr<MockGenericPreview> Ptr;
46
47 MockGenericPreview(dash::Preview::Ptr preview_model)
48 : GenericPreview(preview_model)
49 {}
50
51 using GenericPreview::title_;
52 using GenericPreview::subtitle_;
53 using GenericPreview::description_;
54 using GenericPreview::action_buttons_;
55 using GenericPreview::preview_info_hints_;
56};
57
58class TestPreviewGeneric : public Test
59{
60public:
61 TestPreviewGeneric()
62 : parent_window_(new nux::BaseWindow("TestPreviewGeneric"))
63 {
64 glib::Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_generic_preview_new()));
65
66 GHashTable* action_hints1(g_hash_table_new(g_direct_hash, g_direct_equal));
67 g_hash_table_insert (action_hints1, g_strdup ("extra-text"), g_variant_new_string("2.00"));
68
69 unity_protocol_preview_set_image_source_uri(proto_obj, "http://ia.media-imdb.com/images/M/MV5BMTM3NDM5MzY5Ml5BMl5BanBnXkFtZTcwNjExMDUwOA@@._V1._SY317_.jpg");
70 unity_protocol_preview_set_title(proto_obj, "Generic Title & special char");
71 unity_protocol_preview_set_subtitle(proto_obj, "Generic Subtitle > special char");
72 unity_protocol_preview_set_description(proto_obj, "Generic Desctiption &lt; special char");
73 unity_protocol_preview_add_action(proto_obj, "action1", "Action 1", NULL, 0);
74 unity_protocol_preview_add_action_with_hints(proto_obj, "action2", "Action 2", NULL, 0, action_hints1);
75 unity_protocol_preview_add_info_hint(proto_obj, "hint1", "Hint 1", NULL, g_variant_new("s", "string hint 1"));
76 unity_protocol_preview_add_info_hint(proto_obj, "hint2", "Hint 2", NULL, g_variant_new("s", "string hint 2"));
77 unity_protocol_preview_add_info_hint(proto_obj, "hint3", "Hint 3", NULL, g_variant_new("i", 12));
78
79 glib::Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), glib::StealRef());
80 preview_model_ = dash::Preview::PreviewForVariant(v);
81
82 g_hash_table_unref(action_hints1);
83 }
84
85 nux::ObjectPtr<nux::BaseWindow> parent_window_;
86 dash::Preview::Ptr preview_model_;
87
88 previews::Style panel_style;
89 dash::Style dash_style;
90 ThumbnailGenerator thumbnail_generator;
91};
92
93TEST_F(TestPreviewGeneric, TestCreate)
94{
95 previews::Preview::Ptr preview_view = previews::Preview::PreviewForModel(preview_model_);
96
97 EXPECT_TRUE(dynamic_cast<previews::GenericPreview*>(preview_view.GetPointer()) != NULL);
98}
99
100TEST_F(TestPreviewGeneric, TestUIValues)
101{
102 MockGenericPreview::Ptr preview_view(new MockGenericPreview(preview_model_));
103
104 EXPECT_EQ(preview_view->title_->GetText(), "Generic Title &amp; special char");
105 EXPECT_EQ(preview_view->subtitle_->GetText(), "Generic Subtitle &gt; special char");
106 EXPECT_EQ(preview_view->description_->GetText(), "Generic Desctiption &lt; special char");
107
108 EXPECT_EQ(preview_view->action_buttons_.size(), 2u);
109
110 if (preview_view->action_buttons_.size() >= 2)
111 {
112 auto iter = preview_view->action_buttons_.begin();
113 if ((*iter)->Type().IsDerivedFromType(ActionButton::StaticObjectType))
114 {
115 ActionButton *action = static_cast<ActionButton*>(*iter);
116 EXPECT_EQ(action->GetLabel(), "Action 1");
117 EXPECT_EQ(action->GetExtraText(), "");
118 }
119 iter++;
120 if ((*iter)->Type().IsDerivedFromType(ActionButton::StaticObjectType))
121 {
122 ActionButton *action = static_cast<ActionButton*>(*iter);
123 EXPECT_EQ(action->GetLabel(), "Action 2");
124 EXPECT_EQ(action->GetExtraText(), "2.00");
125 }
126 }
127}
128
129}
diff --git a/tests/test_previews_movie.cpp b/tests/test_previews_movie.cpp
130deleted file mode 1006440deleted file mode 100644
index ac3b7e1..0000000
--- a/tests/test_previews_movie.cpp
+++ /dev/null
@@ -1,149 +0,0 @@
1// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
2/*
3 * Copyright (C) 2012 Canonical Ltd
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Authored by: Nick Dedekind <nick.dedekinc@canonical.com>
18 */
19
20#include <list>
21#include <gmock/gmock.h>
22using namespace testing;
23
24#include <Nux/Nux.h>
25#include <Nux/BaseWindow.h>
26#include <unity-shared/StaticCairoText.h>
27#include <unity-shared/DashStyle.h>
28#include <unity-shared/PreviewStyle.h>
29#include <unity-shared/ThumbnailGenerator.h>
30
31#include <unity-protocol.h>
32#include "UnityCore/MoviePreview.h"
33#include "dash/previews/MoviePreview.h"
34#include "dash/previews/PreviewInfoHintWidget.h"
35#include "dash/previews/PreviewRatingsWidget.h"
36#include "dash/previews/ActionButton.h"
37#include "test_utils.h"
38using namespace unity;
39using namespace unity::dash;
40
41namespace
42{
43
44class MockMoviePreview : public previews::MoviePreview
45{
46public:
47 typedef nux::ObjectPtr<MockMoviePreview> Ptr;
48
49 MockMoviePreview(dash::Preview::Ptr preview_model)
50 : MoviePreview(preview_model)
51 {}
52
53 using MoviePreview::title_;
54 using MoviePreview::subtitle_;
55 using MoviePreview::description_;
56 using MoviePreview::action_buttons_;
57 using MoviePreview::preview_info_hints_;
58 using MoviePreview::rating_;
59};
60
61class TestPreviewMovie : public Test
62{
63public:
64 TestPreviewMovie()
65 : parent_window_(new nux::BaseWindow("TestPreviewMovie")) {}
66
67 void create_preview_model(double rating)
68 {
69 glib::Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_movie_preview_new()));
70
71 GHashTable* action_hints1(g_hash_table_new(g_direct_hash, g_direct_equal));
72 g_hash_table_insert (action_hints1, g_strdup ("extra-text"), g_variant_new_string("Ā£1.00"));
73
74 unity_protocol_movie_preview_set_rating(UNITY_PROTOCOL_MOVIE_PREVIEW(proto_obj.RawPtr()), rating);
75 unity_protocol_movie_preview_set_num_ratings(UNITY_PROTOCOL_MOVIE_PREVIEW(proto_obj.RawPtr()), 12);
76
77 unity_protocol_preview_set_image_source_uri(proto_obj, "http://ia.media-imdb.com/images/M/MV5BMTM3NDM5MzY5Ml5BMl5BanBnXkFtZTcwNjExMDUwOA@@._V1._SY317_.jpg");
78 unity_protocol_preview_set_title(proto_obj, "Movie Title & special char");
79 unity_protocol_preview_set_subtitle(proto_obj, "Movie Subtitle > special char");
80 unity_protocol_preview_set_description(proto_obj, "Movie Desctiption &lt; special char");
81 unity_protocol_preview_add_action(proto_obj, "action1", "Action 1", NULL, 0);
82 unity_protocol_preview_add_action_with_hints(proto_obj, "action2", "Action 2", NULL, 0, action_hints1);
83 unity_protocol_preview_add_info_hint(proto_obj, "hint1", "Hint 1", NULL, g_variant_new("s", "string hint 1"));
84 unity_protocol_preview_add_info_hint(proto_obj, "hint2", "Hint 2", NULL, g_variant_new("s", "string hint 2"));
85 unity_protocol_preview_add_info_hint(proto_obj, "hint3", "Hint 3", NULL, g_variant_new("i", 12));
86
87 glib::Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), glib::StealRef());
88 preview_model_ = dash::Preview::PreviewForVariant(v);
89
90 g_hash_table_unref(action_hints1);
91 }
92
93 nux::ObjectPtr<nux::BaseWindow> parent_window_;
94 dash::Preview::Ptr preview_model_;
95
96 previews::Style panel_style;
97 dash::Style dash_style;
98 ThumbnailGenerator thumbnail_generator;
99};
100
101TEST_F(TestPreviewMovie, TestCreate)
102{
103 create_preview_model(0.8);
104 previews::Preview::Ptr preview_view = previews::Preview::PreviewForModel(preview_model_);
105
106 EXPECT_TRUE(dynamic_cast<previews::MoviePreview*>(preview_view.GetPointer()) != NULL);
107}
108
109TEST_F(TestPreviewMovie, TestUIValues)
110{
111 create_preview_model(0.8);
112 MockMoviePreview::Ptr preview_view(new MockMoviePreview(preview_model_));
113
114 EXPECT_EQ(preview_view->title_->GetText(), "Movie Title &amp; special char");
115 EXPECT_EQ(preview_view->subtitle_->GetText(), "Movie Subtitle &gt; special char");
116 EXPECT_EQ(preview_view->description_->GetText(), "Movie Desctiption &lt; special char");
117
118 EXPECT_EQ(preview_view->rating_->GetRating(), 0.8f);
119 EXPECT_EQ(preview_view->action_buttons_.size(), 2u);
120
121 if (preview_view->action_buttons_.size() >= 2)
122 {
123 auto iter = preview_view->action_buttons_.begin();
124 if ((*iter)->Type().IsDerivedFromType(ActionButton::StaticObjectType))
125 {
126 ActionButton *action = static_cast<ActionButton*>(*iter);
127 EXPECT_EQ(action->GetLabel(), "Action 1");
128 EXPECT_EQ(action->GetExtraText(), "");
129 }
130 iter++;
131 if ((*iter)->Type().IsDerivedFromType(ActionButton::StaticObjectType))
132 {
133 ActionButton *action = static_cast<ActionButton*>(*iter);
134 EXPECT_EQ(action->GetLabel(), "Action 2");
135 EXPECT_EQ(action->GetExtraText(), "Ā£1.00");
136 }
137 }
138}
139
140TEST_F(TestPreviewMovie, TestHideRatings)
141{
142 create_preview_model(-1);
143 MockMoviePreview::Ptr preview_view(new MockMoviePreview(preview_model_));
144
145 EXPECT_EQ(preview_view->rating_, NULL);
146}
147
148
149}
diff --git a/tests/test_previews_music.cpp b/tests/test_previews_music.cpp
150deleted file mode 1006440deleted file mode 100644
index 4398ec2..0000000
--- a/tests/test_previews_music.cpp
+++ /dev/null
@@ -1,131 +0,0 @@
1// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
2/*
3 * Copyright (C) 2012 Canonical Ltd
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Authored by: Nick Dedekind <nick.dedekinc@canonical.com>
18 */
19
20#include <list>
21#include <gmock/gmock.h>
22using namespace testing;
23
24#include <Nux/Nux.h>
25#include <Nux/BaseWindow.h>
26#include <unity-shared/StaticCairoText.h>
27#include <unity-shared/DashStyle.h>
28#include <unity-shared/PreviewStyle.h>
29#include <unity-shared/ThumbnailGenerator.h>
30
31#include <unity-protocol.h>
32#include "UnityCore/MusicPreview.h"
33#include "dash/previews/MusicPreview.h"
34#include "dash/previews/PreviewInfoHintWidget.h"
35#include "dash/previews/PreviewRatingsWidget.h"
36#include "dash/previews/ActionButton.h"
37#include "test_utils.h"
38using namespace unity;
39using namespace unity::dash;
40
41namespace
42{
43
44class MockMusicPreview : public previews::MusicPreview
45{
46public:
47 typedef nux::ObjectPtr<MockMusicPreview> Ptr;
48
49 MockMusicPreview(dash::Preview::Ptr preview_model)
50 : MusicPreview(preview_model)
51 {}
52
53 using MusicPreview::title_;
54 using MusicPreview::subtitle_;
55 using MusicPreview::action_buttons_;
56 using MusicPreview::preview_info_hints_;
57};
58
59class TestPreviewMusic : public Test
60{
61public:
62 TestPreviewMusic()
63 : parent_window_(new nux::BaseWindow("TestPreviewMusic"))
64 {
65 glib::Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_music_preview_new()));
66
67 GHashTable* action_hints1(g_hash_table_new(g_direct_hash, g_direct_equal));
68 g_hash_table_insert (action_hints1, g_strdup ("extra-text"), g_variant_new_string("Ā£3.99"));
69
70 unity_protocol_preview_set_image_source_uri(proto_obj, "http://ia.media-imdb.com/images/M/MV5BMTM3NDM5MzY5Ml5BMl5BanBnXkFtZTcwNjExMDUwOA@@._V1._SY317_.jpg");
71 unity_protocol_preview_set_title(proto_obj, "Music Title & special char");
72 unity_protocol_preview_set_subtitle(proto_obj, "Music Subtitle > special char");
73 unity_protocol_preview_set_description(proto_obj, "Music Desctiption &lt; special char");
74 unity_protocol_preview_add_action(proto_obj, "action1", "Action 1", NULL, 0);
75 unity_protocol_preview_add_action_with_hints(proto_obj, "action2", "Action 2", NULL, 0, action_hints1);
76 unity_protocol_preview_add_action(proto_obj, "action3", "Action 3", NULL, 0);
77 unity_protocol_preview_add_action(proto_obj, "action4", "Action 4", NULL, 0);
78 unity_protocol_preview_add_info_hint(proto_obj, "hint1", "Hint 1", NULL, g_variant_new("s", "string hint 1"));
79 unity_protocol_preview_add_info_hint(proto_obj, "hint2", "Hint 2", NULL, g_variant_new("s", "string hint 2"));
80 unity_protocol_preview_add_info_hint(proto_obj, "hint3", "Hint 3", NULL, g_variant_new("i", 12));
81
82 glib::Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), glib::StealRef());
83 preview_model_ = dash::Preview::PreviewForVariant(v);
84
85 g_hash_table_unref(action_hints1);
86 }
87
88 nux::ObjectPtr<nux::BaseWindow> parent_window_;
89 dash::Preview::Ptr preview_model_;
90
91 previews::Style panel_style;
92 dash::Style dash_style;
93 ThumbnailGenerator thumbnail_generator;
94};
95
96TEST_F(TestPreviewMusic, TestCreate)
97{
98 previews::Preview::Ptr preview_view = previews::Preview::PreviewForModel(preview_model_);
99
100 EXPECT_TRUE(dynamic_cast<previews::MusicPreview*>(preview_view.GetPointer()) != NULL);
101}
102
103TEST_F(TestPreviewMusic, TestUIValues)
104{
105 MockMusicPreview::Ptr preview_view(new MockMusicPreview(preview_model_));
106
107 EXPECT_EQ(preview_view->title_->GetText(), "Music Title &amp; special char");
108 EXPECT_EQ(preview_view->subtitle_->GetText(), "Music Subtitle &gt; special char");
109
110 EXPECT_EQ(preview_view->action_buttons_.size(), 4u);
111
112 if (preview_view->action_buttons_.size() >= 2)
113 {
114 auto iter = preview_view->action_buttons_.begin();
115 if ((*iter)->Type().IsDerivedFromType(ActionButton::StaticObjectType))
116 {
117 ActionButton *action = static_cast<ActionButton*>(*iter);
118 EXPECT_EQ(action->GetLabel(), "Action 1");
119 EXPECT_EQ(action->GetExtraText(), "");
120 }
121 iter++;
122 if ((*iter)->Type().IsDerivedFromType(ActionButton::StaticObjectType))
123 {
124 ActionButton *action = static_cast<ActionButton*>(*iter);
125 EXPECT_EQ(action->GetLabel(), "Action 2");
126 EXPECT_EQ(action->GetExtraText(), "Ā£3.99");
127 }
128 }
129}
130
131}
diff --git a/tests/test_previews_music_payment.cpp b/tests/test_previews_music_payment.cpp
132deleted file mode 1006440deleted file mode 100644
index daa6a3b..0000000
--- a/tests/test_previews_music_payment.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
1// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
2/*
3 * Copyright (C) 2012-2013 Canonical Ltd
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Authored by: Manuel de la Pena <manuel.delapena@canonical.com>
18 */
19
20#include <list>
21#include <gmock/gmock.h>
22
23#include <Nux/Nux.h>
24#include <Nux/VLayout.h>
25#include <Nux/BaseWindow.h>
26#include <unity-shared/StaticCairoText.h>
27#include <unity-shared/CoverArt.h>
28#include <unity-shared/DashStyle.h>
29#include <unity-shared/PreviewStyle.h>
30#include <unity-shared/ThumbnailGenerator.h>
31
32#include <unity-protocol.h>
33#include "dash/previews/MusicPaymentPreview.h"
34#include "test_utils.h"
35
36using namespace testing;
37
38namespace unity
39{
40
41namespace dash
42{
43
44namespace previews
45{
46
47class MockedMusicPaymentPreview : public MusicPaymentPreview
48{
49public:
50 typedef nux::ObjectPtr<MockedMusicPaymentPreview> Ptr;
51
52 MockedMusicPaymentPreview(dash::Preview::Ptr preview_model)
53 : MusicPaymentPreview(preview_model)
54 {}
55
56 using MusicPaymentPreview::image_;
57 using MusicPaymentPreview::intro_;
58 using MusicPaymentPreview::title_;
59 using MusicPaymentPreview::subtitle_;
60 using MusicPaymentPreview::email_label_;
61 using MusicPaymentPreview::email_;
62 using MusicPaymentPreview::payment_label_;
63 using MusicPaymentPreview::payment_;
64 using MusicPaymentPreview::password_label_;
65 using MusicPaymentPreview::password_entry_;
66 using MusicPaymentPreview::purchase_hint_;
67 using MusicPaymentPreview::purchase_prize_;
68 using MusicPaymentPreview::purchase_type_;
69 using MusicPaymentPreview::change_payment_;
70 using MusicPaymentPreview::forgotten_password_;
71 using MusicPaymentPreview::error_label_;
72 using MusicPaymentPreview::form_layout_;
73 using MusicPaymentPreview::SetupViews;
74};
75
76class TestMusicPaymentPreview : public ::testing::Test
77{
78 protected:
79 TestMusicPaymentPreview() :
80 Test(),
81 parent_window_(new nux::BaseWindow("TestPreviewMusicPayment"))
82 {
83 title = "Turning Japanese";
84 subtitle = "The vapors";
85 header = "Hi test, you purchased in the past from Ubuntu One.";
86 email = "test@canonical.com";
87 payment_method = "*** *** ** 12";
88 purchase_prize = "65$";
89 purchase_type = "Mp3";
90 preview_type = UNITY_PROTOCOL_PREVIEW_PAYMENT_TYPE_MUSIC;
91
92 glib::Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_payment_preview_new()));
93
94 unity_protocol_preview_set_title(proto_obj, title.c_str());
95 unity_protocol_preview_set_subtitle(proto_obj, subtitle.c_str());
96 unity_protocol_preview_add_action(proto_obj, "change_payment_method", "Change payment", NULL, 0);
97 unity_protocol_preview_add_action(proto_obj, "forgot_password", "Forgot password", NULL, 0);
98 unity_protocol_preview_add_action(proto_obj, "cancel_purchase", "Cancel", NULL, 0);
99 unity_protocol_preview_add_action(proto_obj, "purchase_album", "Purchase", NULL, 0);
100
101
102 unity_protocol_payment_preview_set_header(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), header.c_str());
103 unity_protocol_payment_preview_set_email(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), email.c_str());
104 unity_protocol_payment_preview_set_payment_method(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), payment_method.c_str());
105 unity_protocol_payment_preview_set_purchase_prize(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), purchase_prize.c_str());
106 unity_protocol_payment_preview_set_purchase_type(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), purchase_type.c_str());
107 unity_protocol_payment_preview_set_preview_type(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), preview_type);
108
109 glib::Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), glib::StealRef());
110
111 preview_model = dash::Preview::PreviewForVariant(v);
112 }
113
114 nux::ObjectPtr<nux::BaseWindow> parent_window_;
115 dash::Preview::Ptr preview_model;
116
117 // testing data
118 std::string title;
119 std::string subtitle;
120 std::string header;
121 std::string email;
122 std::string payment_method;
123 std::string purchase_prize;
124 std::string purchase_type;
125 UnityProtocolPreviewPaymentType preview_type;
126
127 // needed for styles
128 previews::Style previews_style;
129 dash::Style dash_style;
130};
131
132TEST_F(TestMusicPaymentPreview, TestContentLoading)
133{
134 MockedMusicPaymentPreview::Ptr preview_view(new MockedMusicPaymentPreview(preview_model));
135
136 EXPECT_EQ(preview_view->title_->GetText(), title);
137 EXPECT_EQ(preview_view->subtitle_->GetText(), subtitle);
138 EXPECT_EQ(preview_view->intro_->GetText(), header);
139 EXPECT_EQ(preview_view->email_->GetText(), email);
140 EXPECT_EQ(preview_view->payment_->GetText(), payment_method);
141 EXPECT_EQ(preview_view->purchase_type_->GetText(), purchase_type);
142 EXPECT_EQ(preview_view->purchase_prize_->GetText(), purchase_prize);
143}
144
145
146} // previews
147
148} // dash
149
150} // unity
diff --git a/tests/test_previews_payment.cpp b/tests/test_previews_payment.cpp
151deleted file mode 1006440deleted file mode 100644
index 53f5417..0000000
--- a/tests/test_previews_payment.cpp
+++ /dev/null
@@ -1,184 +0,0 @@
1// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
2/*
3 * Copyright (C) 2012-2013 Canonical Ltd
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Authored by: Manuel de la Pena <manuel.delapena@canonical.com>
18 */
19#include <list>
20#include <gmock/gmock.h>
21
22#include <Nux/Nux.h>
23#include <Nux/Layout.h>
24#include <Nux/VLayout.h>
25#include <Nux/BaseWindow.h>
26#include <unity-shared/StaticCairoText.h>
27#include <unity-shared/DashStyle.h>
28#include <unity-shared/PreviewStyle.h>
29#include <unity-shared/ThumbnailGenerator.h>
30#include <unity-shared/CoverArt.h>
31
32#include <unity-protocol.h>
33#include "dash/previews/PaymentPreview.h"
34#include "dash/previews/ActionButton.h"
35#include "dash/previews/ActionLink.h"
36#include "test_utils.h"
37
38using namespace testing;
39using ::testing::Return;
40
41namespace unity
42{
43
44namespace dash
45{
46
47namespace previews
48{
49
50class NonAbstractPreview : public PaymentPreview
51{
52public:
53 NonAbstractPreview(dash::Preview::Ptr preview_model)
54 : PaymentPreview(preview_model)
55 {}
56
57 virtual nux::Layout* GetTitle()
58 {
59 return new nux::VLayout();
60 }
61
62 virtual nux::Layout* GetPrice()
63 {
64 return new nux::VLayout();
65 }
66
67 virtual nux::Layout* GetBody()
68 {
69 return new nux::VLayout();
70 }
71
72 virtual nux::Layout* GetFooter()
73 {
74 return new nux::VLayout();
75 }
76
77 virtual void OnActionActivated(ActionButton* button, std::string const& id)
78 {
79 // do nothing
80 }
81
82 virtual void OnActionLinkActivated(ActionLink* link, std::string const& id)
83 {
84 // do nothing
85 }
86
87 virtual void PreLayoutManagement()
88 {
89 // do nothing
90 }
91
92 virtual void LoadActions()
93 {
94 // do nothing
95 }
96
97 using PaymentPreview::GetHeader;
98 using PaymentPreview::full_data_layout_;
99 using PaymentPreview::content_data_layout_;
100 using PaymentPreview::overlay_layout_;
101 using PaymentPreview::header_layout_;
102 using PaymentPreview::body_layout_;
103 using PaymentPreview::footer_layout_;
104 using PaymentPreview::SetupViews;
105
106};
107
108class MockedPaymentPreview : public NonAbstractPreview
109{
110public:
111 typedef nux::ObjectPtr<MockedPaymentPreview> Ptr;
112
113 MockedPaymentPreview(dash::Preview::Ptr preview_model)
114 : NonAbstractPreview(preview_model)
115 {}
116
117 // Mock methods that should be implemented so that we can assert that they are
118 // called in the correct moments.
119 MOCK_METHOD0(GetTitle, nux::Layout*());
120 MOCK_METHOD0(GetPrice, nux::Layout*());
121 MOCK_METHOD0(GetBody, nux::Layout*());
122 MOCK_METHOD0(GetFooter, nux::Layout*());
123 MOCK_METHOD2(OnActionActivated, void(unity::dash::ActionButton*, std::string));
124 MOCK_METHOD2(OnActionLinkActivated, void(unity::dash::ActionLink*, std::string));
125 MOCK_METHOD0(PreLayoutManagement, void());
126 MOCK_METHOD0(LoadActions, void());
127
128};
129
130class TestPaymentPreview : public ::testing::Test
131{
132 protected:
133 TestPaymentPreview() : Test()
134 {
135 glib::Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_payment_preview_new()));
136 // we are not testing how the info is really used is more asserting the method calls, we do not add any data then
137 glib::Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), glib::StealRef());
138
139 preview_model = dash::Preview::PreviewForVariant(v);
140
141 preview = new MockedPaymentPreview(preview_model);
142
143 }
144 nux::ObjectPtr<MockedPaymentPreview> preview;
145 dash::Preview::Ptr preview_model;
146
147 // needed for styles
148 previews::Style previews_style;
149 dash::Style dash_style;
150};
151
152TEST_F(TestPaymentPreview, GetHeaderCallsCorrectMethods)
153{
154 ON_CALL(*preview.GetPointer(), GetTitle()).WillByDefault(Return(new nux::VLayout()));
155 EXPECT_CALL(*preview.GetPointer(), GetTitle()).Times(1);
156
157 ON_CALL(*preview.GetPointer(), GetPrice()).WillByDefault(Return(new nux::VLayout()));
158 EXPECT_CALL(*preview.GetPointer(), GetPrice()).Times(1);
159
160 preview->GetHeader()->UnReference();
161}
162
163TEST_F(TestPaymentPreview, SetupViewsCallCorrectMethods)
164{
165 ON_CALL(*preview.GetPointer(), GetTitle()).WillByDefault(Return(new nux::VLayout()));
166 EXPECT_CALL(*preview.GetPointer(), GetTitle()).Times(1);
167
168 ON_CALL(*preview.GetPointer(), GetPrice()).WillByDefault(Return(new nux::VLayout()));
169 EXPECT_CALL(*preview.GetPointer(), GetPrice()).Times(1);
170
171 ON_CALL(*preview.GetPointer(), GetBody()).WillByDefault(Return(new nux::VLayout()));
172 EXPECT_CALL(*preview.GetPointer(), GetBody()).Times(1);
173
174 ON_CALL(*preview.GetPointer(), GetFooter()).WillByDefault(Return(new nux::VLayout()));
175 EXPECT_CALL(*preview.GetPointer(), GetFooter()).Times(1);
176
177 preview->SetupViews();
178}
179
180} // previews
181
182} // dash
183
184} // unity
diff --git a/tests/test_previews_social.cpp b/tests/test_previews_social.cpp
185deleted file mode 1006440deleted file mode 100644
index 76b42e0..0000000
--- a/tests/test_previews_social.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
1// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
2/*
3 * Copyright (C) 2012 Canonical Ltd
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Authored by: Ken VanDine <ken.vandine@canonical.com>
18 */
19
20#include <list>
21#include <gmock/gmock.h>
22using namespace testing;
23
24#include <Nux/Nux.h>
25#include <Nux/BaseWindow.h>
26#include <unity-shared/StaticCairoText.h>
27#include <unity-shared/DashStyle.h>
28#include <unity-shared/PreviewStyle.h>
29#include <unity-shared/ThumbnailGenerator.h>
30
31#include <unity-protocol.h>
32#include "UnityCore/SocialPreview.h"
33#include "dash/previews/SocialPreview.h"
34#include "dash/previews/SocialPreviewContent.h"
35#include "dash/previews/SocialPreviewComments.h"
36#include "dash/previews/PreviewInfoHintWidget.h"
37#include "dash/previews/PreviewRatingsWidget.h"
38#include "test_utils.h"
39using namespace unity;
40using namespace unity::dash;
41
42namespace
43{
44
45class MockSocialPreview : public previews::SocialPreview
46{
47public:
48 typedef nux::ObjectPtr<MockSocialPreview> Ptr;
49
50 MockSocialPreview(dash::Preview::Ptr preview_model)
51 : SocialPreview(preview_model)
52 {}
53
54 using SocialPreview::title_;
55 using SocialPreview::subtitle_;
56 using SocialPreview::content_;
57 using SocialPreview::action_buttons_;
58 using SocialPreview::preview_info_hints_;
59};
60
61class TestPreviewSocial : public Test
62{
63public:
64 TestPreviewSocial()
65 : parent_window_(new nux::BaseWindow("TestPreviewSocial"))
66 {
67 glib::Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_social_preview_new()));
68
69 unity_protocol_preview_set_image_source_uri(proto_obj, "http://ia.media-imdb.com/images/M/MV5BMTM3NDM5MzY5Ml5BMl5BanBnXkFtZTcwNjExMDUwOA@@._V1._SY317_.jpg");
70 unity_protocol_preview_set_title(proto_obj, "Social Title & special char");
71 unity_protocol_preview_set_subtitle(proto_obj, "Social Subtitle > special char");
72 unity_protocol_preview_set_description(proto_obj, "Social Desctiption &lt; special char");
73 unity_protocol_preview_add_action(proto_obj, "action1", "Action 1", NULL, 0);
74 unity_protocol_preview_add_action(proto_obj, "action2", "Action 2", NULL, 0);
75 unity_protocol_preview_add_info_hint(proto_obj, "hint1", "Hint 1", NULL, g_variant_new("s", "string hint 1"));
76 unity_protocol_preview_add_info_hint(proto_obj, "hint2", "Hint 2", NULL, g_variant_new("s", "string hint 2"));
77 unity_protocol_preview_add_info_hint(proto_obj, "hint3", "Hint 3", NULL, g_variant_new("i", 12));
78
79 glib::Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), glib::StealRef());
80 preview_model_ = dash::Preview::PreviewForVariant(v);
81 }
82
83 nux::ObjectPtr<nux::BaseWindow> parent_window_;
84 dash::Preview::Ptr preview_model_;
85
86 previews::Style panel_style;
87 dash::Style dash_style;
88 ThumbnailGenerator thumbnail_generator;
89};
90
91TEST_F(TestPreviewSocial, TestCreate)
92{
93 previews::Preview::Ptr preview_view = previews::Preview::PreviewForModel(preview_model_);
94
95 EXPECT_TRUE(dynamic_cast<previews::SocialPreview*>(preview_view.GetPointer()) != NULL);
96}
97
98TEST_F(TestPreviewSocial, TestUIValues)
99{
100 MockSocialPreview::Ptr preview_view(new MockSocialPreview(preview_model_));
101
102 EXPECT_EQ(preview_view->title_->GetText(), "Social Title &amp; special char");
103 EXPECT_EQ(preview_view->subtitle_->GetText(), "Social Subtitle &gt; special char");
104 EXPECT_EQ(preview_view->action_buttons_.size(), 2u);
105}
106
107}
diff --git a/unity-shared/BackgroundEffectHelper.cpp b/unity-shared/BackgroundEffectHelper.cpp
index 507c3ea..274f184 100644
--- a/unity-shared/BackgroundEffectHelper.cpp
+++ b/unity-shared/BackgroundEffectHelper.cpp
@@ -27,7 +27,7 @@ namespace
27DECLARE_LOGGER(logger, "unity.background_effect_helper");27DECLARE_LOGGER(logger, "unity.background_effect_helper");
2828
29const int BLUR_RADIUS = 3;29const int BLUR_RADIUS = 3;
30const float sigma_high = 5.0f;30const float sigma_high = 10.0f;
31const float sigma_med = 3.0f;31const float sigma_med = 3.0f;
32const float sigma_low = 1.0f;32const float sigma_low = 1.0f;
33}33}
diff --git a/unity-shared/CMakeLists.txt b/unity-shared/CMakeLists.txt
index eddc807..673c7dd 100644
--- a/unity-shared/CMakeLists.txt
+++ b/unity-shared/CMakeLists.txt
@@ -30,9 +30,9 @@ set (UNITY_SHARED_SOURCES
30 DesktopApplicationManager.cpp30 DesktopApplicationManager.cpp
31 EMConverter.cpp31 EMConverter.cpp
32 ExpanderView.cpp32 ExpanderView.cpp
33 FileManager.cpp
34 GnomeFileManager.cpp33 GnomeFileManager.cpp
35 FontSettings.cpp34 FontSettings.cpp
35 FileManager.cpp
36 GraphicsUtils.cpp36 GraphicsUtils.cpp
37 IMTextEntry.cpp37 IMTextEntry.cpp
38 IconLoader.cpp38 IconLoader.cpp
diff --git a/unity-shared/DashStyle.cpp b/unity-shared/DashStyle.cpp
index 66ed48c..b0c3eac 100755
--- a/unity-shared/DashStyle.cpp
+++ b/unity-shared/DashStyle.cpp
@@ -374,35 +374,8 @@ Style::Impl::~Impl()
374374
375void Style::Impl::Refresh()375void Style::Impl::Refresh()
376{376{
377 const char* const SAMPLE_MAX_TEXT = "Chromium Web Browser";377 text_width_ = 56;
378378 text_height_ = 12;
379 nux::CairoGraphics util_cg(CAIRO_FORMAT_ARGB32, 1, 1);
380 cairo_t* cr = util_cg.GetInternalContext();
381
382 auto const& font = theme::Settings::Get()->font();
383 PangoFontDescription* desc = ::pango_font_description_from_string(font.c_str());
384 ::pango_font_description_set_weight(desc, PANGO_WEIGHT_NORMAL);
385 ::pango_font_description_set_size(desc, 9 * PANGO_SCALE);
386
387 glib::Object<PangoLayout> layout(::pango_cairo_create_layout(cr));
388 ::pango_layout_set_font_description(layout, desc);
389 ::pango_layout_set_text(layout, SAMPLE_MAX_TEXT, -1);
390
391 PangoContext* cxt = ::pango_layout_get_context(layout);
392
393 GdkScreen* screen = ::gdk_screen_get_default();
394 ::pango_cairo_context_set_font_options(cxt, ::gdk_screen_get_font_options(screen));
395 ::pango_cairo_context_set_resolution(cxt, 96.0 * Settings::Instance().font_scaling());
396 ::pango_layout_context_changed(layout);
397
398 PangoRectangle log_rect;
399 ::pango_layout_get_pixel_extents(layout, NULL, &log_rect);
400 text_width_ = log_rect.width;
401 text_height_ = log_rect.height;
402
403 owner_->changed.emit();
404
405 pango_font_description_free(desc);
406}379}
407380
408void Style::Impl::UpdateFormFactor(FormFactor form_factor)381void Style::Impl::UpdateFormFactor(FormFactor form_factor)
@@ -2186,6 +2159,11 @@ BaseTexturePtr Style::GetDashRightCornerMask(double scale) const
2186 return pimpl->LoadScaledTexture("dash_top_right_corner_mask", scale);2159 return pimpl->LoadScaledTexture("dash_top_right_corner_mask", scale);
2187}2160}
21882161
2162BaseTexturePtr Style::GetEmpty(double scale) const
2163{
2164 return pimpl->LoadScaledTexture("empty", scale);
2165}
2166
2189BaseTexturePtr Style::GetSearchMagnifyIcon(double scale) const2167BaseTexturePtr Style::GetSearchMagnifyIcon(double scale) const
2190{2168{
2191 return pimpl->LoadScaledTexture("search_magnify", scale);2169 return pimpl->LoadScaledTexture("search_magnify", scale);
@@ -2236,33 +2214,33 @@ nux::Color const& Style::GetTextColor() const
22362214
2237RawPixel Style::GetTileGIconSize() const2215RawPixel Style::GetTileGIconSize() const
2238{2216{
2239 return 64;2217 return 48;
2240}2218}
22412219
2242RawPixel Style::GetTileImageSize() const2220RawPixel Style::GetTileImageSize() const
2243{2221{
2244 return 96;2222 return 48;
2245}2223}
22462224
2247RawPixel Style::GetTileWidth() const2225RawPixel Style::GetTileWidth() const
2248{2226{
2249 return std::max(pimpl->text_width_, 150);2227 return std::max(pimpl->text_width_, 106);
2250}2228}
22512229
2252RawPixel Style::GetTileHeight() const2230RawPixel Style::GetTileHeight() const
2253{2231{
2254 return std::max(GetTileImageSize() + (pimpl->text_height_ * 2) + 15,2232 return std::max(GetTileImageSize() + (pimpl->text_height_ * 2) + 15,
2255 GetTileImageSize() + 32); // magic design numbers.2233 GetTileImageSize() + 80); // magic design numbers.
2256}2234}
22572235
2258RawPixel Style::GetTileIconHightlightHeight() const2236RawPixel Style::GetTileIconHightlightHeight() const
2259{2237{
2260 return 106;2238 return 48;
2261}2239}
22622240
2263RawPixel Style::GetTileIconHightlightWidth() const2241RawPixel Style::GetTileIconHightlightWidth() const
2264{2242{
2265 return 106;2243 return 48;
2266}2244}
22672245
2268RawPixel Style::GetHomeTileIconSize() const2246RawPixel Style::GetHomeTileIconSize() const
@@ -2363,7 +2341,7 @@ RawPixel Style::GetHSeparatorSize() const
23632341
2364RawPixel Style::GetFilterBarWidth() const2342RawPixel Style::GetFilterBarWidth() const
2365{2343{
2366 return 300;2344 return 250;
2367}2345}
23682346
2369RawPixel Style::GetFilterBarLeftPadding() const2347RawPixel Style::GetFilterBarLeftPadding() const
@@ -2418,7 +2396,7 @@ RawPixel Style::GetFilterHighlightPadding() const
24182396
2419RawPixel Style::GetSpaceBetweenFilterWidgets() const2397RawPixel Style::GetSpaceBetweenFilterWidgets() const
2420{2398{
2421 return 12;2399 return 6;
2422}2400}
24232401
2424RawPixel Style::GetAllButtonHeight() const2402RawPixel Style::GetAllButtonHeight() const
@@ -2498,12 +2476,12 @@ RawPixel Style::GetPlacesGroupTopSpace() const
24982476
2499RawPixel Style::GetPlacesGroupResultTopPadding() const2477RawPixel Style::GetPlacesGroupResultTopPadding() const
2500{2478{
2501 return 2;2479 return 19;
2502}2480}
25032481
2504RawPixel Style::GetPlacesGroupResultLeftPadding() const2482RawPixel Style::GetPlacesGroupResultLeftPadding() const
2505{2483{
2506 return 25;2484 return 19;
2507}2485}
25082486
2509RawPixel Style::GetCategoryHeaderLeftPadding() const2487RawPixel Style::GetCategoryHeaderLeftPadding() const
diff --git a/unity-shared/DashStyle.h b/unity-shared/DashStyle.h
index f080297..dd127c4 100755
--- a/unity-shared/DashStyle.h
+++ b/unity-shared/DashStyle.h
@@ -178,6 +178,8 @@ public:
178 BaseTexturePtr GetDashLeftTile(double scale) const;178 BaseTexturePtr GetDashLeftTile(double scale) const;
179 BaseTexturePtr GetDashTopTile(double scale) const;179 BaseTexturePtr GetDashTopTile(double scale) const;
180180
181 BaseTexturePtr GetEmpty(double scale) const;
182
181 BaseTexturePtr GetDashCorner(double scale) const;183 BaseTexturePtr GetDashCorner(double scale) const;
182 BaseTexturePtr GetDashCornerMask(double scale) const;184 BaseTexturePtr GetDashCornerMask(double scale) const;
183 BaseTexturePtr GetDashLeftCorner(double scale) const;185 BaseTexturePtr GetDashLeftCorner(double scale) const;
diff --git a/unity-shared/FileManager.cpp b/unity-shared/FileManager.cpp
index c48a466..6fc574e 100644
--- a/unity-shared/FileManager.cpp
+++ b/unity-shared/FileManager.cpp
@@ -24,7 +24,7 @@
24#include "GnomeFileManager.h"24#include "GnomeFileManager.h"
25#include "NemoFileManager.h"25#include "NemoFileManager.h"
2626
27#include <gio/gdesktopappinfo.h>27#include <gio/gio.h>
2828
29namespace unity29namespace unity
30{30{
diff --git a/unity-shared/FileManager.h b/unity-shared/FileManager.h
index bb636d4..6b802c6 100644
--- a/unity-shared/FileManager.h
+++ b/unity-shared/FileManager.h
@@ -61,4 +61,4 @@ private:
6161
62} // namespace unity62} // namespace unity
6363
64#endif64#endif
65\ No newline at end of file65\ No newline at end of file
diff --git a/unity-shared/GnomeFileManager.h b/unity-shared/GnomeFileManager.h
index b9c3dd8..6fa53a6 100644
--- a/unity-shared/GnomeFileManager.h
+++ b/unity-shared/GnomeFileManager.h
@@ -51,4 +51,4 @@ private:
5151
52}52}
5353
54#endif54#endif
55\ No newline at end of file55\ No newline at end of file
diff --git a/unity-shared/NemoFileManager.cpp b/unity-shared/NemoFileManager.cpp
index 81432cf..e8889e6 100644
--- a/unity-shared/NemoFileManager.cpp
+++ b/unity-shared/NemoFileManager.cpp
@@ -19,12 +19,12 @@
1919
20#include "NemoFileManager.h"20#include "NemoFileManager.h"
21#include <NuxCore/Logger.h>21#include <NuxCore/Logger.h>
2222#include <UnityCore/DesktopUtilities.h>
23#include <UnityCore/GLibDBusProxy.h>23#include <UnityCore/GLibDBusProxy.h>
24#include <UnityCore/GLibWrapper.h>24#include <UnityCore/GLibWrapper.h>
25#include <gio/gdesktopappinfo.h>
26#include <gdk/gdk.h>25#include <gdk/gdk.h>
27#include <gio/gio.h>26#include <gio/gio.h>
27#include <gio/gdesktopappinfo.h>
2828
29namespace unity29namespace unity
30{30{
@@ -38,30 +38,48 @@ const std::string FILE_SCHEMA = "file://";
3838
39const std::string NEMO_DESKTOP_ID = "nemo.desktop";39const std::string NEMO_DESKTOP_ID = "nemo.desktop";
40const std::string NEMO_NAME = "org.Nemo";40const std::string NEMO_NAME = "org.Nemo";
41const std::string NEMO_PATH = "/org/Nemo";41const std::string NEMO_FILE_OPS_PATH = "/org/Nemo";
42}42}
4343
44struct NemoFileManager::Impl44struct NemoFileManager::Impl
45{45{
46 Impl(NemoFileManager* parent)46 Impl(NemoFileManager* parent)
47 : parent_(parent)47 : parent_(parent)
48 , app_info_(g_desktop_app_info_new(NEMO_DESKTOP_ID.c_str()))
49 {48 {
50 }49 }
5150
52 glib::DBusProxy::Ptr NemoOperationsProxy() const51 glib::DBusProxy::Ptr NemoOperationsProxy() const
53 {52 {
54 auto flags = static_cast<GDBusProxyFlags>(G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES|G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS);53 auto flags = static_cast<GDBusProxyFlags>(G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES|G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS);
55 return std::make_shared<glib::DBusProxy>(NEMO_NAME, NEMO_PATH,54 return std::make_shared<glib::DBusProxy>(NEMO_NAME, NEMO_FILE_OPS_PATH,
56 "org.Nemo.FileOperations",55 "org.Nemo.FileOperations",
57 G_BUS_TYPE_SESSION, flags);56 G_BUS_TYPE_SESSION, flags);
58 }57 }
5958
60 void Activate(uint64_t timestamp)59 NemoFileManager* parent_;
61 {60};
62 if (!app_info_)61
63 return;62
63FileManager::Ptr NemoFileManager::Get()
64{
65 static FileManager::Ptr instance(new NemoFileManager());
66 return instance;
67}
68
69NemoFileManager::NemoFileManager()
70 : impl_(new Impl(this))
71{}
72
73NemoFileManager::~NemoFileManager()
74{}
6475
76void Activate(uint64_t timestamp)
77{
78 glib::Cancellable cancellable;
79 glib::Object<GAppInfo> app_info(G_APP_INFO (g_desktop_app_info_new(NEMO_DESKTOP_ID.c_str())));
80
81 if (app_info)
82 {
65 GdkDisplay* display = gdk_display_get_default();83 GdkDisplay* display = gdk_display_get_default();
66 glib::Object<GdkAppLaunchContext> context(gdk_display_get_app_launch_context(display));84 glib::Object<GdkAppLaunchContext> context(gdk_display_get_app_launch_context(display));
6785
@@ -69,11 +87,10 @@ struct NemoFileManager::Impl
69 gdk_app_launch_context_set_timestamp(context, timestamp);87 gdk_app_launch_context_set_timestamp(context, timestamp);
7088
71 auto const& gcontext = glib::object_cast<GAppLaunchContext>(context);89 auto const& gcontext = glib::object_cast<GAppLaunchContext>(context);
72 auto proxy = std::make_shared<glib::DBusProxy>(NEMO_NAME, NEMO_PATH,90 auto proxy = std::make_shared<glib::DBusProxy>(NEMO_NAME, NEMO_FILE_OPS_PATH,
73 "org.freedesktop.Application");91 "org.freedesktop.Application");
7492
75 glib::String context_string(g_app_launch_context_get_startup_notify_id(93 glib::String context_string(g_app_launch_context_get_startup_notify_id(gcontext, app_info, nullptr));
76 gcontext, glib::object_cast<GAppInfo>(app_info_), nullptr));
7794
78 if (context_string && g_utf8_validate(context_string, -1, nullptr))95 if (context_string && g_utf8_validate(context_string, -1, nullptr))
79 {96 {
@@ -86,25 +103,8 @@ struct NemoFileManager::Impl
86 proxy->CallBegin("Activate", param, [proxy] (GVariant*, glib::Error const&) {});103 proxy->CallBegin("Activate", param, [proxy] (GVariant*, glib::Error const&) {});
87 }104 }
88 }105 }
89
90 glib::Object<GDesktopAppInfo> app_info_;
91 NemoFileManager* parent_;
92};
93
94
95FileManager::Ptr NemoFileManager::Get()
96{
97 static FileManager::Ptr instance(new NemoFileManager());
98 return instance;
99}106}
100107
101NemoFileManager::NemoFileManager()
102 : impl_(new Impl(this))
103{}
104
105NemoFileManager::~NemoFileManager()
106{}
107
108void NemoFileManager::Open(std::string const& uri, uint64_t timestamp)108void NemoFileManager::Open(std::string const& uri, uint64_t timestamp)
109{109{
110 if (uri.empty())110 if (uri.empty())
@@ -152,7 +152,7 @@ void NemoFileManager::EmptyTrash(uint64_t timestamp, Window parent_xid)
152 auto const& proxy = impl_->NemoOperationsProxy();152 auto const& proxy = impl_->NemoOperationsProxy();
153153
154 // Passing the proxy to the lambda we ensure that it will be destroyed when needed154 // Passing the proxy to the lambda we ensure that it will be destroyed when needed
155 impl_->Activate(timestamp);155 Activate(timestamp);
156 proxy->CallBegin("EmptyTrash", nullptr, [proxy] (GVariant*, glib::Error const&) {});156 proxy->CallBegin("EmptyTrash", nullptr, [proxy] (GVariant*, glib::Error const&) {});
157}157}
158158
@@ -184,7 +184,7 @@ void NemoFileManager::CopyFiles(std::set<std::string> const& uris, std::string c
184 // Passing the proxy to the lambda we ensure that it will be destroyed when needed184 // Passing the proxy to the lambda we ensure that it will be destroyed when needed
185 auto const& proxy = impl_->NemoOperationsProxy();185 auto const& proxy = impl_->NemoOperationsProxy();
186 proxy->CallBegin("CopyURIs", parameters, [proxy] (GVariant*, glib::Error const&) {});186 proxy->CallBegin("CopyURIs", parameters, [proxy] (GVariant*, glib::Error const&) {});
187 impl_->Activate(timestamp);187 Activate(timestamp);
188 }188 }
189}189}
190190
@@ -199,4 +199,4 @@ std::string NemoFileManager::LocationForWindow(ApplicationWindowPtr const& win)
199 return std::string();199 return std::string();
200}200}
201201
202} // namespace unity202} // namespace unity
203\ No newline at end of file203\ No newline at end of file
diff --git a/unity-shared/NemoFileManager.h b/unity-shared/NemoFileManager.h
index aaa4e91..94321a9 100644
--- a/unity-shared/NemoFileManager.h
+++ b/unity-shared/NemoFileManager.h
@@ -47,4 +47,4 @@ private:
47 std::unique_ptr<Impl> impl_;47 std::unique_ptr<Impl> impl_;
48};48};
4949
50} // namespace unity50}
diff --git a/unity-shared/OverlayRenderer.cpp b/unity-shared/OverlayRenderer.cpp
index 475ad5e..e35a3e8 100644
--- a/unity-shared/OverlayRenderer.cpp
+++ b/unity-shared/OverlayRenderer.cpp
@@ -99,6 +99,8 @@ public:
99 nux::ObjectPtr<nux::BaseTexture> right_corner_;99 nux::ObjectPtr<nux::BaseTexture> right_corner_;
100 nux::ObjectPtr<nux::BaseTexture> right_corner_mask_;100 nux::ObjectPtr<nux::BaseTexture> right_corner_mask_;
101101
102 OverlayPosition dash_position = OverlayPosition::LEFT;
103
102 // temporary variable that stores the number of backgrounds we have rendered104 // temporary variable that stores the number of backgrounds we have rendered
103 int bgs;105 int bgs;
104 bool visible;106 bool visible;
@@ -140,20 +142,37 @@ void OverlayRendererImpl::LoadScaledTextures()
140 double scale = parent->scale;142 double scale = parent->scale;
141 auto& style = dash::Style::Instance();143 auto& style = dash::Style::Instance();
142144
143 horizontal_texture_ = style.GetDashHorizontalTile(scale);145 if (parent->owner_type == OverlayOwner::Hud) {
144 horizontal_texture_mask_ = style.GetDashHorizontalTileMask(scale);146 horizontal_texture_ = style.GetDashHorizontalTile(scale);
145 right_texture_ = style.GetDashRightTile(scale);147 horizontal_texture_mask_ = style.GetDashHorizontalTileMask(scale);
146 right_texture_mask_ = style.GetDashRightTileMask(scale);148 right_texture_ = style.GetDashRightTile(scale);
147 top_left_texture_ = style.GetDashTopLeftTile(scale);149 right_texture_mask_ = style.GetDashRightTileMask(scale);
148 left_texture_ = style.GetDashLeftTile(scale);150 top_left_texture_ = style.GetDashTopLeftTile(scale);
149 top_texture_ = style.GetDashTopTile(scale);151 left_texture_ = style.GetDashLeftTile(scale);
150152 top_texture_ = style.GetDashTopTile(scale);
151 corner_ = style.GetDashCorner(scale);153
152 corner_mask_ = style.GetDashCornerMask(scale);154 corner_ = style.GetDashCorner(scale);
153 left_corner_ = style.GetDashLeftCorner(scale);155 corner_mask_ = style.GetDashCornerMask(scale);
154 left_corner_mask_ = style.GetDashLeftCornerMask(scale);156 left_corner_ = style.GetDashLeftCorner(scale);
155 right_corner_ = style.GetDashRightCorner(scale);157 left_corner_mask_ = style.GetDashLeftCornerMask(scale);
156 right_corner_mask_ = style.GetDashRightCornerMask(scale);158 right_corner_ = style.GetDashRightCorner(scale);
159 right_corner_mask_ = style.GetDashRightCornerMask(scale);
160 } else {
161 horizontal_texture_ = style.GetEmpty(scale);
162 horizontal_texture_mask_ = style.GetEmpty(scale);
163 right_texture_ = style.GetEmpty(scale);
164 right_texture_mask_ = style.GetEmpty(scale);
165 top_left_texture_ = style.GetEmpty(scale);
166 left_texture_ = style.GetEmpty(scale);
167 top_texture_ = style.GetEmpty(scale);
168
169 corner_ = style.GetEmpty(scale);
170 corner_mask_ = style.GetEmpty(scale);
171 left_corner_ = style.GetEmpty(scale);
172 left_corner_mask_ = style.GetEmpty(scale);
173 right_corner_ = style.GetEmpty(scale);
174 right_corner_mask_ = style.GetEmpty(scale);
175 }
157}176}
158177
159void OverlayRendererImpl::OnBgColorChanged(nux::Color const& new_color)178void OverlayRendererImpl::OnBgColorChanged(nux::Color const& new_color)
@@ -186,7 +205,7 @@ void OverlayRendererImpl::UpdateTextures()
186 rop.Blend = true;205 rop.Blend = true;
187 rop.SrcBlend = GL_ZERO;206 rop.SrcBlend = GL_ZERO;
188 rop.DstBlend = GL_SRC_COLOR;207 rop.DstBlend = GL_SRC_COLOR;
189 nux::Color darken_colour = nux::Color(0.9f, 0.9f, 0.9f, 1.0f);208 nux::Color darken_colour = nux::Color(1.0f, 1.0f, 1.0f, 1.0f);
190209
191 //When we are in low gfx mode then our darken layer will act as a background.210 //When we are in low gfx mode then our darken layer will act as a background.
192 if (Settings::Instance().low_gfx())211 if (Settings::Instance().low_gfx())
@@ -198,7 +217,7 @@ void OverlayRendererImpl::UpdateTextures()
198 }217 }
199218
200 bg_darken_layer_ = std::make_shared<nux::ColorLayer>(darken_colour, false, rop);219 bg_darken_layer_ = std::make_shared<nux::ColorLayer>(darken_colour, false, rop);
201 bg_shine_texture_ = dash::Style::Instance().GetDashShine()->GetDeviceTexture();220 // bg_shine_texture_ = dash::Style::Instance().GetDashShine()->GetDeviceTexture();
202221
203 auto const& bg_refine_tex = dash::Style::Instance().GetRefineTextureDash();222 auto const& bg_refine_tex = dash::Style::Instance().GetRefineTextureDash();
204223
@@ -619,7 +638,6 @@ void OverlayRendererImpl::Draw(nux::GraphicsEngine& gfx_context, nux::Geometry c
619 int launcher_size = Settings::Instance().LauncherSize(monitor);638 int launcher_size = Settings::Instance().LauncherSize(monitor);
620 int panel_height = panel::Style::Instance().PanelHeight(monitor);639 int panel_height = panel::Style::Instance().PanelHeight(monitor);
621640
622 auto dash_position = OverlayPosition::LEFT;
623 int border_y = content_geo.y;641 int border_y = conten