Merge ~rs2009/unity:master into unity:master
- Git
- lp:~rs2009/unity
- master
- Merge into 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) |
Related bugs: |
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-
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 : | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/.gitignore b/.gitignore | |||
2 | index d58747c..da7cffb 100644 | |||
3 | --- a/.gitignore | |||
4 | +++ b/.gitignore | |||
5 | @@ -1,16 +1,90 @@ | |||
6 | 1 | build | 1 | build |
7 | 2 | services/panel-marshal.c | ||
8 | 3 | services/panel-marshal.h | ||
9 | 4 | .AUTHORS.sed | 2 | .AUTHORS.sed |
10 | 5 | tests/autopilot/dist | ||
11 | 6 | tests/autopilot/unity.egg-info | ||
12 | 7 | *.log | 3 | *.log |
13 | 8 | *.debhelper | 4 | *.debhelper |
14 | 9 | *.substvars | 5 | *.substvars |
15 | 10 | *.swp | 6 | *.swp |
16 | 7 | .vscode/ | ||
17 | 11 | debian/tmp | 8 | debian/tmp |
18 | 12 | debian/files | 9 | debian/files |
19 | 13 | obj-*/ | 10 | obj-*/ |
22 | 14 | debian/libunity-core-*/ | 11 | debian/libunity-core-6.0-9/ |
23 | 15 | debian/unity-*/ | 12 | debian/libunity-core-6.0-dev/ |
24 | 13 | debian/unity-autopilot/ | ||
25 | 14 | debian/unity-uwidgets/ | ||
26 | 15 | debian/unity-services/ | ||
27 | 16 | debian/unity-schemas/ | ||
28 | 16 | debian/unity/ | 17 | debian/unity/ |
29 | 18 | |||
30 | 19 | ### UWidgets | ||
31 | 20 | |||
32 | 21 | # Byte-compiled / optimized / DLL files | ||
33 | 22 | __pycache__/ | ||
34 | 23 | *.py[cod] | ||
35 | 24 | *$py.class | ||
36 | 25 | |||
37 | 26 | # C extensions | ||
38 | 27 | *.so | ||
39 | 28 | |||
40 | 29 | # Distribution / packaging | ||
41 | 30 | .Python | ||
42 | 31 | build/ | ||
43 | 32 | develop-eggs/ | ||
44 | 33 | dist/ | ||
45 | 34 | downloads/ | ||
46 | 35 | eggs/ | ||
47 | 36 | .eggs/ | ||
48 | 37 | lib/ | ||
49 | 38 | lib64/ | ||
50 | 39 | parts/ | ||
51 | 40 | sdist/ | ||
52 | 41 | var/ | ||
53 | 42 | wheels/ | ||
54 | 43 | *.egg-info/ | ||
55 | 44 | .installed.cfg | ||
56 | 45 | *.egg | ||
57 | 46 | MANIFEST | ||
58 | 47 | |||
59 | 48 | # PyInstaller | ||
60 | 49 | # Usually these files are written by a python script from a template | ||
61 | 50 | # before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
62 | 51 | *.manifest | ||
63 | 52 | *.spec | ||
64 | 53 | |||
65 | 54 | # Installer logs | ||
66 | 55 | pip-log.txt | ||
67 | 56 | pip-delete-this-directory.txt | ||
68 | 57 | |||
69 | 58 | # Unit test / coverage reports | ||
70 | 59 | htmlcov/ | ||
71 | 60 | .tox/ | ||
72 | 61 | .coverage | ||
73 | 62 | .coverage.* | ||
74 | 63 | .cache | ||
75 | 64 | nosetests.xml | ||
76 | 65 | coverage.xml | ||
77 | 66 | *.cover | ||
78 | 67 | .hypothesis/ | ||
79 | 68 | .pytest_cache/ | ||
80 | 69 | |||
81 | 70 | # Translations | ||
82 | 71 | *.mo | ||
83 | 72 | *.pot | ||
84 | 73 | |||
85 | 74 | # Sphinx documentation | ||
86 | 75 | docs/*build/ | ||
87 | 76 | |||
88 | 77 | # PyBuilder | ||
89 | 78 | target/ | ||
90 | 79 | |||
91 | 80 | # pyenv | ||
92 | 81 | .python-version | ||
93 | 82 | |||
94 | 83 | # Environments | ||
95 | 84 | .env | ||
96 | 85 | .venv | ||
97 | 86 | env/ | ||
98 | 87 | venv/ | ||
99 | 88 | ENV/ | ||
100 | 89 | env.bak/ | ||
101 | 90 | venv.bak/ | ||
102 | diff --git a/CMakeLists.txt b/CMakeLists.txt | |||
103 | index 1d58a46..bd237ca 100644 | |||
104 | --- a/CMakeLists.txt | |||
105 | +++ b/CMakeLists.txt | |||
106 | @@ -10,7 +10,7 @@ include (GNUInstallDirs) | |||
107 | 10 | # | 10 | # |
108 | 11 | set (PROJECT_NAME "unity") | 11 | set (PROJECT_NAME "unity") |
109 | 12 | set (UNITY_MAJOR 7) | 12 | set (UNITY_MAJOR 7) |
111 | 13 | set (UNITY_MINOR 6) | 13 | set (UNITY_MINOR 7) |
112 | 14 | set (UNITY_MICRO 0) | 14 | set (UNITY_MICRO 0) |
113 | 15 | set (UNITY_VERSION "${UNITY_MAJOR}.${UNITY_MINOR}.${UNITY_MICRO}") | 15 | set (UNITY_VERSION "${UNITY_MAJOR}.${UNITY_MINOR}.${UNITY_MICRO}") |
114 | 16 | set (UNITY_API_VERSION "6.0") | 16 | set (UNITY_API_VERSION "6.0") |
115 | diff --git a/README b/README | |||
116 | index 801461a..131489c 100644 | |||
117 | --- a/README | |||
118 | +++ b/README | |||
119 | @@ -19,3 +19,7 @@ | |||
120 | 19 | D-Bus activation. This is used for testing how the panel reacts when it | 19 | D-Bus activation. This is used for testing how the panel reacts when it |
121 | 20 | starts before the service does. | 20 | starts before the service does. |
122 | 21 | 21 | ||
123 | 22 | Credits | ||
124 | 23 | -------------------------------------------------------------------------------- | ||
125 | 24 | |||
126 | 25 | UWidgets is based on the Blighty project. | ||
127 | 22 | \ No newline at end of file | 26 | \ No newline at end of file |
128 | diff --git a/dash/DashView.cpp b/dash/DashView.cpp | |||
129 | index dc4e1b2..0fd0597 100644 | |||
130 | --- a/dash/DashView.cpp | |||
131 | +++ b/dash/DashView.cpp | |||
132 | @@ -39,6 +39,7 @@ | |||
133 | 39 | #include "unity-shared/UBusMessages.h" | 39 | #include "unity-shared/UBusMessages.h" |
134 | 40 | #include "unity-shared/UnitySettings.h" | 40 | #include "unity-shared/UnitySettings.h" |
135 | 41 | #include "unity-shared/WindowManager.h" | 41 | #include "unity-shared/WindowManager.h" |
136 | 42 | #include "unity-shared/FileManager.h" | ||
137 | 42 | 43 | ||
138 | 43 | namespace unity | 44 | namespace unity |
139 | 44 | { | 45 | { |
140 | @@ -231,83 +232,12 @@ void DashView::OnResultActivated(ResultView::ActivateType type, LocalResult cons | |||
141 | 231 | 232 | ||
142 | 232 | void DashView::BuildPreview(Preview::Ptr model) | 233 | void DashView::BuildPreview(Preview::Ptr model) |
143 | 233 | { | 234 | { |
205 | 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. |
145 | 235 | { | ||
146 | 236 | StartPreviewAnimation(); | ||
147 | 237 | |||
148 | 238 | content_view_->SetPresentRedirectedView(false); | ||
149 | 239 | preview_scope_view_ = active_scope_view_; | ||
150 | 240 | if (preview_scope_view_) | ||
151 | 241 | { | ||
152 | 242 | preview_scope_view_->ForceCategoryExpansion(stored_activated_unique_id_, true); | ||
153 | 243 | preview_scope_view_->EnableResultTextures(true); | ||
154 | 244 | preview_scope_view_->PushFilterExpansion(false); | ||
155 | 245 | } | ||
156 | 246 | |||
157 | 247 | if (!preview_container_) | ||
158 | 248 | { | ||
159 | 249 | preview_container_ = new previews::PreviewContainer(); | ||
160 | 250 | preview_container_->SetRedirectRenderingToTexture(true); | ||
161 | 251 | AddChild(preview_container_.GetPointer()); | ||
162 | 252 | preview_container_->SetParentObject(this); | ||
163 | 253 | } | ||
164 | 254 | preview_container_->Preview(model, previews::Navigation::NONE); // no swipe left or right | ||
165 | 255 | preview_container_->scale = scale(); | ||
166 | 256 | preview_container_->SetGeometry(scopes_layout_->GetGeometry()); | ||
167 | 257 | preview_displaying_ = true; | ||
168 | 258 | |||
169 | 259 | // connect to nav left/right signals to request nav left/right movement. | ||
170 | 260 | preview_container_->navigate_left.connect([this] () { | ||
171 | 261 | preview_navigation_mode_ = previews::Navigation::LEFT; | ||
172 | 262 | |||
173 | 263 | // sends a message to all result views, sending the the uri of the current preview result | ||
174 | 264 | // and the unique id of the result view that should be handling the results | ||
175 | 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())); | ||
176 | 266 | }); | ||
177 | 267 | |||
178 | 268 | preview_container_->navigate_right.connect([this] () { | ||
179 | 269 | preview_navigation_mode_ = previews::Navigation::RIGHT; | ||
180 | 270 | |||
181 | 271 | // sends a message to all result views, sending the the uri of the current preview result | ||
182 | 272 | // and the unique id of the result view that should be handling the results | ||
183 | 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())); | ||
184 | 274 | }); | ||
185 | 275 | |||
186 | 276 | preview_container_->request_close.connect([this] () { ClosePreview(); }); | ||
187 | 277 | } | ||
188 | 278 | else | ||
189 | 279 | { | ||
190 | 280 | // got a new preview whilst already displaying, we probably clicked a navigation button. | ||
191 | 281 | preview_container_->Preview(model, preview_navigation_mode_); // TODO | ||
192 | 282 | preview_container_->scale = scale(); | ||
193 | 283 | } | ||
194 | 284 | |||
195 | 285 | if (G_LIKELY(preview_state_machine_.left_results() > 0 && preview_state_machine_.right_results() > 0)) | ||
196 | 286 | preview_container_->DisableNavButton(previews::Navigation::NONE); | ||
197 | 287 | else if (preview_state_machine_.left_results() > 0) | ||
198 | 288 | preview_container_->DisableNavButton(previews::Navigation::RIGHT); | ||
199 | 289 | else if (preview_state_machine_.right_results() > 0) | ||
200 | 290 | preview_container_->DisableNavButton(previews::Navigation::LEFT); | ||
201 | 291 | else | ||
202 | 292 | preview_container_->DisableNavButton(previews::Navigation::BOTH); | ||
203 | 293 | |||
204 | 294 | QueueDraw(); | ||
206 | 295 | } | 236 | } |
207 | 296 | 237 | ||
208 | 297 | void DashView::ClosePreview() | 238 | void DashView::ClosePreview() |
209 | 298 | { | 239 | { |
222 | 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. |
211 | 300 | { | ||
212 | 301 | EndPreviewAnimation(); | ||
213 | 302 | |||
214 | 303 | preview_displaying_ = false; | ||
215 | 304 | } | ||
216 | 305 | |||
217 | 306 | preview_navigation_mode_ = previews::Navigation::NONE; | ||
218 | 307 | |||
219 | 308 | // re-focus dash view component. | ||
220 | 309 | nux::GetWindowCompositor().SetKeyFocusArea(default_focus()); | ||
221 | 310 | QueueDraw(); | ||
223 | 311 | } | 241 | } |
224 | 312 | 242 | ||
225 | 313 | void DashView::StartPreviewAnimation() | 243 | void DashView::StartPreviewAnimation() |
226 | @@ -555,6 +485,11 @@ void DashView::SetupViews() | |||
227 | 555 | content_view_->SetLayout(content_layout_); | 485 | content_view_->SetLayout(content_layout_); |
228 | 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); |
229 | 557 | 487 | ||
230 | 488 | scope_bar_ = new ScopeBar(); | ||
231 | 489 | AddChild(scope_bar_); | ||
232 | 490 | scope_bar_->scope_activated.connect(sigc::mem_fun(this, &DashView::OnScopeBarActivated)); | ||
233 | 491 | content_layout_->AddView(scope_bar_, 0, nux::MINOR_POSITION_CENTER); | ||
234 | 492 | |||
235 | 558 | search_bar_layout_ = new nux::HLayout(); | 493 | search_bar_layout_ = new nux::HLayout(); |
236 | 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); |
237 | 560 | 495 | ||
238 | @@ -578,11 +513,6 @@ void DashView::SetupViews() | |||
239 | 578 | scopes_layout_ = new nux::VLayout(); | 513 | scopes_layout_ = new nux::VLayout(); |
240 | 579 | content_layout_->AddLayout(scopes_layout_, 1, nux::MINOR_POSITION_START); | 514 | content_layout_->AddLayout(scopes_layout_, 1, nux::MINOR_POSITION_START); |
241 | 580 | 515 | ||
242 | 581 | scope_bar_ = new ScopeBar(); | ||
243 | 582 | AddChild(scope_bar_); | ||
244 | 583 | scope_bar_->scope_activated.connect(sigc::mem_fun(this, &DashView::OnScopeBarActivated)); | ||
245 | 584 | content_layout_->AddView(scope_bar_, 0, nux::MINOR_POSITION_CENTER); | ||
246 | 585 | |||
247 | 586 | OnDPIChanged(); | 516 | OnDPIChanged(); |
248 | 587 | } | 517 | } |
249 | 588 | 518 | ||
250 | @@ -701,24 +631,24 @@ nux::Geometry DashView::GetBestFitGeometry(nux::Geometry const& for_geo) | |||
251 | 701 | style.GetPlacesGroupResultTopPadding().CP(scale) + | 631 | style.GetPlacesGroupResultTopPadding().CP(scale) + |
252 | 702 | style.GetTileHeight().CP(scale)); | 632 | style.GetTileHeight().CP(scale)); |
253 | 703 | 633 | ||
258 | 704 | int half = for_geo.width / 2; | 634 | // let's show five tiles per row |
259 | 705 | 635 | width = tile_width * 5; | |
256 | 706 | // if default dash size is bigger than half a screens worth of items, go for that. | ||
257 | 707 | while ((width += tile_width) < half); | ||
260 | 708 | 636 | ||
261 | 709 | width = std::max(width, tile_width * DASH_TILE_HORIZONTAL_COUNT); | ||
262 | 710 | width += style.GetVSeparatorSize().CP(scale); | 637 | width += style.GetVSeparatorSize().CP(scale); |
263 | 711 | width += style.GetPlacesGroupResultLeftPadding().CP(scale) + DASH_RESULT_RIGHT_PAD.CP(scale); | 638 | width += style.GetPlacesGroupResultLeftPadding().CP(scale) + DASH_RESULT_RIGHT_PAD.CP(scale); |
264 | 712 | 639 | ||
272 | 713 | height = style.GetHSeparatorSize().CP(scale); | 640 | // width shouldn't be bigger than the geo available. |
266 | 714 | height += style.GetDashViewTopPadding().CP(scale); | ||
267 | 715 | height += search_bar_->GetGeometry().height; | ||
268 | 716 | height += category_height * DASH_DEFAULT_CATEGORY_COUNT; // adding three categories | ||
269 | 717 | height += scope_bar_->GetGeometry().height; | ||
270 | 718 | |||
271 | 719 | // width/height shouldn't be bigger than the geo available. | ||
273 | 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. |
275 | 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; |
276 | 643 | |||
277 | 644 | if (Settings::Instance().launcher_position() == LauncherPosition::BOTTOM) { | ||
278 | 645 | height = style.GetHSeparatorSize().CP(scale); | ||
279 | 646 | height += style.GetDashViewTopPadding().CP(scale); | ||
280 | 647 | height += search_bar_->GetGeometry().height; | ||
281 | 648 | height += category_height * 3; | ||
282 | 649 | height += scope_bar_->GetGeometry().height; | ||
283 | 650 | height = std::min(height, for_geo.height - vertical_offset); | ||
284 | 651 | } | ||
285 | 722 | 652 | ||
286 | 723 | return nux::Geometry(0, vertical_offset, width, height); | 653 | return nux::Geometry(0, vertical_offset, width, height); |
287 | 724 | } | 654 | } |
288 | @@ -1091,59 +1021,7 @@ void DashView::DrawPreviewResultTextures(nux::GraphicsEngine& graphics_engine, b | |||
289 | 1091 | } | 1021 | } |
290 | 1092 | 1022 | ||
291 | 1093 | void DashView::DrawPreview(nux::GraphicsEngine& graphics_engine, bool force_draw) | 1023 | void DashView::DrawPreview(nux::GraphicsEngine& graphics_engine, bool force_draw) |
345 | 1094 | { | 1024 | { } |
293 | 1095 | if (animate_preview_value_ > 0.0f) | ||
294 | 1096 | { | ||
295 | 1097 | bool animating = animate_split_value_ != 1.0f || animate_preview_value_ < 1.0f; | ||
296 | 1098 | bool preview_force_draw = force_draw || animating || IsFullRedraw(); | ||
297 | 1099 | |||
298 | 1100 | if (preview_force_draw) | ||
299 | 1101 | nux::GetPainter().PushBackgroundStack(); | ||
300 | 1102 | |||
301 | 1103 | if (animate_preview_value_ < 1.0f && preview_container_->RedirectRenderingToTexture()) | ||
302 | 1104 | { | ||
303 | 1105 | preview_container_->SetPresentRedirectedView(false); | ||
304 | 1106 | preview_container_->ProcessDraw(graphics_engine, preview_force_draw); | ||
305 | 1107 | |||
306 | 1108 | unsigned int alpha, src, dest = 0; | ||
307 | 1109 | graphics_engine.GetRenderStates().GetBlend(alpha, src, dest); | ||
308 | 1110 | graphics_engine.GetRenderStates().SetBlend(true, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); | ||
309 | 1111 | |||
310 | 1112 | nux::ObjectPtr<nux::IOpenGLBaseTexture> preview_texture = preview_container_->BackupTexture(); | ||
311 | 1113 | if (preview_texture) | ||
312 | 1114 | { | ||
313 | 1115 | nux::TexCoordXForm texxform; | ||
314 | 1116 | texxform.FlipVCoord(true); | ||
315 | 1117 | texxform.uoffset = 0.0f; | ||
316 | 1118 | texxform.voffset = 0.0f; | ||
317 | 1119 | texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_COORD); | ||
318 | 1120 | |||
319 | 1121 | nux::Geometry const& geo_preview = preview_container_->GetGeometry(); | ||
320 | 1122 | graphics_engine.QRP_1Tex | ||
321 | 1123 | ( | ||
322 | 1124 | geo_preview.x, | ||
323 | 1125 | geo_preview.y, | ||
324 | 1126 | geo_preview.width, | ||
325 | 1127 | geo_preview.height, | ||
326 | 1128 | preview_texture, | ||
327 | 1129 | texxform, | ||
328 | 1130 | nux::Color(animate_preview_value_, animate_preview_value_, animate_preview_value_, animate_preview_value_) | ||
329 | 1131 | ); | ||
330 | 1132 | } | ||
331 | 1133 | |||
332 | 1134 | preview_container_->SetPresentRedirectedView(true); | ||
333 | 1135 | |||
334 | 1136 | graphics_engine.GetRenderStates().SetBlend(alpha, src, dest); | ||
335 | 1137 | } | ||
336 | 1138 | else | ||
337 | 1139 | { | ||
338 | 1140 | preview_container_->ProcessDraw(graphics_engine, preview_force_draw); | ||
339 | 1141 | } | ||
340 | 1142 | |||
341 | 1143 | if (preview_force_draw) | ||
342 | 1144 | nux::GetPainter().PopBackgroundStack(); | ||
343 | 1145 | } | ||
344 | 1146 | } | ||
346 | 1147 | 1025 | ||
347 | 1148 | void DashView::OnActivateRequest(GVariant* args) | 1026 | void DashView::OnActivateRequest(GVariant* args) |
348 | 1149 | { | 1027 | { |
349 | diff --git a/dash/PlacesGroup.cpp b/dash/PlacesGroup.cpp | |||
350 | index 7a1f8db..b83be9b 100755 | |||
351 | --- a/dash/PlacesGroup.cpp | |||
352 | +++ b/dash/PlacesGroup.cpp | |||
353 | @@ -52,6 +52,9 @@ namespace | |||
354 | 52 | const nux::Color EXPAND_DEFAULT_TEXT_COLOR(1.0f, 1.0f, 1.0f, 0.5f); | 52 | const nux::Color EXPAND_DEFAULT_TEXT_COLOR(1.0f, 1.0f, 1.0f, 0.5f); |
355 | 53 | const float EXPAND_DEFAULT_ICON_OPACITY = 0.5f; | 53 | const float EXPAND_DEFAULT_ICON_OPACITY = 0.5f; |
356 | 54 | 54 | ||
357 | 55 | // Category heading | ||
358 | 56 | const RawPixel HEADER_VERTICAL_MARGIN = 10_em; | ||
359 | 57 | |||
360 | 55 | // Category highlight | 58 | // Category highlight |
361 | 56 | const RawPixel HIGHLIGHT_RIGHT_PADDING = 10_em; | 59 | const RawPixel HIGHLIGHT_RIGHT_PADDING = 10_em; |
362 | 57 | const RawPixel HIGHLIGHT_HEIGHT = 24_em; | 60 | const RawPixel HIGHLIGHT_HEIGHT = 24_em; |
363 | @@ -229,6 +232,7 @@ PlacesGroup::UpdatePlacesGroupSize() | |||
364 | 229 | 232 | ||
365 | 230 | _header_layout->SetSpaceBetweenChildren(SPACE_BETWEEN_CHILDREN.CP(scale())); | 233 | _header_layout->SetSpaceBetweenChildren(SPACE_BETWEEN_CHILDREN.CP(scale())); |
366 | 231 | _header_layout->SetLeftAndRightPadding(_style.GetCategoryHeaderLeftPadding().CP(scale), 0); | 234 | _header_layout->SetLeftAndRightPadding(_style.GetCategoryHeaderLeftPadding().CP(scale), 0); |
367 | 235 | _header_layout->SetVerticalExternalMargin(HEADER_VERTICAL_MARGIN); | ||
368 | 232 | 236 | ||
369 | 233 | _icon->SetMinMaxSize(icon_size, icon_size); | 237 | _icon->SetMinMaxSize(icon_size, icon_size); |
370 | 234 | 238 | ||
371 | diff --git a/dash/ResultViewGrid.cpp b/dash/ResultViewGrid.cpp | |||
372 | index 78a01de..1669260 100644 | |||
373 | --- a/dash/ResultViewGrid.cpp | |||
374 | +++ b/dash/ResultViewGrid.cpp | |||
375 | @@ -55,7 +55,7 @@ namespace | |||
376 | 55 | 55 | ||
377 | 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) |
378 | 57 | 57 | ||
380 | 58 | const RawPixel WIDTH_PADDING = 25_em; | 58 | const RawPixel WIDTH_PADDING = 25_em; |
381 | 59 | const RawPixel SCROLLBAR_WIDTH = 3_em; | 59 | const RawPixel SCROLLBAR_WIDTH = 3_em; |
382 | 60 | 60 | ||
383 | 61 | const std::string APPLICATION_URI_PREFIX = "application://"; | 61 | const std::string APPLICATION_URI_PREFIX = "application://"; |
384 | diff --git a/dash/ScopeBar.cpp b/dash/ScopeBar.cpp | |||
385 | index 027675c..5bba477 100644 | |||
386 | --- a/dash/ScopeBar.cpp | |||
387 | +++ b/dash/ScopeBar.cpp | |||
388 | @@ -58,7 +58,7 @@ void ScopeBar::SetupBackground() | |||
389 | 58 | rop.Blend = true; | 58 | rop.Blend = true; |
390 | 59 | rop.SrcBlend = GL_ONE; | 59 | rop.SrcBlend = GL_ONE; |
391 | 60 | rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA; | 60 | rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA; |
393 | 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)); |
394 | 62 | } | 62 | } |
395 | 63 | 63 | ||
396 | 64 | void ScopeBar::UpdateScale(double scale) | 64 | void ScopeBar::UpdateScale(double scale) |
397 | diff --git a/dash/StandaloneDash.cpp b/dash/StandaloneDash.cpp | |||
398 | index e869ace..b14d360 100644 | |||
399 | --- a/dash/StandaloneDash.cpp | |||
400 | +++ b/dash/StandaloneDash.cpp | |||
401 | @@ -41,8 +41,8 @@ | |||
402 | 41 | #include <UnityCore/GSettingsScopes.h> | 41 | #include <UnityCore/GSettingsScopes.h> |
403 | 42 | #include <UnityCore/ScopeProxyInterface.h> | 42 | #include <UnityCore/ScopeProxyInterface.h> |
404 | 43 | 43 | ||
407 | 44 | const unity::RawPixel WIDTH(1024); | 44 | const unity::RawPixel WIDTH(1280); |
408 | 45 | const unity::RawPixel HEIGHT(768); | 45 | const unity::RawPixel HEIGHT(720); |
409 | 46 | 46 | ||
410 | 47 | using namespace unity::dash; | 47 | using namespace unity::dash; |
411 | 48 | 48 | ||
412 | @@ -126,7 +126,7 @@ int main(int argc, char **argv) | |||
413 | 126 | 0, &TestRunner::InitWindowThread, test_runner)); | 126 | 0, &TestRunner::InitWindowThread, test_runner)); |
414 | 127 | 127 | ||
415 | 128 | nux::ObjectPtr<nux::BaseTexture> background_tex; | 128 | nux::ObjectPtr<nux::BaseTexture> background_tex; |
417 | 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")); |
418 | 130 | nux::TexCoordXForm texxform; | 130 | nux::TexCoordXForm texxform; |
419 | 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); |
420 | 132 | wt->SetWindowBackgroundPaintLayer(tex_layer.get()); | 132 | wt->SetWindowBackgroundPaintLayer(tex_layer.get()); |
421 | diff --git a/debian/changelog b/debian/changelog | |||
422 | index a3a4d5d..1767d6d 100644 | |||
423 | --- a/debian/changelog | |||
424 | +++ b/debian/changelog | |||
425 | @@ -1,3 +1,12 @@ | |||
426 | 1 | unity (7.7.0+23.04.20230222-0ubuntu1) lunar; urgency=medium | ||
427 | 2 | |||
428 | 3 | * Added UWidgets, a new widget system for Unity based on Blighty | ||
429 | 4 | * Made the dash vertical and moved the scope bar to the top | ||
430 | 5 | * Increased the panel height to 30 | ||
431 | 6 | * Added indicator-notifications as a Recommend | ||
432 | 7 | |||
433 | 8 | -- Rudra Saraswat <ruds@ruds.io> Tue, 21 Feb 2022 15:38:23 +0530 | ||
434 | 9 | |||
435 | 1 | unity (7.6.0+22.10.20220913-0ubuntu1) kinetic; urgency=medium | 10 | unity (7.6.0+22.10.20220913-0ubuntu1) kinetic; urgency=medium |
436 | 2 | 11 | ||
437 | 3 | [ Rudra Saraswat ] | 12 | [ Rudra Saraswat ] |
438 | diff --git a/debian/control b/debian/control | |||
439 | index c61edb5..2484f22 100644 | |||
440 | --- a/debian/control | |||
441 | +++ b/debian/control | |||
442 | @@ -11,6 +11,8 @@ Build-Depends: cmake (>= 3.17.0), | |||
443 | 11 | dh-translations (>= 94), | 11 | dh-translations (>= 94), |
444 | 12 | dh-python, | 12 | dh-python, |
445 | 13 | google-mock (>= 1.6.0+svn437), | 13 | google-mock (>= 1.6.0+svn437), |
446 | 14 | gir1.2-gtk-3.0, | ||
447 | 15 | gir1.2-glib-2.0, | ||
448 | 14 | gsettings-desktop-schemas-dev, | 16 | gsettings-desktop-schemas-dev, |
449 | 15 | gsettings-ubuntu-schemas (>= 0.0.7+17.10.20170922), | 17 | gsettings-ubuntu-schemas (>= 0.0.7+17.10.20170922), |
450 | 16 | intltool (>= 0.35.0), | 18 | intltool (>= 0.35.0), |
451 | @@ -48,17 +50,21 @@ Build-Depends: cmake (>= 3.17.0), | |||
452 | 48 | libxcb-icccm4-dev, | 50 | libxcb-icccm4-dev, |
453 | 49 | libxfixes-dev (>= 1:5.0.1), | 51 | libxfixes-dev (>= 1:5.0.1), |
454 | 50 | libxi-dev (>= 2:1.7.1.901), | 52 | libxi-dev (>= 2:1.7.1.901), |
455 | 53 | libxinerama-dev, | ||
456 | 51 | libxpathselect-dev (>=1.4), | 54 | libxpathselect-dev (>=1.4), |
457 | 52 | libxtst-dev, | 55 | libxtst-dev, |
458 | 53 | libzeitgeist-2.0-dev, | 56 | libzeitgeist-2.0-dev, |
459 | 54 | pkg-config, | 57 | pkg-config, |
460 | 55 | python3-all (>= 3.4), | 58 | python3-all (>= 3.4), |
461 | 59 | python3-dev, | ||
462 | 60 | python3-gi, | ||
463 | 56 | python3-setuptools, | 61 | python3-setuptools, |
464 | 57 | quilt, | 62 | quilt, |
465 | 58 | systemd, | 63 | systemd, |
466 | 64 | xorg, | ||
467 | 59 | xserver-xorg-video-dummy, | 65 | xserver-xorg-video-dummy, |
468 | 60 | xsltproc, | 66 | xsltproc, |
470 | 61 | yaru-theme-icon, | 67 | yaru-theme-icon |
471 | 62 | Standards-Version: 3.9.5 | 68 | Standards-Version: 3.9.5 |
472 | 63 | Homepage: https://launchpad.net/unity | 69 | Homepage: https://launchpad.net/unity |
473 | 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, |
474 | @@ -95,6 +101,8 @@ Recommends: unity-control-center, | |||
475 | 95 | hud, | 101 | hud, |
476 | 96 | session-shortcuts, | 102 | session-shortcuts, |
477 | 97 | unity-session, | 103 | unity-session, |
478 | 104 | unity-uwidgets, | ||
479 | 105 | indicator-notifications | ||
480 | 98 | Breaks: unity-lens-applications (<< 5.12.0-0ubuntu2), | 106 | Breaks: unity-lens-applications (<< 5.12.0-0ubuntu2), |
481 | 99 | unity-lens-files (<< 5.10.0-0ubuntu2), | 107 | unity-lens-files (<< 5.10.0-0ubuntu2), |
482 | 100 | unity-lens-music (<< 6.0.0), | 108 | unity-lens-music (<< 6.0.0), |
483 | @@ -220,3 +228,28 @@ Description: Autopiloted tests for Unity | |||
484 | 220 | bindings to be able to write tests in python as well as the full test suite | 228 | bindings to be able to write tests in python as well as the full test suite |
485 | 221 | for Unity. | 229 | for Unity. |
486 | 222 | 230 | ||
487 | 231 | Package: unity-uwidgets | ||
488 | 232 | Section: python | ||
489 | 233 | Architecture: all | ||
490 | 234 | Depends: ${misc:Depends}, | ||
491 | 235 | ${python3:Depends}, | ||
492 | 236 | python3, | ||
493 | 237 | xorg, | ||
494 | 238 | libxinerama-dev, | ||
495 | 239 | libcairo2-dev, | ||
496 | 240 | python3-gi, | ||
497 | 241 | python3-pil, | ||
498 | 242 | python3-pydbus, | ||
499 | 243 | python3-psutil, | ||
500 | 244 | gir1.2-gtk-3.0, | ||
501 | 245 | gir1.2-glib-2.0, | ||
502 | 246 | Description: Widgets for Unity | ||
503 | 247 | Unity is a desktop experience that sings. Designed by Canonical and the Ayatana | ||
504 | 248 | community, Unity is all about the combination of familiarity and the future. We | ||
505 | 249 | bring together visual design, analysis of user experience testing, modern | ||
506 | 250 | graphics technologies and a deep understanding of the free software landscape | ||
507 | 251 | to produce what we hope will be the lightest, most elegant and most delightful | ||
508 | 252 | way to use your PC. | ||
509 | 253 | . | ||
510 | 254 | This package contains support for widgets for Unity, based on Blighty. | ||
511 | 255 | |||
512 | diff --git a/debian/rules b/debian/rules | |||
513 | index 4b29c43..0386984 100755 | |||
514 | --- a/debian/rules | |||
515 | +++ b/debian/rules | |||
516 | @@ -35,13 +35,12 @@ override_dh_auto_configure: | |||
517 | 35 | 35 | ||
518 | 36 | override_dh_install: | 36 | override_dh_install: |
519 | 37 | # install autopilot tests | 37 | # install autopilot tests |
525 | 38 | cd tests/autopilot; \ | 38 | cd tests/autopilot; python3 setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; |
521 | 39 | set -ex; for python in $(shell py3versions -r); do \ | ||
522 | 40 | $$python setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; \ | ||
523 | 41 | done; \ | ||
524 | 42 | cd $(CURDIR) | ||
526 | 43 | find debian/tmp/usr/lib -name \*.*a -exec rm {} \; | 39 | find debian/tmp/usr/lib -name \*.*a -exec rm {} \; |
527 | 44 | rm -rf debian/tmp/usr/share/gconf/schemas | 40 | rm -rf debian/tmp/usr/share/gconf/schemas |
528 | 41 | # install uwidgets | ||
529 | 42 | cd uwidgets; python3 setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb | ||
530 | 43 | install -Dm755 uwidgets/uwidgets-runner.desktop $(CURDIR)/debian/tmp/etc/xdg/autostart/uwidgets-runner.desktop | ||
531 | 45 | dh_install --fail-missing | 44 | dh_install --fail-missing |
532 | 46 | 45 | ||
533 | 47 | override_dh_gencontrol: | 46 | override_dh_gencontrol: |
534 | diff --git a/debian/unity-uwidgets.install b/debian/unity-uwidgets.install | |||
535 | 48 | new file mode 100644 | 47 | new file mode 100644 |
536 | index 0000000..5bbbd88 | |||
537 | --- /dev/null | |||
538 | +++ b/debian/unity-uwidgets.install | |||
539 | @@ -0,0 +1,3 @@ | |||
540 | 1 | usr/lib/python*/*/uwidgets* | ||
541 | 2 | usr/bin/uwidgets-runner | ||
542 | 3 | etc/xdg/autostart/uwidgets-runner.desktop | ||
543 | 0 | \ No newline at end of file | 4 | \ No newline at end of file |
544 | diff --git a/debian/unity.install b/debian/unity.install | |||
545 | index b60c762..224959e 100644 | |||
546 | --- a/debian/unity.install | |||
547 | +++ b/debian/unity.install | |||
548 | @@ -1,6 +1,6 @@ | |||
549 | 1 | etc/compizconfig | 1 | etc/compizconfig |
550 | 2 | etc/pam.d | 2 | etc/pam.d |
552 | 3 | usr/bin | 3 | usr/bin/unity |
553 | 4 | usr/lib/*/compiz/libunity*.so | 4 | usr/lib/*/compiz/libunity*.so |
554 | 5 | usr/lib/*/unity/unity-active-plugins-safety-check | 5 | usr/lib/*/unity/unity-active-plugins-safety-check |
555 | 6 | usr/lib/*/unity/compiz-config-profile-setter | 6 | usr/lib/*/unity/compiz-config-profile-setter |
556 | diff --git a/launcher/BFBLauncherIcon.cpp b/launcher/BFBLauncherIcon.cpp | |||
557 | index 68ff72d..eece73a 100644 | |||
558 | --- a/launcher/BFBLauncherIcon.cpp | |||
559 | +++ b/launcher/BFBLauncherIcon.cpp | |||
560 | @@ -143,9 +143,7 @@ void BFBLauncherIcon::UpdateDefaultSearchText() | |||
561 | 143 | { | 143 | { |
562 | 144 | auto home_scope = reader_->GetScopeDataById("home.scope"); | 144 | auto home_scope = reader_->GetScopeDataById("home.scope"); |
563 | 145 | 145 | ||
567 | 146 | tooltip_text = ((Settings::Instance().remote_content) ? | 146 | tooltip_text = _("Search your computer"); |
565 | 147 | _("Search your computer and online sources") : | ||
566 | 148 | _("Search your computer")); | ||
568 | 149 | 147 | ||
569 | 150 | if (home_scope) | 148 | if (home_scope) |
570 | 151 | { | 149 | { |
571 | diff --git a/launcher/FileManagerLauncherIcon.cpp b/launcher/FileManagerLauncherIcon.cpp | |||
572 | index 019c550..7e1560a 100644 | |||
573 | --- a/launcher/FileManagerLauncherIcon.cpp | |||
574 | +++ b/launcher/FileManagerLauncherIcon.cpp | |||
575 | @@ -23,7 +23,7 @@ | |||
576 | 23 | #include <NuxCore/Logger.h> | 23 | #include <NuxCore/Logger.h> |
577 | 24 | #include <UnityCore/DesktopUtilities.h> | 24 | #include <UnityCore/DesktopUtilities.h> |
578 | 25 | 25 | ||
580 | 26 | #include "unity-shared/FileManager.h" | 26 | #include "unity-shared/GnomeFileManager.h" |
581 | 27 | 27 | ||
582 | 28 | namespace unity | 28 | namespace unity |
583 | 29 | { | 29 | { |
584 | diff --git a/launcher/Launcher.cpp b/launcher/Launcher.cpp | |||
585 | index e744757..a4f880a 100644 | |||
586 | --- a/launcher/Launcher.cpp | |||
587 | +++ b/launcher/Launcher.cpp | |||
588 | @@ -562,10 +562,8 @@ void Launcher::SetupRenderArg(AbstractLauncherIcon::Ptr const& icon, RenderArg& | |||
589 | 562 | arg.progress_bias = IconProgressBias(icon); | 562 | arg.progress_bias = IconProgressBias(icon); |
590 | 563 | arg.progress = CLAMP(icon->GetProgress(), 0.0f, 1.0f); | 563 | arg.progress = CLAMP(icon->GetProgress(), 0.0f, 1.0f); |
591 | 564 | arg.draw_shortcut = shortcuts_shown_ && !hide_machine_.GetQuirk(LauncherHideMachine::PLACES_VISIBLE); | 564 | arg.draw_shortcut = shortcuts_shown_ && !hide_machine_.GetQuirk(LauncherHideMachine::PLACES_VISIBLE); |
596 | 565 | arg.system_item = icon->GetIconType() == AbstractLauncherIcon::IconType::HOME || | 565 | arg.system_item = icon->GetIconType() == AbstractLauncherIcon::IconType::HUD; |
597 | 566 | icon->GetIconType() == AbstractLauncherIcon::IconType::HUD; | 566 | arg.colorify_background = icon->GetIconType() == AbstractLauncherIcon::IconType::HUD || |
594 | 567 | arg.colorify_background = icon->GetIconType() == AbstractLauncherIcon::IconType::HOME || | ||
595 | 568 | icon->GetIconType() == AbstractLauncherIcon::IconType::HUD || | ||
598 | 569 | icon->GetIconType() == AbstractLauncherIcon::IconType::TRASH || | 567 | icon->GetIconType() == AbstractLauncherIcon::IconType::TRASH || |
599 | 570 | icon->GetIconType() == AbstractLauncherIcon::IconType::DESKTOP || | 568 | icon->GetIconType() == AbstractLauncherIcon::IconType::DESKTOP || |
600 | 571 | icon->GetIconType() == AbstractLauncherIcon::IconType::DEVICE || | 569 | icon->GetIconType() == AbstractLauncherIcon::IconType::DEVICE || |
601 | @@ -1113,13 +1111,6 @@ void Launcher::OnOverlayShown(GVariant* data) | |||
602 | 1113 | 1111 | ||
603 | 1114 | bg_effect_helper_.enabled = true; | 1112 | bg_effect_helper_.enabled = true; |
604 | 1115 | 1113 | ||
605 | 1116 | // Don't desaturate icons if the mouse is over the launcher: | ||
606 | 1117 | if (!hovered_) | ||
607 | 1118 | { | ||
608 | 1119 | LOG_DEBUG(logger) << "Desaturate on monitor " << monitor(); | ||
609 | 1120 | DesaturateIcons(); | ||
610 | 1121 | } | ||
611 | 1122 | |||
612 | 1123 | if (icon_under_mouse_) | 1114 | if (icon_under_mouse_) |
613 | 1124 | icon_under_mouse_->HideTooltip(); | 1115 | icon_under_mouse_->HideTooltip(); |
614 | 1125 | } | 1116 | } |
615 | @@ -2769,242 +2760,22 @@ bool Launcher::DndIsSpecialRequest(std::string const& uri) const | |||
616 | 2769 | } | 2760 | } |
617 | 2770 | 2761 | ||
618 | 2771 | void Launcher::ProcessDndEnter() | 2762 | void Launcher::ProcessDndEnter() |
632 | 2772 | { | 2763 | { } |
620 | 2773 | #ifdef USE_X11 | ||
621 | 2774 | SetStateMouseOverLauncher(true); | ||
622 | 2775 | |||
623 | 2776 | dnd_data_.Reset(); | ||
624 | 2777 | drag_action_ = nux::DNDACTION_NONE; | ||
625 | 2778 | steal_drag_ = false; | ||
626 | 2779 | data_checked_ = false; | ||
627 | 2780 | dnd_hovered_icon_ = nullptr; | ||
628 | 2781 | drag_edge_touching_ = false; | ||
629 | 2782 | dnd_hide_animation_.Stop(); | ||
630 | 2783 | #endif | ||
631 | 2784 | } | ||
633 | 2785 | 2764 | ||
634 | 2786 | void Launcher::DndReset() | 2765 | void Launcher::DndReset() |
659 | 2787 | { | 2766 | { } |
636 | 2788 | #ifdef USE_X11 | ||
637 | 2789 | dnd_data_.Reset(); | ||
638 | 2790 | |||
639 | 2791 | bool is_overlay_open = IsOverlayOpen(); | ||
640 | 2792 | |||
641 | 2793 | for (auto it : *model_) | ||
642 | 2794 | { | ||
643 | 2795 | auto icon_type = it->GetIconType(); | ||
644 | 2796 | bool desaturate = false; | ||
645 | 2797 | |||
646 | 2798 | if (icon_type != AbstractLauncherIcon::IconType::HOME && | ||
647 | 2799 | icon_type != AbstractLauncherIcon::IconType::HUD) | ||
648 | 2800 | { | ||
649 | 2801 | desaturate = is_overlay_open && !hovered_; | ||
650 | 2802 | } | ||
651 | 2803 | |||
652 | 2804 | it->SetQuirk(AbstractLauncherIcon::Quirk::DESAT, desaturate, monitor()); | ||
653 | 2805 | it->SetQuirk(AbstractLauncherIcon::Quirk::UNFOLDED, false, monitor()); | ||
654 | 2806 | } | ||
655 | 2807 | |||
656 | 2808 | DndHoveredIconReset(); | ||
657 | 2809 | #endif | ||
658 | 2810 | } | ||
660 | 2811 | 2767 | ||
661 | 2812 | void Launcher::DndHoveredIconReset() | 2768 | void Launcher::DndHoveredIconReset() |
683 | 2813 | { | 2769 | { } |
663 | 2814 | #ifdef USE_X11 | ||
664 | 2815 | SetActionState(ACTION_NONE); | ||
665 | 2816 | |||
666 | 2817 | if (steal_drag_ && dnd_hovered_icon_) | ||
667 | 2818 | { | ||
668 | 2819 | dnd_hovered_icon_->SetQuirk(AbstractLauncherIcon::Quirk::VISIBLE, false, monitor()); | ||
669 | 2820 | dnd_hovered_icon_->remove.emit(dnd_hovered_icon_); | ||
670 | 2821 | } | ||
671 | 2822 | |||
672 | 2823 | if (!steal_drag_ && dnd_hovered_icon_) | ||
673 | 2824 | { | ||
674 | 2825 | dnd_hovered_icon_->SendDndLeave(); | ||
675 | 2826 | dnd_hovered_icon_->SetQuirk(AbstractLauncherIcon::Quirk::GLOW, false, monitor()); | ||
676 | 2827 | } | ||
677 | 2828 | |||
678 | 2829 | steal_drag_ = false; | ||
679 | 2830 | drag_edge_touching_ = false; | ||
680 | 2831 | dnd_hovered_icon_ = nullptr; | ||
681 | 2832 | #endif | ||
682 | 2833 | } | ||
684 | 2834 | 2770 | ||
685 | 2835 | void Launcher::ProcessDndLeave() | 2771 | void Launcher::ProcessDndLeave() |
692 | 2836 | { | 2772 | { } |
687 | 2837 | #ifdef USE_X11 | ||
688 | 2838 | SetStateMouseOverLauncher(false); | ||
689 | 2839 | DndHoveredIconReset(); | ||
690 | 2840 | #endif | ||
691 | 2841 | } | ||
693 | 2842 | 2773 | ||
694 | 2843 | void Launcher::ProcessDndMove(int x, int y, std::list<char*> mimes) | 2774 | void Launcher::ProcessDndMove(int x, int y, std::list<char*> mimes) |
830 | 2844 | { | 2775 | { } |
696 | 2845 | #ifdef USE_X11 | ||
697 | 2846 | if (!data_checked_) | ||
698 | 2847 | { | ||
699 | 2848 | const std::string uri_list = "text/uri-list"; | ||
700 | 2849 | data_checked_ = true; | ||
701 | 2850 | dnd_data_.Reset(); | ||
702 | 2851 | auto& display = nux::GetWindowThread()->GetGraphicsDisplay(); | ||
703 | 2852 | |||
704 | 2853 | // get the data | ||
705 | 2854 | for (auto const& mime : mimes) | ||
706 | 2855 | { | ||
707 | 2856 | if (mime != uri_list) | ||
708 | 2857 | continue; | ||
709 | 2858 | |||
710 | 2859 | dnd_data_.Fill(display.GetDndData(const_cast<char*>(uri_list.c_str()))); | ||
711 | 2860 | break; | ||
712 | 2861 | } | ||
713 | 2862 | |||
714 | 2863 | // see if the launcher wants this one | ||
715 | 2864 | auto const& uris = dnd_data_.Uris(); | ||
716 | 2865 | if (std::find_if(uris.begin(), uris.end(), [this] (std::string const& uri) | ||
717 | 2866 | {return DndIsSpecialRequest(uri);}) != uris.end()) | ||
718 | 2867 | { | ||
719 | 2868 | steal_drag_ = true; | ||
720 | 2869 | } | ||
721 | 2870 | |||
722 | 2871 | // only set hover once we know our first x/y | ||
723 | 2872 | SetActionState(ACTION_DRAG_EXTERNAL); | ||
724 | 2873 | SetStateMouseOverLauncher(true); | ||
725 | 2874 | } | ||
726 | 2875 | |||
727 | 2876 | SetMousePosition(x - parent_->GetGeometry().x, y - parent_->GetGeometry().y); | ||
728 | 2877 | |||
729 | 2878 | if (options()->hide_mode != LAUNCHER_HIDE_NEVER) | ||
730 | 2879 | { | ||
731 | 2880 | if ((monitor() == 0 && !IsOverlayOpen() && mouse_position_.x == 0 && !drag_edge_touching_) && | ||
732 | 2881 | ((launcher_position_ == LauncherPosition::LEFT && | ||
733 | 2882 | mouse_position_.y <= (parent_->GetGeometry().height - icon_size_.CP(cv_) - 2 * SPACE_BETWEEN_ICONS.CP(cv_))) || | ||
734 | 2883 | (launcher_position_ == LauncherPosition::BOTTOM && | ||
735 | 2884 | mouse_position_.x <= (parent_->GetGeometry().width - icon_size_.CP(cv_) - 2 * SPACE_BETWEEN_ICONS.CP(cv_))))) | ||
736 | 2885 | { | ||
737 | 2886 | if (dnd_hovered_icon_) | ||
738 | 2887 | { | ||
739 | 2888 | dnd_hovered_icon_->SendDndLeave(); | ||
740 | 2889 | dnd_hovered_icon_->SetQuirk(AbstractLauncherIcon::Quirk::GLOW, false, monitor()); | ||
741 | 2890 | } | ||
742 | 2891 | |||
743 | 2892 | animation::StartOrReverse(dnd_hide_animation_, animation::Direction::FORWARD); | ||
744 | 2893 | drag_edge_touching_ = true; | ||
745 | 2894 | } | ||
746 | 2895 | else if (drag_edge_touching_ && | ||
747 | 2896 | ((launcher_position_ == LauncherPosition::LEFT && mouse_position_.x != 0) || | ||
748 | 2897 | (launcher_position_ == LauncherPosition::BOTTOM && mouse_position_.y != 0))) | ||
749 | 2898 | { | ||
750 | 2899 | animation::StartOrReverse(dnd_hide_animation_, animation::Direction::BACKWARD); | ||
751 | 2900 | drag_edge_touching_ = false; | ||
752 | 2901 | } | ||
753 | 2902 | } | ||
754 | 2903 | |||
755 | 2904 | EventLogic(); | ||
756 | 2905 | auto const& hovered_icon = MouseIconIntersection(mouse_position_.x, mouse_position_.y); | ||
757 | 2906 | |||
758 | 2907 | bool hovered_icon_is_appropriate = false; | ||
759 | 2908 | if (hovered_icon) | ||
760 | 2909 | { | ||
761 | 2910 | if (hovered_icon->GetIconType() == AbstractLauncherIcon::IconType::TRASH) | ||
762 | 2911 | steal_drag_ = false; | ||
763 | 2912 | |||
764 | 2913 | if (hovered_icon->position() == AbstractLauncherIcon::Position::FLOATING) | ||
765 | 2914 | hovered_icon_is_appropriate = true; | ||
766 | 2915 | } | ||
767 | 2916 | |||
768 | 2917 | if (steal_drag_) | ||
769 | 2918 | { | ||
770 | 2919 | drag_action_ = nux::DNDACTION_COPY; | ||
771 | 2920 | if (!dnd_hovered_icon_ && hovered_icon_is_appropriate) | ||
772 | 2921 | { | ||
773 | 2922 | dnd_hovered_icon_ = new SpacerLauncherIcon(monitor()); | ||
774 | 2923 | model_->AddIcon(dnd_hovered_icon_); | ||
775 | 2924 | model_->ReorderBefore(dnd_hovered_icon_, hovered_icon, true); | ||
776 | 2925 | } | ||
777 | 2926 | else if (dnd_hovered_icon_) | ||
778 | 2927 | { | ||
779 | 2928 | if (hovered_icon) | ||
780 | 2929 | { | ||
781 | 2930 | if (hovered_icon_is_appropriate) | ||
782 | 2931 | { | ||
783 | 2932 | model_->ReorderSmart(dnd_hovered_icon_, hovered_icon, true); | ||
784 | 2933 | } | ||
785 | 2934 | else | ||
786 | 2935 | { | ||
787 | 2936 | dnd_hovered_icon_->SetQuirk(AbstractLauncherIcon::Quirk::VISIBLE, false, monitor()); | ||
788 | 2937 | dnd_hovered_icon_->remove.emit(dnd_hovered_icon_); | ||
789 | 2938 | dnd_hovered_icon_ = nullptr; | ||
790 | 2939 | } | ||
791 | 2940 | } | ||
792 | 2941 | } | ||
793 | 2942 | } | ||
794 | 2943 | else | ||
795 | 2944 | { | ||
796 | 2945 | if (!drag_edge_touching_ && hovered_icon != dnd_hovered_icon_) | ||
797 | 2946 | { | ||
798 | 2947 | if (hovered_icon) | ||
799 | 2948 | { | ||
800 | 2949 | hovered_icon->SendDndEnter(); | ||
801 | 2950 | drag_action_ = hovered_icon->QueryAcceptDrop(dnd_data_); | ||
802 | 2951 | |||
803 | 2952 | if (drag_action_ != nux::DNDACTION_NONE) | ||
804 | 2953 | hovered_icon->SetQuirk(AbstractLauncherIcon::Quirk::GLOW, true, monitor()); | ||
805 | 2954 | } | ||
806 | 2955 | else | ||
807 | 2956 | { | ||
808 | 2957 | drag_action_ = nux::DNDACTION_NONE; | ||
809 | 2958 | } | ||
810 | 2959 | |||
811 | 2960 | if (dnd_hovered_icon_) | ||
812 | 2961 | { | ||
813 | 2962 | dnd_hovered_icon_->SendDndLeave(); | ||
814 | 2963 | dnd_hovered_icon_->SetQuirk(AbstractLauncherIcon::Quirk::GLOW, false, monitor()); | ||
815 | 2964 | } | ||
816 | 2965 | |||
817 | 2966 | dnd_hovered_icon_ = hovered_icon; | ||
818 | 2967 | } | ||
819 | 2968 | } | ||
820 | 2969 | |||
821 | 2970 | bool accept; | ||
822 | 2971 | if (drag_action_ != nux::DNDACTION_NONE) | ||
823 | 2972 | accept = true; | ||
824 | 2973 | else | ||
825 | 2974 | accept = false; | ||
826 | 2975 | |||
827 | 2976 | SendDndStatus(accept, drag_action_, nux::Geometry(x, y, 1, 1)); | ||
828 | 2977 | #endif | ||
829 | 2978 | } | ||
831 | 2979 | 2776 | ||
832 | 2980 | void Launcher::ProcessDndDrop(int x, int y) | 2777 | void Launcher::ProcessDndDrop(int x, int y) |
860 | 2981 | { | 2778 | { } |
834 | 2982 | #ifdef USE_X11 | ||
835 | 2983 | if (steal_drag_) | ||
836 | 2984 | { | ||
837 | 2985 | for (auto const& uri : dnd_data_.Uris()) | ||
838 | 2986 | { | ||
839 | 2987 | if (DndIsSpecialRequest(uri)) | ||
840 | 2988 | add_request.emit(uri, dnd_hovered_icon_); | ||
841 | 2989 | } | ||
842 | 2990 | } | ||
843 | 2991 | else if (dnd_hovered_icon_ && drag_action_ != nux::DNDACTION_NONE) | ||
844 | 2992 | { | ||
845 | 2993 | if (IsOverlayOpen()) | ||
846 | 2994 | ubus_.SendMessage(UBUS_OVERLAY_CLOSE_REQUEST); | ||
847 | 2995 | |||
848 | 2996 | dnd_hovered_icon_->AcceptDrop(dnd_data_); | ||
849 | 2997 | } | ||
850 | 2998 | |||
851 | 2999 | if (drag_action_ != nux::DNDACTION_NONE) | ||
852 | 3000 | SendDndFinished(true, drag_action_); | ||
853 | 3001 | else | ||
854 | 3002 | SendDndFinished(false, drag_action_); | ||
855 | 3003 | |||
856 | 3004 | // reset our shiz | ||
857 | 3005 | DndReset(); | ||
858 | 3006 | #endif | ||
859 | 3007 | } | ||
861 | 3008 | 2779 | ||
862 | 3009 | /* | 2780 | /* |
863 | 3010 | * Returns the current selected icon if it is in keynavmode | 2781 | * Returns the current selected icon if it is in keynavmode |
864 | @@ -3035,81 +2806,16 @@ int Launcher::GetDragDelta() const | |||
865 | 3035 | } | 2806 | } |
866 | 3036 | 2807 | ||
867 | 3037 | void Launcher::DndStarted(std::string const& data) | 2808 | void Launcher::DndStarted(std::string const& data) |
901 | 3038 | { | 2809 | { } |
869 | 3039 | #ifdef USE_X11 | ||
870 | 3040 | SetDndQuirk(); | ||
871 | 3041 | |||
872 | 3042 | dnd_data_.Fill(data.c_str()); | ||
873 | 3043 | |||
874 | 3044 | auto const& uris = dnd_data_.Uris(); | ||
875 | 3045 | if (std::find_if(uris.begin(), uris.end(), [this] (std::string const& uri) | ||
876 | 3046 | {return DndIsSpecialRequest(uri);}) != uris.end()) | ||
877 | 3047 | { | ||
878 | 3048 | steal_drag_ = true; | ||
879 | 3049 | |||
880 | 3050 | if (IsOverlayOpen()) | ||
881 | 3051 | SaturateIcons(); | ||
882 | 3052 | } | ||
883 | 3053 | else | ||
884 | 3054 | { | ||
885 | 3055 | for (auto const& it : *model_) | ||
886 | 3056 | { | ||
887 | 3057 | if (it->ShouldHighlightOnDrag(dnd_data_)) | ||
888 | 3058 | { | ||
889 | 3059 | it->SetQuirk(AbstractLauncherIcon::Quirk::DESAT, false, monitor()); | ||
890 | 3060 | it->SetQuirk(AbstractLauncherIcon::Quirk::UNFOLDED, true, monitor()); | ||
891 | 3061 | } | ||
892 | 3062 | else | ||
893 | 3063 | { | ||
894 | 3064 | it->SetQuirk(AbstractLauncherIcon::Quirk::DESAT, true, monitor()); | ||
895 | 3065 | it->SetQuirk(AbstractLauncherIcon::Quirk::UNFOLDED, false, monitor()); | ||
896 | 3066 | } | ||
897 | 3067 | } | ||
898 | 3068 | } | ||
899 | 3069 | #endif | ||
900 | 3070 | } | ||
902 | 3071 | 2810 | ||
903 | 3072 | void Launcher::DndFinished() | 2811 | void Launcher::DndFinished() |
913 | 3073 | { | 2812 | { } |
905 | 3074 | #ifdef USE_X11 | ||
906 | 3075 | UnsetDndQuirk(); | ||
907 | 3076 | |||
908 | 3077 | data_checked_ = false; | ||
909 | 3078 | |||
910 | 3079 | DndReset(); | ||
911 | 3080 | #endif | ||
912 | 3081 | } | ||
914 | 3082 | 2813 | ||
915 | 3083 | void Launcher::SetDndQuirk() | 2814 | void Launcher::SetDndQuirk() |
921 | 3084 | { | 2815 | { } |
917 | 3085 | #ifdef USE_X11 | ||
918 | 3086 | hide_machine_.SetQuirk(LauncherHideMachine::EXTERNAL_DND_ACTIVE, true); | ||
919 | 3087 | #endif | ||
920 | 3088 | } | ||
922 | 3089 | 2816 | ||
923 | 3090 | void Launcher::UnsetDndQuirk() | 2817 | void Launcher::UnsetDndQuirk() |
946 | 3091 | { | 2818 | { } |
925 | 3092 | #ifdef USE_X11 | ||
926 | 3093 | |||
927 | 3094 | if (IsOverlayOpen() && !hovered_) | ||
928 | 3095 | { | ||
929 | 3096 | DesaturateIcons(); | ||
930 | 3097 | } | ||
931 | 3098 | else | ||
932 | 3099 | { | ||
933 | 3100 | for (auto const& it : *model_) | ||
934 | 3101 | { | ||
935 | 3102 | it->SetQuirk(AbstractLauncherIcon::Quirk::DESAT, false, monitor()); | ||
936 | 3103 | it->SetQuirk(AbstractLauncherIcon::Quirk::UNFOLDED, false, monitor()); | ||
937 | 3104 | } | ||
938 | 3105 | } | ||
939 | 3106 | |||
940 | 3107 | |||
941 | 3108 | hide_machine_.SetQuirk(LauncherHideMachine::MT_DRAG_OUT, drag_out_delta_x_ >= DRAG_OUT_PIXELS - 90.0f); | ||
942 | 3109 | hide_machine_.SetQuirk(LauncherHideMachine::EXTERNAL_DND_ACTIVE, false); | ||
943 | 3110 | animation::SetValue(dnd_hide_animation_, animation::Direction::BACKWARD); | ||
944 | 3111 | #endif | ||
945 | 3112 | } | ||
947 | 3113 | 2819 | ||
948 | 3114 | } // namespace launcher | 2820 | } // namespace launcher |
949 | 3115 | } // namespace unity | 2821 | } // namespace unity |
950 | diff --git a/launcher/StandaloneLauncher.cpp b/launcher/StandaloneLauncher.cpp | |||
951 | index 0af7d0c..7795283 100644 | |||
952 | --- a/launcher/StandaloneLauncher.cpp | |||
953 | +++ b/launcher/StandaloneLauncher.cpp | |||
954 | @@ -40,7 +40,7 @@ using namespace unity; | |||
955 | 40 | 40 | ||
956 | 41 | namespace | 41 | namespace |
957 | 42 | { | 42 | { |
959 | 43 | const nux::Size win_size(1024, 768); | 43 | const nux::Size win_size(1280, 720); |
960 | 44 | const nux::Color bg_color(95/255.0f, 18/255.0f, 45/255.0f, 1.0f); | 44 | const nux::Color bg_color(95/255.0f, 18/255.0f, 45/255.0f, 1.0f); |
961 | 45 | } | 45 | } |
962 | 46 | 46 | ||
963 | diff --git a/launcher/TrashLauncherIcon.cpp b/launcher/TrashLauncherIcon.cpp | |||
964 | index 15dc9a6..edf5eea 100644 | |||
965 | --- a/launcher/TrashLauncherIcon.cpp | |||
966 | +++ b/launcher/TrashLauncherIcon.cpp | |||
967 | @@ -29,7 +29,7 @@ | |||
968 | 29 | 29 | ||
969 | 30 | #include "QuicklistMenuItemLabel.h" | 30 | #include "QuicklistMenuItemLabel.h" |
970 | 31 | #include "unity-shared/DesktopApplicationManager.h" | 31 | #include "unity-shared/DesktopApplicationManager.h" |
972 | 32 | #include "unity-shared/FileManager.h" | 32 | #include "unity-shared/GnomeFileManager.h" |
973 | 33 | 33 | ||
974 | 34 | namespace unity | 34 | namespace unity |
975 | 35 | { | 35 | { |
976 | diff --git a/lockscreen/LockScreenPanel.cpp b/lockscreen/LockScreenPanel.cpp | |||
977 | index e54e2f1..b3087a5 100644 | |||
978 | --- a/lockscreen/LockScreenPanel.cpp | |||
979 | +++ b/lockscreen/LockScreenPanel.cpp | |||
980 | @@ -37,8 +37,8 @@ namespace lockscreen | |||
981 | 37 | { | 37 | { |
982 | 38 | namespace | 38 | namespace |
983 | 39 | { | 39 | { |
986 | 40 | const RawPixel PADDING = 5_em; | 40 | const RawPixel PADDING = 14_em; |
987 | 41 | const nux::Color BG_COLOR(0.1, 0.1, 0.1, 0.4); | 41 | nux::Color BG_COLOR(0.1, 0.1, 0.1, 0.9); |
988 | 42 | } | 42 | } |
989 | 43 | 43 | ||
990 | 44 | using namespace indicator; | 44 | using namespace indicator; |
991 | diff --git a/panel/PanelController.cpp b/panel/PanelController.cpp | |||
992 | index f24eb46..c6496b7 100644 | |||
993 | --- a/panel/PanelController.cpp | |||
994 | +++ b/panel/PanelController.cpp | |||
995 | @@ -66,7 +66,7 @@ Controller::Impl::Impl(Controller* parent, menu::Manager::Ptr const& indicators, | |||
996 | 66 | : parent_(parent) | 66 | : parent_(parent) |
997 | 67 | , indicators_(indicators) | 67 | , indicators_(indicators) |
998 | 68 | , edge_barriers_(edge_barriers) | 68 | , edge_barriers_(edge_barriers) |
1000 | 69 | , opacity_(1.0f) | 69 | , opacity_(0.7f) |
1001 | 70 | , opacity_maximized_toggle_(false) | 70 | , opacity_maximized_toggle_(false) |
1002 | 71 | { | 71 | { |
1003 | 72 | UScreen* screen = UScreen::GetDefault(); | 72 | UScreen* screen = UScreen::GetDefault(); |
1004 | diff --git a/panel/PanelIndicatorsView.cpp b/panel/PanelIndicatorsView.cpp | |||
1005 | index 20f0638..8bf3c80 100644 | |||
1006 | --- a/panel/PanelIndicatorsView.cpp | |||
1007 | +++ b/panel/PanelIndicatorsView.cpp | |||
1008 | @@ -46,6 +46,7 @@ PanelIndicatorsView::PanelIndicatorsView() | |||
1009 | 46 | { | 46 | { |
1010 | 47 | opacity.DisableNotifications(); | 47 | opacity.DisableNotifications(); |
1011 | 48 | layout_->SetContentDistribution(nux::MAJOR_POSITION_END); | 48 | layout_->SetContentDistribution(nux::MAJOR_POSITION_END); |
1012 | 49 | layout_->SetLeftAndRightPadding(layout_->GetLeftPadding(), 6); | ||
1013 | 49 | SetLayout(layout_); | 50 | SetLayout(layout_); |
1014 | 50 | 51 | ||
1015 | 51 | LOG_DEBUG(logger) << "Indicators View Added: "; | 52 | LOG_DEBUG(logger) << "Indicators View Added: "; |
1016 | diff --git a/panel/PanelIndicatorsView.h b/panel/PanelIndicatorsView.h | |||
1017 | index bb11df4..8e3a1ec 100644 | |||
1018 | --- a/panel/PanelIndicatorsView.h | |||
1019 | +++ b/panel/PanelIndicatorsView.h | |||
1020 | @@ -52,7 +52,7 @@ public: | |||
1021 | 52 | typedef PanelIndicatorEntryView::IndicatorEntryType IndicatorEntryType; | 52 | typedef PanelIndicatorEntryView::IndicatorEntryType IndicatorEntryType; |
1022 | 53 | 53 | ||
1023 | 54 | PanelIndicatorEntryView* AddEntry(indicator::Entry::Ptr const& entry, | 54 | PanelIndicatorEntryView* AddEntry(indicator::Entry::Ptr const& entry, |
1025 | 55 | int padding = 5, | 55 | int padding = 9, |
1026 | 56 | IndicatorEntryPosition pos = AUTO, | 56 | IndicatorEntryPosition pos = AUTO, |
1027 | 57 | IndicatorEntryType type = IndicatorEntryType::INDICATOR); | 57 | IndicatorEntryType type = IndicatorEntryType::INDICATOR); |
1028 | 58 | void RemoveEntry(indicator::Entry::Ptr const&); | 58 | void RemoveEntry(indicator::Entry::Ptr const&); |
1029 | diff --git a/panel/PanelMenuView.cpp b/panel/PanelMenuView.cpp | |||
1030 | index 2bcdd49..abaa420 100644 | |||
1031 | --- a/panel/PanelMenuView.cpp | |||
1032 | +++ b/panel/PanelMenuView.cpp | |||
1033 | @@ -45,8 +45,8 @@ DECLARE_LOGGER(logger, "unity.panel.menu"); | |||
1034 | 45 | 45 | ||
1035 | 46 | namespace | 46 | namespace |
1036 | 47 | { | 47 | { |
1039 | 48 | const RawPixel MAIN_LEFT_PADDING = 4_em; | 48 | const RawPixel MAIN_LEFT_PADDING = 13_em; |
1040 | 49 | const RawPixel TITLE_PADDING = 2_em; | 49 | const RawPixel TITLE_PADDING = 1_em; |
1041 | 50 | const RawPixel MENUBAR_PADDING = 4_em; | 50 | const RawPixel MENUBAR_PADDING = 4_em; |
1042 | 51 | const int MENU_ENTRIES_PADDING = 6; | 51 | const int MENU_ENTRIES_PADDING = 6; |
1043 | 52 | 52 | ||
1044 | diff --git a/panel/PanelTray.cpp b/panel/PanelTray.cpp | |||
1045 | index 20be87f..afdf7d4 100644 | |||
1046 | --- a/panel/PanelTray.cpp | |||
1047 | +++ b/panel/PanelTray.cpp | |||
1048 | @@ -29,7 +29,7 @@ DECLARE_LOGGER(logger, "unity.panel.tray"); | |||
1049 | 29 | namespace | 29 | namespace |
1050 | 30 | { | 30 | { |
1051 | 31 | const std::string SETTINGS_NAME = "com.canonical.Unity.Panel"; | 31 | const std::string SETTINGS_NAME = "com.canonical.Unity.Panel"; |
1053 | 32 | const int PADDING = 3; | 32 | const int PADDING = 12; |
1054 | 33 | const std::array<std::string, 2> WHITELIST {{ "JavaEmbeddedFrame", "Wine" }}; | 33 | const std::array<std::string, 2> WHITELIST {{ "JavaEmbeddedFrame", "Wine" }}; |
1055 | 34 | } | 34 | } |
1056 | 35 | 35 | ||
1057 | @@ -63,7 +63,7 @@ PanelTray::PanelTray(int monitor) | |||
1058 | 63 | GTK_ORIENTATION_HORIZONTAL, | 63 | GTK_ORIENTATION_HORIZONTAL, |
1059 | 64 | (NaTrayFilterCallback)FilterTrayCallback, | 64 | (NaTrayFilterCallback)FilterTrayCallback, |
1060 | 65 | this); | 65 | this); |
1062 | 66 | na_tray_set_icon_size(tray_, panel_height); | 66 | na_tray_set_icon_size(tray_, panel_height-6); |
1063 | 67 | 67 | ||
1064 | 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", |
1065 | 69 | sigc::mem_fun(this, &PanelTray::OnTrayIconRemoved)); | 69 | sigc::mem_fun(this, &PanelTray::OnTrayIconRemoved)); |
1066 | @@ -97,7 +97,7 @@ Window PanelTray::xid() | |||
1067 | 97 | 97 | ||
1068 | 98 | void PanelTray::Draw(nux::GraphicsEngine& gfx_context, bool force_draw) | 98 | void PanelTray::Draw(nux::GraphicsEngine& gfx_context, bool force_draw) |
1069 | 99 | { | 99 | { |
1071 | 100 | nux::Geometry const& geo = GetAbsoluteGeometry(); | 100 | nux::Geometry geo = GetAbsoluteGeometry(); |
1072 | 101 | 101 | ||
1073 | 102 | gfx_context.PushClippingRectangle(geo); | 102 | gfx_context.PushClippingRectangle(geo); |
1074 | 103 | nux::GetPainter().PaintBackground(gfx_context, geo); | 103 | nux::GetPainter().PaintBackground(gfx_context, geo); |
1075 | diff --git a/panel/PanelView.cpp b/panel/PanelView.cpp | |||
1076 | index fd492b6..1a54ab1 100644 | |||
1077 | --- a/panel/PanelView.cpp | |||
1078 | +++ b/panel/PanelView.cpp | |||
1079 | @@ -58,7 +58,7 @@ PanelView::PanelView(MockableBaseWindow* parent, menu::Manager::Ptr const& menus | |||
1080 | 58 | , opacity_maximized_toggle_(false) | 58 | , opacity_maximized_toggle_(false) |
1081 | 59 | , needs_geo_sync_(false) | 59 | , needs_geo_sync_(false) |
1082 | 60 | , overlay_is_open_(false) | 60 | , overlay_is_open_(false) |
1084 | 61 | , opacity_(1.0f) | 61 | , opacity_(0.7f) |
1085 | 62 | , monitor_(0) | 62 | , monitor_(0) |
1086 | 63 | , stored_dash_width_(0) | 63 | , stored_dash_width_(0) |
1087 | 64 | , bg_effect_helper_(this) | 64 | , bg_effect_helper_(this) |
1088 | @@ -539,7 +539,7 @@ PanelView::UpdateBackground() | |||
1089 | 539 | 539 | ||
1090 | 540 | if (overlay_is_open_ || wm.IsScaleActive()) | 540 | if (overlay_is_open_ || wm.IsScaleActive()) |
1091 | 541 | { | 541 | { |
1093 | 542 | bg_layer_.reset(new nux::ColorLayer(wm.average_color(), true, rop)); | 542 | // bg_layer_.reset(new nux::ColorLayer(wm.average_color(), true, rop)); |
1094 | 543 | } | 543 | } |
1095 | 544 | else | 544 | else |
1096 | 545 | { | 545 | { |
1097 | diff --git a/panel/StandalonePanel.cpp b/panel/StandalonePanel.cpp | |||
1098 | index e134602..76b4c0e 100644 | |||
1099 | --- a/panel/StandalonePanel.cpp | |||
1100 | +++ b/panel/StandalonePanel.cpp | |||
1101 | @@ -41,7 +41,7 @@ using namespace unity::panel; | |||
1102 | 41 | struct PanelWindow | 41 | struct PanelWindow |
1103 | 42 | { | 42 | { |
1104 | 43 | PanelWindow() | 43 | PanelWindow() |
1106 | 44 | : wt(nux::CreateGUIThread("Unity Panel", 1024, 24, 0, &PanelWindow::ThreadWidgetInit, this)) | 44 | : wt(nux::CreateGUIThread("Unity Panel", 1024, 30, 0, &PanelWindow::ThreadWidgetInit, this)) |
1107 | 45 | , animation_controller(tick_source) | 45 | , animation_controller(tick_source) |
1108 | 46 | {} | 46 | {} |
1109 | 47 | 47 | ||
1110 | diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp | |||
1111 | index ff739f6..38f433a 100644 | |||
1112 | --- a/plugins/unityshell/src/unityshell.cpp | |||
1113 | +++ b/plugins/unityshell/src/unityshell.cpp | |||
1114 | @@ -3157,73 +3157,9 @@ bool UnityWindow::glDraw(const GLMatrix& matrix, | |||
1115 | 3157 | 3157 | ||
1116 | 3158 | auto draw_panel_shadow = DrawPanelShadow::NO; | 3158 | auto draw_panel_shadow = DrawPanelShadow::NO; |
1117 | 3159 | 3159 | ||
1118 | 3160 | if (!(mask & PAINT_WINDOW_ON_TRANSFORMED_SCREEN_MASK)) | ||
1119 | 3161 | { | ||
1120 | 3162 | Window active_window = screen->activeWindow(); | ||
1121 | 3163 | |||
1122 | 3164 | if (G_UNLIKELY(window_type == CompWindowTypeDesktopMask)) | ||
1123 | 3165 | { | ||
1124 | 3166 | uScreen->setPanelShadowMatrix(matrix); | ||
1125 | 3167 | |||
1126 | 3168 | if (active_window == 0 || active_window == window->id()) | ||
1127 | 3169 | { | ||
1128 | 3170 | if (PluginAdapter::Default().IsWindowOnTop(window->id())) | ||
1129 | 3171 | { | ||
1130 | 3172 | draw_panel_shadow = DrawPanelShadow::OVER_WINDOW; | ||
1131 | 3173 | } | ||
1132 | 3174 | uScreen->is_desktop_active_ = true; | ||
1133 | 3175 | } | ||
1134 | 3176 | } | ||
1135 | 3177 | else | ||
1136 | 3178 | { | ||
1137 | 3179 | if (window->id() == active_window) | ||
1138 | 3180 | { | ||
1139 | 3181 | draw_panel_shadow = DrawPanelShadow::BELOW_WINDOW; | ||
1140 | 3182 | uScreen->is_desktop_active_ = false; | ||
1141 | 3183 | |||
1142 | 3184 | if (!(window_state & CompWindowStateMaximizedVertMask) && | ||
1143 | 3185 | !(window_state & CompWindowStateFullscreenMask) && | ||
1144 | 3186 | !(window_type & CompWindowTypeFullscreenMask)) | ||
1145 | 3187 | { | ||
1146 | 3188 | auto const& output = uScreen->screen->currentOutputDev(); | ||
1147 | 3189 | int monitor = uScreen->WM.MonitorGeometryIn(NuxGeometryFromCompRect(output)); | ||
1148 | 3190 | |||
1149 | 3191 | if (window->y() - window->border().top < output.y() + uScreen->panel_style_.PanelHeight(monitor)) | ||
1150 | 3192 | { | ||
1151 | 3193 | draw_panel_shadow = DrawPanelShadow::OVER_WINDOW; | ||
1152 | 3194 | } | ||
1153 | 3195 | } | ||
1154 | 3196 | } | ||
1155 | 3197 | else if (uScreen->menus_->integrated_menus()) | ||
1156 | 3198 | { | ||
1157 | 3199 | draw_panel_shadow = DrawPanelShadow::BELOW_WINDOW; | ||
1158 | 3200 | } | ||
1159 | 3201 | else | ||
1160 | 3202 | { | ||
1161 | 3203 | if (uScreen->is_desktop_active_) | ||
1162 | 3204 | { | ||
1163 | 3205 | if (PluginAdapter::Default().IsWindowOnTop(window->id())) | ||
1164 | 3206 | { | ||
1165 | 3207 | draw_panel_shadow = DrawPanelShadow::OVER_WINDOW; | ||
1166 | 3208 | uScreen->panelShadowPainted = CompRegion(); | ||
1167 | 3209 | } | ||
1168 | 3210 | } | ||
1169 | 3211 | } | ||
1170 | 3212 | } | ||
1171 | 3213 | } | ||
1172 | 3214 | |||
1173 | 3215 | if (locked) | ||
1174 | 3216 | draw_panel_shadow = DrawPanelShadow::NO; | ||
1175 | 3217 | |||
1176 | 3218 | if (draw_panel_shadow == DrawPanelShadow::BELOW_WINDOW) | ||
1177 | 3219 | uScreen->paintPanelShadow(region); | ||
1178 | 3220 | |||
1179 | 3221 | deco_win_->Draw(matrix, attrib, region, mask); | 3160 | deco_win_->Draw(matrix, attrib, region, mask); |
1180 | 3222 | bool ret = gWindow->glDraw(matrix, attrib, region, mask); | 3161 | bool ret = gWindow->glDraw(matrix, attrib, region, mask); |
1181 | 3223 | 3162 | ||
1182 | 3224 | if (draw_panel_shadow == DrawPanelShadow::OVER_WINDOW) | ||
1183 | 3225 | uScreen->paintPanelShadow(region); | ||
1184 | 3226 | |||
1185 | 3227 | return ret; | 3163 | return ret; |
1186 | 3228 | } | 3164 | } |
1187 | 3229 | 3165 | ||
1188 | diff --git a/plugins/unityshell/unityshell.xml.in b/plugins/unityshell/unityshell.xml.in | |||
1189 | index 9294c5b..61afdea 100644 | |||
1190 | --- a/plugins/unityshell/unityshell.xml.in | |||
1191 | +++ b/plugins/unityshell/unityshell.xml.in | |||
1192 | @@ -104,8 +104,8 @@ | |||
1193 | 104 | <option name="panel_opacity" type="float"> | 104 | <option name="panel_opacity" type="float"> |
1194 | 105 | <_short>Panel Opacity</_short> | 105 | <_short>Panel Opacity</_short> |
1195 | 106 | <_long>The opacity of the Panel background.</_long> | 106 | <_long>The opacity of the Panel background.</_long> |
1198 | 107 | <default>1.0</default> | 107 | <default>0.75</default> |
1199 | 108 | <min>0.0</min> | 108 | <min>0.1</min> |
1200 | 109 | <max>1.0</max> | 109 | <max>1.0</max> |
1201 | 110 | <precision>0.01</precision> | 110 | <precision>0.01</precision> |
1202 | 111 | </option> | 111 | </option> |
1203 | @@ -419,7 +419,7 @@ | |||
1204 | 419 | <option name="icon_size" type="int"> | 419 | <option name="icon_size" type="int"> |
1205 | 420 | <_short>Launcher Icon Size</_short> | 420 | <_short>Launcher Icon Size</_short> |
1206 | 421 | <_long>The size of the icons in the Launcher.</_long> | 421 | <_long>The size of the icons in the Launcher.</_long> |
1208 | 422 | <default>48</default> | 422 | <default>44</default> |
1209 | 423 | <min>8</min> | 423 | <min>8</min> |
1210 | 424 | <max>64</max> | 424 | <max>64</max> |
1211 | 425 | <precision>1</precision> | 425 | <precision>1</precision> |
1212 | @@ -430,7 +430,7 @@ | |||
1213 | 430 | <_long>Change how the icons in the Launcher are backlit.</_long> | 430 | <_long>Change how the icons in the Launcher are backlit.</_long> |
1214 | 431 | <min>0</min> | 431 | <min>0</min> |
1215 | 432 | <max>4</max> | 432 | <max>4</max> |
1217 | 433 | <default>1</default> | 433 | <default>4</default> |
1218 | 434 | <desc> | 434 | <desc> |
1219 | 435 | <value>0</value> | 435 | <value>0</value> |
1220 | 436 | <_name>Backlight Always On</_name> | 436 | <_name>Backlight Always On</_name> |
1221 | diff --git a/resources/dash_sheen.png b/resources/dash_sheen.png | |||
1222 | index fb31cdb..7cceadb 100644 | |||
1223 | 437 | Binary files a/resources/dash_sheen.png and b/resources/dash_sheen.png differ | 437 | Binary files a/resources/dash_sheen.png and b/resources/dash_sheen.png differ |
1224 | diff --git a/resources/empty.png b/resources/empty.png | |||
1225 | 438 | new file mode 100644 | 438 | new file mode 100644 |
1226 | index 0000000..7cceadb | |||
1227 | 439 | Binary files /dev/null and b/resources/empty.png differ | 439 | Binary files /dev/null and b/resources/empty.png differ |
1228 | diff --git a/resources/launcher_bfb.svg b/resources/launcher_bfb.svg | |||
1229 | index 74e60e9..b6f1ccb 100644 | |||
1230 | --- a/resources/launcher_bfb.svg | |||
1231 | +++ b/resources/launcher_bfb.svg | |||
1232 | @@ -1,13 +1,126 @@ | |||
1245 | 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"?> |
1246 | 2 | <defs> | 2 | <svg |
1247 | 3 | <filter id="a" x="-.075" y="-.075" width="1.15" height="1.15" color-interpolation-filters="sRGB"> | 3 | version="1.1" |
1248 | 4 | <feGaussianBlur stdDeviation="2.4999998"/> | 4 | id="svg2" |
1249 | 5 | </filter> | 5 | width="136.53333" |
1250 | 6 | </defs> | 6 | height="136.53333" |
1251 | 7 | <image width="136.53" height="136.53" preserveAspectRatio="none" xlink:href="data:image/png;base64,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 4K+6lV/77/8DTX3gKAGJXUUAAAAASUVORK5CYII= "/> | 7 | viewBox="0 0 136.53333 136.53333" |
1252 | 8 | <g> | 8 | sodipodi:docname="launcher_bfb.svg" |
1253 | 9 | <ellipse cx="68.267" cy="68.267" rx="40" ry="40" fill="#9005d5"/> | 9 | inkscape:export-filename="/home/muqtadir/Desktop/unity-orb1.png" |
1254 | 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" |
1255 | 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" |
1256 | 12 | </g> | 12 | inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)" |
1257 | 13 | xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||
1258 | 14 | xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||
1259 | 15 | xmlns:xlink="http://www.w3.org/1999/xlink" | ||
1260 | 16 | xmlns="http://www.w3.org/2000/svg" | ||
1261 | 17 | xmlns:svg="http://www.w3.org/2000/svg" | ||
1262 | 18 | xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
1263 | 19 | xmlns:cc="http://creativecommons.org/ns#" | ||
1264 | 20 | xmlns:dc="http://purl.org/dc/elements/1.1/"> | ||
1265 | 21 | <metadata | ||
1266 | 22 | id="metadata8"> | ||
1267 | 23 | <rdf:RDF> | ||
1268 | 24 | <cc:Work | ||
1269 | 25 | rdf:about=""> | ||
1270 | 26 | <dc:format>image/svg+xml</dc:format> | ||
1271 | 27 | <dc:type | ||
1272 | 28 | rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||
1273 | 29 | <dc:title /> | ||
1274 | 30 | </cc:Work> | ||
1275 | 31 | </rdf:RDF> | ||
1276 | 32 | </metadata> | ||
1277 | 33 | <defs | ||
1278 | 34 | id="defs6"> | ||
1279 | 35 | <linearGradient | ||
1280 | 36 | inkscape:collect="always" | ||
1281 | 37 | xlink:href="#linearGradient927" | ||
1282 | 38 | id="linearGradient1686-0" | ||
1283 | 39 | x1="321.99991" | ||
1284 | 40 | y1="84.000153" | ||
1285 | 41 | x2="365.99991" | ||
1286 | 42 | y2="84.000153" | ||
1287 | 43 | gradientUnits="userSpaceOnUse" | ||
1288 | 44 | gradientTransform="matrix(0,2.9046321,-2.9677501,0,317.55806,-932.37102)" /> | ||
1289 | 45 | <linearGradient | ||
1290 | 46 | inkscape:collect="always" | ||
1291 | 47 | id="linearGradient927"> | ||
1292 | 48 | <stop | ||
1293 | 49 | style="stop-color:#f3e6fa;stop-opacity:1" | ||
1294 | 50 | offset="0" | ||
1295 | 51 | id="stop923" /> | ||
1296 | 52 | <stop | ||
1297 | 53 | id="stop933" | ||
1298 | 54 | offset="0.125" | ||
1299 | 55 | style="stop-color:#f3e6fa;stop-opacity:0.09803922" /> | ||
1300 | 56 | <stop | ||
1301 | 57 | id="stop931" | ||
1302 | 58 | offset="0.92500001" | ||
1303 | 59 | style="stop-color:#f3e6fa;stop-opacity:0.09803922" /> | ||
1304 | 60 | <stop | ||
1305 | 61 | style="stop-color:#f3e6fa;stop-opacity:0.49803922" | ||
1306 | 62 | offset="1" | ||
1307 | 63 | id="stop925" /> | ||
1308 | 64 | </linearGradient> | ||
1309 | 65 | </defs> | ||
1310 | 66 | <sodipodi:namedview | ||
1311 | 67 | pagecolor="#3d3d3d" | ||
1312 | 68 | bordercolor="#666666" | ||
1313 | 69 | borderopacity="1" | ||
1314 | 70 | objecttolerance="10" | ||
1315 | 71 | gridtolerance="10" | ||
1316 | 72 | guidetolerance="10" | ||
1317 | 73 | inkscape:pageopacity="0" | ||
1318 | 74 | inkscape:pageshadow="2" | ||
1319 | 75 | inkscape:window-width="1920" | ||
1320 | 76 | inkscape:window-height="965" | ||
1321 | 77 | id="namedview4" | ||
1322 | 78 | showgrid="false" | ||
1323 | 79 | units="px" | ||
1324 | 80 | inkscape:zoom="2.5" | ||
1325 | 81 | inkscape:cx="80.2" | ||
1326 | 82 | inkscape:cy="76.6" | ||
1327 | 83 | inkscape:window-x="0" | ||
1328 | 84 | inkscape:window-y="36" | ||
1329 | 85 | inkscape:window-maximized="1" | ||
1330 | 86 | inkscape:current-layer="svg2" | ||
1331 | 87 | inkscape:document-rotation="0" | ||
1332 | 88 | inkscape:pagecheckerboard="0" /> | ||
1333 | 89 | <path | ||
1334 | 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" | ||
1335 | 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" | ||
1336 | 92 | id="path1020" | ||
1337 | 93 | inkscape:connector-curvature="0" | ||
1338 | 94 | sodipodi:nodetypes="sccsccccccsscccscsccsss" /> | ||
1339 | 95 | <path | ||
1340 | 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" | ||
1341 | 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" | ||
1342 | 98 | id="path964" | ||
1343 | 99 | inkscape:connector-curvature="0" | ||
1344 | 100 | sodipodi:nodetypes="scccssscsss" /> | ||
1345 | 101 | <path | ||
1346 | 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" | ||
1347 | 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" | ||
1348 | 104 | id="path962" | ||
1349 | 105 | inkscape:connector-curvature="0" | ||
1350 | 106 | sodipodi:nodetypes="ccssscccc" /> | ||
1351 | 107 | <path | ||
1352 | 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" | ||
1353 | 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" | ||
1354 | 110 | id="path958" | ||
1355 | 111 | inkscape:connector-curvature="0" | ||
1356 | 112 | sodipodi:nodetypes="scccssscsss" /> | ||
1357 | 113 | <path | ||
1358 | 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" | ||
1359 | 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" | ||
1360 | 116 | id="path964-3" | ||
1361 | 117 | inkscape:connector-curvature="0" /> | ||
1362 | 118 | <path | ||
1363 | 119 | id="path12" | ||
1364 | 120 | style="fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.0633053;stroke-linejoin:round;paint-order:stroke markers fill" | ||
1365 | 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" /> | ||
1366 | 122 | <path | ||
1367 | 123 | id="path12-3" | ||
1368 | 124 | style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.0633053;stroke-linejoin:round;paint-order:stroke markers fill" | ||
1369 | 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" /> | ||
1370 | 13 | </svg> | 126 | </svg> |
1371 | diff --git a/resources/panel_shadow.png b/resources/panel_shadow.png | |||
1372 | index d76818a..7cceadb 100644 | |||
1373 | 14 | Binary files a/resources/panel_shadow.png and b/resources/panel_shadow.png differ | 127 | Binary files a/resources/panel_shadow.png and b/resources/panel_shadow.png differ |
1374 | diff --git a/resources/refine_gradient_dash.png b/resources/refine_gradient_dash.png | |||
1375 | index 17214cc..7cceadb 100644 | |||
1376 | 15 | Binary files a/resources/refine_gradient_dash.png and b/resources/refine_gradient_dash.png differ | 128 | Binary files a/resources/refine_gradient_dash.png and b/resources/refine_gradient_dash.png differ |
1377 | diff --git a/resources/refine_gradient_panel.png b/resources/refine_gradient_panel.png | |||
1378 | index 0b58160..7cceadb 100644 | |||
1379 | 16 | Binary files a/resources/refine_gradient_panel.png and b/resources/refine_gradient_panel.png differ | 129 | Binary files a/resources/refine_gradient_panel.png and b/resources/refine_gradient_panel.png differ |
1380 | diff --git a/resources/refine_gradient_panel_single_column.png b/resources/refine_gradient_panel_single_column.png | |||
1381 | index 38b9b49..7cceadb 100644 | |||
1382 | 17 | Binary files a/resources/refine_gradient_panel_single_column.png and b/resources/refine_gradient_panel_single_column.png differ | 130 | Binary files a/resources/refine_gradient_panel_single_column.png and b/resources/refine_gradient_panel_single_column.png differ |
1383 | diff --git a/shutdown/SessionButton.cpp b/shutdown/SessionButton.cpp | |||
1384 | index 61a6e8e..6762c88 100644 | |||
1385 | --- a/shutdown/SessionButton.cpp | |||
1386 | +++ b/shutdown/SessionButton.cpp | |||
1387 | @@ -132,11 +132,11 @@ void Button::UpdateTextures(std::string const& texture_prefix) | |||
1388 | 132 | { | 132 | { |
1389 | 133 | auto const& theme = theme::Settings::Get(); | 133 | auto const& theme = theme::Settings::Get(); |
1390 | 134 | auto texture_path = theme->ThemedFilePath(texture_prefix, {PKGDATADIR}); | 134 | auto texture_path = theme->ThemedFilePath(texture_prefix, {PKGDATADIR}); |
1392 | 135 | RawPixel const texture_size = GetDefaultMaxTextureSize(texture_path); | 135 | RawPixel const texture_size = GetDefaultMaxTextureSize(texture_path) * 0.8; |
1393 | 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)); |
1394 | 137 | 137 | ||
1395 | 138 | auto texture_highlight_path = theme->ThemedFilePath(texture_prefix + "_highlight", {PKGDATADIR}); | 138 | auto texture_highlight_path = theme->ThemedFilePath(texture_prefix + "_highlight", {PKGDATADIR}); |
1397 | 139 | RawPixel const texture_highlight_size = GetDefaultMaxTextureSize(texture_path); | 139 | RawPixel const texture_highlight_size = GetDefaultMaxTextureSize(texture_path) * 0.8; |
1398 | 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)); |
1399 | 141 | } | 141 | } |
1400 | 142 | 142 | ||
1401 | diff --git a/shutdown/SessionView.cpp b/shutdown/SessionView.cpp | |||
1402 | index 422e3c9..a5667c2 100644 | |||
1403 | --- a/shutdown/SessionView.cpp | |||
1404 | +++ b/shutdown/SessionView.cpp | |||
1405 | @@ -39,7 +39,7 @@ namespace style | |||
1406 | 39 | RawPixel const LEFT_RIGHT_PADDING = 30_em; | 39 | RawPixel const LEFT_RIGHT_PADDING = 30_em; |
1407 | 40 | RawPixel const TOP_PADDING = 19_em; | 40 | RawPixel const TOP_PADDING = 19_em; |
1408 | 41 | RawPixel const BOTTOM_PADDING = 12_em; | 41 | RawPixel const BOTTOM_PADDING = 12_em; |
1410 | 42 | RawPixel const MAIN_SPACE = 10_em; | 42 | RawPixel const MAIN_SPACE = 17_em; |
1411 | 43 | RawPixel const BUTTONS_SPACE = 20_em; | 43 | RawPixel const BUTTONS_SPACE = 20_em; |
1412 | 44 | } | 44 | } |
1413 | 45 | 45 | ||
1414 | diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt | |||
1415 | index 58a8b10..82d92aa 100644 | |||
1416 | --- a/tests/CMakeLists.txt | |||
1417 | +++ b/tests/CMakeLists.txt | |||
1418 | @@ -281,7 +281,6 @@ if (GMOCK_LIB AND | |||
1419 | 281 | add_unity_test_xless (launcher-options) | 281 | add_unity_test_xless (launcher-options) |
1420 | 282 | add_unity_test_xless (layout-system) | 282 | add_unity_test_xless (layout-system) |
1421 | 283 | add_unity_test_xless (model-iterator) | 283 | add_unity_test_xless (model-iterator) |
1422 | 284 | add_unity_test_xless (previews) | ||
1423 | 285 | add_unity_test_xless (raw-pixel) | 284 | add_unity_test_xless (raw-pixel) |
1424 | 286 | add_unity_test_xless (scope-data) | 285 | add_unity_test_xless (scope-data) |
1425 | 287 | add_unity_test_xless (time-util) | 286 | add_unity_test_xless (time-util) |
1426 | @@ -382,7 +381,6 @@ if (ENABLE_X_SUPPORT) | |||
1427 | 382 | add_unity_test (dash-controller) | 381 | add_unity_test (dash-controller) |
1428 | 383 | add_unity_test (desktop-launcher-icon) | 382 | add_unity_test (desktop-launcher-icon) |
1429 | 384 | add_unity_test (device-launcher-section) | 383 | add_unity_test (device-launcher-section) |
1430 | 385 | add_unity_test (error-preview) | ||
1431 | 386 | add_unity_test (edge-barrier-controller) | 384 | add_unity_test (edge-barrier-controller) |
1432 | 387 | add_unity_test (expo-launcher-icon) | 385 | add_unity_test (expo-launcher-icon) |
1433 | 388 | add_unity_test (file-manager-launcher-icon) | 386 | add_unity_test (file-manager-launcher-icon) |
1434 | @@ -418,14 +416,6 @@ if (ENABLE_X_SUPPORT) | |||
1435 | 418 | add_unity_test (panel-tray) | 416 | add_unity_test (panel-tray) |
1436 | 419 | add_unity_test (panel-view) | 417 | add_unity_test (panel-view) |
1437 | 420 | add_unity_test (places-group) | 418 | add_unity_test (places-group) |
1438 | 421 | add_unity_test (preview-player) | ||
1439 | 422 | add_unity_test (previews-application) | ||
1440 | 423 | add_unity_test (previews-generic) | ||
1441 | 424 | add_unity_test (previews-movie) | ||
1442 | 425 | add_unity_test (previews-music) | ||
1443 | 426 | add_unity_test (previews-music-payment) | ||
1444 | 427 | add_unity_test (previews-payment) | ||
1445 | 428 | add_unity_test (previews-social) | ||
1446 | 429 | add_unity_test (quicklist-manager) | 419 | add_unity_test (quicklist-manager) |
1447 | 430 | add_unity_test (quicklist-menu-item) | 420 | add_unity_test (quicklist-menu-item) |
1448 | 431 | add_unity_test (quicklist-view) | 421 | add_unity_test (quicklist-view) |
1449 | diff --git a/tests/mock_key_grabber.h b/tests/mock_key_grabber.h | |||
1450 | index 2c271ca..27bccd1 100644 | |||
1451 | --- a/tests/mock_key_grabber.h | |||
1452 | +++ b/tests/mock_key_grabber.h | |||
1453 | @@ -18,7 +18,7 @@ | |||
1454 | 18 | * | 18 | * |
1455 | 19 | */ | 19 | */ |
1456 | 20 | 20 | ||
1458 | 21 | #include "KeyGrabber.h" | 21 | #include "unity-shared/KeyGrabber.h" |
1459 | 22 | #include <gmock/gmock.h> | 22 | #include <gmock/gmock.h> |
1460 | 23 | 23 | ||
1461 | 24 | namespace unity | 24 | namespace unity |
1462 | diff --git a/tests/test_error_preview.cpp b/tests/test_error_preview.cpp | |||
1463 | 25 | deleted file mode 100644 | 25 | deleted file mode 100644 |
1464 | index a339e0d..0000000 | |||
1465 | --- a/tests/test_error_preview.cpp | |||
1466 | +++ /dev/null | |||
1467 | @@ -1,109 +0,0 @@ | |||
1468 | 1 | /* | ||
1469 | 2 | * Copyright 2012-2013 Canonical Ltd. | ||
1470 | 3 | * | ||
1471 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
1472 | 5 | * under the terms of the GNU Lesser General Public License version 3, as | ||
1473 | 6 | * published by the Free Software Foundation. | ||
1474 | 7 | * | ||
1475 | 8 | * This program is distributed in the hope that it will be useful, but | ||
1476 | 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of | ||
1477 | 10 | * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR | ||
1478 | 11 | * PURPOSE. See the applicable version of the GNU Lesser General Public | ||
1479 | 12 | * License for more details. | ||
1480 | 13 | * | ||
1481 | 14 | * You should have received a copy of both the GNU Lesser General Public | ||
1482 | 15 | * License version 3 along with this program. If not, see | ||
1483 | 16 | * <http://www.gnu.org/licenses/> | ||
1484 | 17 | * | ||
1485 | 18 | * Authored by: Diego Sarmentero <diego.sarmentero@canonical.com> | ||
1486 | 19 | * | ||
1487 | 20 | */ | ||
1488 | 21 | #include <list> | ||
1489 | 22 | #include <gmock/gmock.h> | ||
1490 | 23 | using namespace testing; | ||
1491 | 24 | |||
1492 | 25 | #include <Nux/Nux.h> | ||
1493 | 26 | #include <Nux/BaseWindow.h> | ||
1494 | 27 | #include <unity-shared/StaticCairoText.h> | ||
1495 | 28 | #include <unity-shared/DashStyle.h> | ||
1496 | 29 | #include <unity-shared/PreviewStyle.h> | ||
1497 | 30 | #include <unity-shared/ThumbnailGenerator.h> | ||
1498 | 31 | |||
1499 | 32 | #include <unity-protocol.h> | ||
1500 | 33 | #include "dash/previews/ErrorPreview.h" | ||
1501 | 34 | #include "test_utils.h" | ||
1502 | 35 | |||
1503 | 36 | namespace unity | ||
1504 | 37 | { | ||
1505 | 38 | |||
1506 | 39 | namespace dash | ||
1507 | 40 | { | ||
1508 | 41 | |||
1509 | 42 | namespace previews | ||
1510 | 43 | { | ||
1511 | 44 | |||
1512 | 45 | class ErrorPreviewMock : public ErrorPreview | ||
1513 | 46 | { | ||
1514 | 47 | public: | ||
1515 | 48 | ErrorPreviewMock(dash::Preview::Ptr preview_model) | ||
1516 | 49 | : ErrorPreview(preview_model){} | ||
1517 | 50 | ~ErrorPreviewMock(){} | ||
1518 | 51 | |||
1519 | 52 | using ErrorPreview::intro_; | ||
1520 | 53 | using ErrorPreview::title_; | ||
1521 | 54 | using ErrorPreview::subtitle_; | ||
1522 | 55 | using ErrorPreview::purchase_hint_; | ||
1523 | 56 | using ErrorPreview::purchase_prize_; | ||
1524 | 57 | using ErrorPreview::purchase_type_; | ||
1525 | 58 | }; | ||
1526 | 59 | |||
1527 | 60 | class TestErrorPreview : public Test | ||
1528 | 61 | { | ||
1529 | 62 | protected: | ||
1530 | 63 | TestErrorPreview() : | ||
1531 | 64 | Test(), | ||
1532 | 65 | parent_window_(new nux::BaseWindow("TestErrorPayment")) | ||
1533 | 66 | { | ||
1534 | 67 | title = "Turning Japanese"; | ||
1535 | 68 | subtitle = "The vapors"; | ||
1536 | 69 | header = "Hi test, you purchased in the past from Ubuntu One."; | ||
1537 | 70 | purchase_prize = "65$"; | ||
1538 | 71 | purchase_type = "Mp3"; | ||
1539 | 72 | preview_type = UNITY_PROTOCOL_PREVIEW_PAYMENT_TYPE_ERROR; | ||
1540 | 73 | |||
1541 | 74 | glib::Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_payment_preview_new())); | ||
1542 | 75 | |||
1543 | 76 | unity_protocol_preview_set_title(proto_obj, title.c_str()); | ||
1544 | 77 | unity_protocol_preview_set_subtitle(proto_obj, subtitle.c_str()); | ||
1545 | 78 | |||
1546 | 79 | unity_protocol_payment_preview_set_header(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), header.c_str()); | ||
1547 | 80 | unity_protocol_payment_preview_set_purchase_prize(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), purchase_prize.c_str()); | ||
1548 | 81 | unity_protocol_payment_preview_set_purchase_type(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), purchase_type.c_str()); | ||
1549 | 82 | unity_protocol_payment_preview_set_preview_type(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), preview_type); | ||
1550 | 83 | |||
1551 | 84 | glib::Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), glib::StealRef()); | ||
1552 | 85 | |||
1553 | 86 | preview_model = dash::Preview::PreviewForVariant(v); | ||
1554 | 87 | |||
1555 | 88 | } | ||
1556 | 89 | |||
1557 | 90 | nux::ObjectPtr<nux::BaseWindow> parent_window_; | ||
1558 | 91 | dash::Preview::Ptr preview_model; | ||
1559 | 92 | |||
1560 | 93 | // testing data | ||
1561 | 94 | std::string title; | ||
1562 | 95 | std::string subtitle; | ||
1563 | 96 | std::string header; | ||
1564 | 97 | std::string purchase_prize; | ||
1565 | 98 | std::string purchase_type; | ||
1566 | 99 | UnityProtocolPreviewPaymentType preview_type; | ||
1567 | 100 | |||
1568 | 101 | // needed for styles | ||
1569 | 102 | dash::Style dash_style; | ||
1570 | 103 | }; | ||
1571 | 104 | |||
1572 | 105 | } // previews | ||
1573 | 106 | |||
1574 | 107 | } // dash | ||
1575 | 108 | |||
1576 | 109 | } // unity | ||
1577 | diff --git a/tests/test_launcher.cpp b/tests/test_launcher.cpp | |||
1578 | index d49f886..dddba10 100644 | |||
1579 | --- a/tests/test_launcher.cpp | |||
1580 | +++ b/tests/test_launcher.cpp | |||
1581 | @@ -205,33 +205,6 @@ struct TestWindowCompositor | |||
1582 | 205 | } | 205 | } |
1583 | 206 | }; | 206 | }; |
1584 | 207 | 207 | ||
1585 | 208 | TEST_F(TestLauncher, TestQuirksDuringDnd) | ||
1586 | 209 | { | ||
1587 | 210 | MockMockLauncherIcon::Ptr first(new MockMockLauncherIcon::Nice); | ||
1588 | 211 | model_->AddIcon(first); | ||
1589 | 212 | |||
1590 | 213 | MockMockLauncherIcon::Ptr second(new MockMockLauncherIcon::Nice); | ||
1591 | 214 | model_->AddIcon(second); | ||
1592 | 215 | |||
1593 | 216 | MockMockLauncherIcon::Ptr third(new MockMockLauncherIcon::Nice); | ||
1594 | 217 | model_->AddIcon(third); | ||
1595 | 218 | |||
1596 | 219 | EXPECT_CALL(*first, ShouldHighlightOnDrag(_)) | ||
1597 | 220 | .WillRepeatedly(Return(true)); | ||
1598 | 221 | |||
1599 | 222 | EXPECT_CALL(*second, ShouldHighlightOnDrag(_)) | ||
1600 | 223 | .WillRepeatedly(Return(true)); | ||
1601 | 224 | |||
1602 | 225 | EXPECT_CALL(*third, ShouldHighlightOnDrag(_)) | ||
1603 | 226 | .WillRepeatedly(Return(false)); | ||
1604 | 227 | |||
1605 | 228 | launcher_->DndStarted(""); | ||
1606 | 229 | |||
1607 | 230 | EXPECT_FALSE(first->GetQuirk(launcher::AbstractLauncherIcon::Quirk::DESAT, launcher_->monitor())); | ||
1608 | 231 | EXPECT_FALSE(second->GetQuirk(launcher::AbstractLauncherIcon::Quirk::DESAT, launcher_->monitor())); | ||
1609 | 232 | EXPECT_TRUE(third->GetQuirk(launcher::AbstractLauncherIcon::Quirk::DESAT, launcher_->monitor())); | ||
1610 | 233 | } | ||
1611 | 234 | |||
1612 | 235 | TEST_F(TestLauncher, TestMouseWheelScroll) | 208 | TEST_F(TestLauncher, TestMouseWheelScroll) |
1613 | 236 | { | 209 | { |
1614 | 237 | MockMockLauncherIcon::Ptr icon(new MockMockLauncherIcon::Nice); | 210 | MockMockLauncherIcon::Ptr icon(new MockMockLauncherIcon::Nice); |
1615 | @@ -496,17 +469,6 @@ TEST_F(TestLauncher, DragLauncherIconHidesOutsideLauncherEmitsMouseEnter) | |||
1616 | 496 | EXPECT_FALSE(mouse_entered); | 469 | EXPECT_FALSE(mouse_entered); |
1617 | 497 | } | 470 | } |
1618 | 498 | 471 | ||
1619 | 499 | TEST_F(TestLauncher, EdgeReleasesDuringDnd) | ||
1620 | 500 | { | ||
1621 | 501 | auto barrier = std::make_shared<ui::PointerBarrierWrapper>(); | ||
1622 | 502 | auto event = std::make_shared<ui::BarrierEvent>(0, 0, 0, 100); | ||
1623 | 503 | |||
1624 | 504 | launcher_->DndStarted(""); | ||
1625 | 505 | |||
1626 | 506 | EXPECT_EQ(launcher_->HandleBarrierEvent(barrier, event), | ||
1627 | 507 | ui::EdgeBarrierSubscriber::Result::NEEDS_RELEASE); | ||
1628 | 508 | } | ||
1629 | 509 | |||
1630 | 510 | TEST_F(TestLauncher, EdgeBarriersIgnoreEvents) | 472 | TEST_F(TestLauncher, EdgeBarriersIgnoreEvents) |
1631 | 511 | { | 473 | { |
1632 | 512 | auto const& launcher_geo = launcher_->GetAbsoluteGeometry(); | 474 | auto const& launcher_geo = launcher_->GetAbsoluteGeometry(); |
1633 | @@ -618,26 +580,6 @@ TEST_F(TestLauncher, DndIsSpecialRequest) | |||
1634 | 618 | EXPECT_FALSE(launcher_->DndIsSpecialRequest("file://full/path/to/MyFile.txt")); | 580 | EXPECT_FALSE(launcher_->DndIsSpecialRequest("file://full/path/to/MyFile.txt")); |
1635 | 619 | } | 581 | } |
1636 | 620 | 582 | ||
1637 | 621 | TEST_F(TestLauncher, AddRequestSignal) | ||
1638 | 622 | { | ||
1639 | 623 | auto const& icons = AddMockIcons(1); | ||
1640 | 624 | auto const& center = icons[0]->GetCenter(launcher_->monitor()); | ||
1641 | 625 | launcher_->ProcessDndEnter(); | ||
1642 | 626 | launcher_->FakeProcessDndMove(center.x, center.y, {"application://MyFile.desktop"}); | ||
1643 | 627 | |||
1644 | 628 | bool add_request = false; | ||
1645 | 629 | launcher_->add_request.connect([&] (std::string const& uri, AbstractLauncherIcon::Ptr const& drop_icon) { | ||
1646 | 630 | EXPECT_EQ(drop_icon, icons[0]); | ||
1647 | 631 | EXPECT_EQ(uri, "application://MyFile.desktop"); | ||
1648 | 632 | add_request = true; | ||
1649 | 633 | }); | ||
1650 | 634 | |||
1651 | 635 | launcher_->ProcessDndDrop(center.x, center.y); | ||
1652 | 636 | launcher_->ProcessDndLeave(); | ||
1653 | 637 | |||
1654 | 638 | EXPECT_TRUE(add_request); | ||
1655 | 639 | } | ||
1656 | 640 | |||
1657 | 641 | TEST_F(TestLauncher, IconStartingPulseValue) | 583 | TEST_F(TestLauncher, IconStartingPulseValue) |
1658 | 642 | { | 584 | { |
1659 | 643 | MockMockLauncherIcon::Ptr icon(new MockMockLauncherIcon::Nice); | 585 | MockMockLauncherIcon::Ptr icon(new MockMockLauncherIcon::Nice); |
1660 | diff --git a/tests/test_launcher_controller.cpp b/tests/test_launcher_controller.cpp | |||
1661 | index 9495dff..2f74271 100644 | |||
1662 | --- a/tests/test_launcher_controller.cpp | |||
1663 | +++ b/tests/test_launcher_controller.cpp | |||
1664 | @@ -1758,46 +1758,6 @@ TEST_F(TestLauncherController, DisconnectWMSignalsOnDestruction) | |||
1665 | 1758 | color_property.changed.emit(nux::color::RandomColor()); | 1758 | color_property.changed.emit(nux::color::RandomColor()); |
1666 | 1759 | } | 1759 | } |
1667 | 1760 | 1760 | ||
1668 | 1761 | TEST_F(TestLauncherController, DragAndDrop_MultipleLaunchers) | ||
1669 | 1762 | { | ||
1670 | 1763 | lc.multiple_launchers = true; | ||
1671 | 1764 | uscreen.SetupFakeMultiMonitor(); | ||
1672 | 1765 | lc.options()->hide_mode = LAUNCHER_HIDE_AUTOHIDE; | ||
1673 | 1766 | unsigned monitor = 0; | ||
1674 | 1767 | unsigned old_monitor = -1; | ||
1675 | 1768 | |||
1676 | 1769 | auto check_fn = [this](int index) { | ||
1677 | 1770 | return lc.launchers()[index]->Hidden(); | ||
1678 | 1771 | }; | ||
1679 | 1772 | |||
1680 | 1773 | ON_CALL(*xdnd_manager_, Monitor()).WillByDefault(ReturnPointee(&monitor)); | ||
1681 | 1774 | xdnd_manager_->dnd_started.emit("my_awesome_file", monitor); | ||
1682 | 1775 | |||
1683 | 1776 | for (unsigned i = 0; i < monitors::MAX; ++i) | ||
1684 | 1777 | { | ||
1685 | 1778 | Utils::WaitUntilMSec(std::bind(check_fn, i), i != monitor); | ||
1686 | 1779 | ASSERT_EQ(i != monitor, check_fn(i)); | ||
1687 | 1780 | } | ||
1688 | 1781 | |||
1689 | 1782 | old_monitor = monitor; | ||
1690 | 1783 | monitor = 3; | ||
1691 | 1784 | xdnd_manager_->monitor_changed.emit("another_file", old_monitor, monitor); | ||
1692 | 1785 | |||
1693 | 1786 | for (unsigned i = 0; i < monitors::MAX; ++i) | ||
1694 | 1787 | { | ||
1695 | 1788 | Utils::WaitUntilMSec(std::bind(check_fn, i), i != monitor); | ||
1696 | 1789 | ASSERT_EQ(i != monitor, check_fn(i)); | ||
1697 | 1790 | } | ||
1698 | 1791 | |||
1699 | 1792 | xdnd_manager_->dnd_finished.emit(); | ||
1700 | 1793 | |||
1701 | 1794 | for (unsigned i = 0; i < monitors::MAX; ++i) | ||
1702 | 1795 | { | ||
1703 | 1796 | Utils::WaitUntilMSec(std::bind(check_fn, i), true); | ||
1704 | 1797 | ASSERT_TRUE(check_fn(i)); | ||
1705 | 1798 | } | ||
1706 | 1799 | } | ||
1707 | 1800 | |||
1708 | 1801 | TEST_F(TestLauncherController, DragAndDrop_SingleLauncher) | 1761 | TEST_F(TestLauncherController, DragAndDrop_SingleLauncher) |
1709 | 1802 | { | 1762 | { |
1710 | 1803 | lc.multiple_launchers = false; | 1763 | lc.multiple_launchers = false; |
1711 | @@ -1824,87 +1784,6 @@ TEST_F(TestLauncherController, DragAndDrop_SingleLauncher) | |||
1712 | 1824 | Utils::WaitUntilMSec(check_fn, true); | 1784 | Utils::WaitUntilMSec(check_fn, true); |
1713 | 1825 | } | 1785 | } |
1714 | 1826 | 1786 | ||
1715 | 1827 | TEST_F(TestLauncherController, DragAndDrop_MultipleLaunchers_DesaturateIcons) | ||
1716 | 1828 | { | ||
1717 | 1829 | lc.multiple_launchers = true; | ||
1718 | 1830 | uscreen.SetupFakeMultiMonitor(); | ||
1719 | 1831 | unsigned monitor = 0; | ||
1720 | 1832 | unsigned old_monitor = -1; | ||
1721 | 1833 | auto const& model = lc.Impl()->model_; | ||
1722 | 1834 | |||
1723 | 1835 | ON_CALL(*xdnd_manager_, Monitor()).WillByDefault(ReturnPointee(&monitor)); | ||
1724 | 1836 | xdnd_manager_->dnd_started.emit("my_awesome_file", monitor); | ||
1725 | 1837 | |||
1726 | 1838 | for (auto const& icon : *model) | ||
1727 | 1839 | { | ||
1728 | 1840 | bool is_trash = icon->GetIconType() == AbstractLauncherIcon::IconType::TRASH; | ||
1729 | 1841 | |||
1730 | 1842 | for (unsigned i = 0; i < monitors::MAX; ++i) | ||
1731 | 1843 | ASSERT_EQ(monitor == i && !is_trash, icon->GetQuirk(AbstractLauncherIcon::Quirk::DESAT, i)); | ||
1732 | 1844 | } | ||
1733 | 1845 | |||
1734 | 1846 | old_monitor = monitor; | ||
1735 | 1847 | monitor = 3; | ||
1736 | 1848 | xdnd_manager_->monitor_changed.emit("another_file", old_monitor, monitor); | ||
1737 | 1849 | |||
1738 | 1850 | for (auto const& icon : *model) | ||
1739 | 1851 | { | ||
1740 | 1852 | bool is_trash = icon->GetIconType() == AbstractLauncherIcon::IconType::TRASH; | ||
1741 | 1853 | |||
1742 | 1854 | for (unsigned i = 0; i < monitors::MAX; ++i) | ||
1743 | 1855 | ASSERT_EQ(monitor == i && !is_trash, icon->GetQuirk(AbstractLauncherIcon::Quirk::DESAT, i)); | ||
1744 | 1856 | } | ||
1745 | 1857 | |||
1746 | 1858 | xdnd_manager_->dnd_finished.emit(); | ||
1747 | 1859 | |||
1748 | 1860 | for (auto const& icon : *model) | ||
1749 | 1861 | { | ||
1750 | 1862 | for (unsigned i = 0; i < monitors::MAX; ++i) | ||
1751 | 1863 | ASSERT_FALSE(icon->GetQuirk(AbstractLauncherIcon::Quirk::DESAT, i)); | ||
1752 | 1864 | } | ||
1753 | 1865 | } | ||
1754 | 1866 | |||
1755 | 1867 | TEST_F(TestLauncherController, DragAndDrop_SingleLauncher_DesaturateIcons) | ||
1756 | 1868 | { | ||
1757 | 1869 | lc.multiple_launchers = false; | ||
1758 | 1870 | unsigned monitor = 2; | ||
1759 | 1871 | unsigned old_monitor = -1; | ||
1760 | 1872 | uscreen.SetupFakeMultiMonitor(monitor); | ||
1761 | 1873 | lc.options()->hide_mode = LAUNCHER_HIDE_AUTOHIDE; | ||
1762 | 1874 | auto const& model = lc.Impl()->model_; | ||
1763 | 1875 | |||
1764 | 1876 | ON_CALL(*xdnd_manager_, Monitor()).WillByDefault(ReturnPointee(&monitor)); | ||
1765 | 1877 | xdnd_manager_->dnd_started.emit("my_awesome_file", monitor); | ||
1766 | 1878 | |||
1767 | 1879 | for (auto const& icon : *model) | ||
1768 | 1880 | { | ||
1769 | 1881 | bool is_trash = icon->GetIconType() == AbstractLauncherIcon::IconType::TRASH; | ||
1770 | 1882 | |||
1771 | 1883 | for (unsigned i = 0; i < monitors::MAX; ++i) | ||
1772 | 1884 | ASSERT_EQ(monitor == i && !is_trash, icon->GetQuirk(AbstractLauncherIcon::Quirk::DESAT, i)); | ||
1773 | 1885 | } | ||
1774 | 1886 | |||
1775 | 1887 | old_monitor = monitor; | ||
1776 | 1888 | monitor = 0; | ||
1777 | 1889 | xdnd_manager_->monitor_changed.emit("another_file", old_monitor, monitor); | ||
1778 | 1890 | |||
1779 | 1891 | for (auto const& icon : *model) | ||
1780 | 1892 | { | ||
1781 | 1893 | bool is_trash = icon->GetIconType() == AbstractLauncherIcon::IconType::TRASH; | ||
1782 | 1894 | |||
1783 | 1895 | for (unsigned i = 0; i < monitors::MAX; ++i) | ||
1784 | 1896 | ASSERT_EQ(old_monitor == i && !is_trash, icon->GetQuirk(AbstractLauncherIcon::Quirk::DESAT, i)); | ||
1785 | 1897 | } | ||
1786 | 1898 | |||
1787 | 1899 | xdnd_manager_->dnd_finished.emit(); | ||
1788 | 1900 | |||
1789 | 1901 | for (auto const& icon : *model) | ||
1790 | 1902 | { | ||
1791 | 1903 | for (unsigned i = 0; i < monitors::MAX; ++i) | ||
1792 | 1904 | ASSERT_FALSE(icon->GetQuirk(AbstractLauncherIcon::Quirk::DESAT, i)); | ||
1793 | 1905 | } | ||
1794 | 1906 | } | ||
1795 | 1907 | |||
1796 | 1908 | TEST_F(TestLauncherController, SetExistingLauncherIconAsFavorite) | 1787 | TEST_F(TestLauncherController, SetExistingLauncherIconAsFavorite) |
1797 | 1909 | { | 1788 | { |
1798 | 1910 | const char * desktop_file = "normal-icon.desktop"; | 1789 | const char * desktop_file = "normal-icon.desktop"; |
1799 | diff --git a/tests/test_preview_player.cpp b/tests/test_preview_player.cpp | |||
1800 | 1911 | deleted file mode 100644 | 1790 | deleted file mode 100644 |
1801 | index df481e9..0000000 | |||
1802 | --- a/tests/test_preview_player.cpp | |||
1803 | +++ /dev/null | |||
1804 | @@ -1,230 +0,0 @@ | |||
1805 | 1 | // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- | ||
1806 | 2 | /* | ||
1807 | 3 | * Copyright (C) 2013 Canonical Ltd | ||
1808 | 4 | * | ||
1809 | 5 | * This program is free software: you can redistribute it and/or modify | ||
1810 | 6 | * it under the terms of the GNU General Public License version 3 as | ||
1811 | 7 | * published by the Free Software Foundation. | ||
1812 | 8 | * | ||
1813 | 9 | * This program is distributed in the hope that it will be useful, | ||
1814 | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1815 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1816 | 12 | * GNU General Public License for more details. | ||
1817 | 13 | * | ||
1818 | 14 | * You should have received a copy of the GNU General Public License | ||
1819 | 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1820 | 16 | * | ||
1821 | 17 | * Authored by: Nick Dedekind <nick.dedekinc@canonical.com> | ||
1822 | 18 | */ | ||
1823 | 19 | |||
1824 | 20 | #include <gmock/gmock.h> | ||
1825 | 21 | #include <UnityCore/PreviewPlayer.h> | ||
1826 | 22 | #include <UnityCore/ConnectionManager.h> | ||
1827 | 23 | #include <UnityCore/GLibDBusServer.h> | ||
1828 | 24 | #include <UnityCore/Variant.h> | ||
1829 | 25 | #include "test_utils.h" | ||
1830 | 26 | #include "config.h" | ||
1831 | 27 | |||
1832 | 28 | namespace unity | ||
1833 | 29 | { | ||
1834 | 30 | |||
1835 | 31 | namespace | ||
1836 | 32 | { | ||
1837 | 33 | const std::string WHITE_NOISE = "file://" BUILDDIR "/tests/data/unity/sounds/whitenoise.mp3"; | ||
1838 | 34 | |||
1839 | 35 | const std::string PLAYER_NAME = "com.canonical.Unity.Lens.Music.PreviewPlayer"; | ||
1840 | 36 | const std::string PLAYER_PATH = "/com/canonical/Unity/Lens/Music/PreviewPlayer"; | ||
1841 | 37 | const std::string PLAYER_INTERFACE = | ||
1842 | 38 | R"(<node> | ||
1843 | 39 | <interface name="com.canonical.Unity.Lens.Music.PreviewPlayer"> | ||
1844 | 40 | <method name="Play"> | ||
1845 | 41 | <arg type="s" name="uri" direction="in"/> | ||
1846 | 42 | </method> | ||
1847 | 43 | <method name="Pause"> | ||
1848 | 44 | </method> | ||
1849 | 45 | <method name="Resume"> | ||
1850 | 46 | </method> | ||
1851 | 47 | <method name="PauseResume"> | ||
1852 | 48 | </method> | ||
1853 | 49 | <method name="Stop"> | ||
1854 | 50 | </method> | ||
1855 | 51 | <method name="Close"> | ||
1856 | 52 | </method> | ||
1857 | 53 | <method name="VideoProperties"> | ||
1858 | 54 | <arg type="s" name="uri" direction="in"/> | ||
1859 | 55 | <arg type="a{sv}" name="result" direction="out"/> | ||
1860 | 56 | </method> | ||
1861 | 57 | <signal name="Progress"> | ||
1862 | 58 | <arg type="s" name="uri"/> | ||
1863 | 59 | <arg type="u" name="state"/> | ||
1864 | 60 | <arg type="d" name="value"/> | ||
1865 | 61 | </signal> | ||
1866 | 62 | </interface> | ||
1867 | 63 | </node>)"; | ||
1868 | 64 | |||
1869 | 65 | void PlayAndWait(PreviewPlayer* player, std::string const& uri) | ||
1870 | 66 | { | ||
1871 | 67 | bool play_returned = false; | ||
1872 | 68 | auto play_callback = [&play_returned] (glib::Error const& error) { | ||
1873 | 69 | play_returned = true; | ||
1874 | 70 | EXPECT_TRUE(!error) << "Error: " << error.Message(); | ||
1875 | 71 | }; | ||
1876 | 72 | |||
1877 | 73 | bool updated_called = false; | ||
1878 | 74 | auto updated_callback = [uri, &updated_called] (std::string const& _uri, PlayerState state, double) { | ||
1879 | 75 | updated_called = true; | ||
1880 | 76 | EXPECT_EQ(_uri, uri) << "Uri for PLAY not correct (" << _uri << " != " << _uri << ")"; | ||
1881 | 77 | EXPECT_EQ((int)state, (int)PlayerState::PLAYING) << "Incorrect state returned on PLAY."; | ||
1882 | 78 | }; | ||
1883 | 79 | |||
1884 | 80 | connection::Wrapper conn(player->updated.connect(updated_callback)); | ||
1885 | 81 | player->Play(uri, play_callback); | ||
1886 | 82 | ::Utils::WaitUntilMSec(play_returned, 3000, "PLAY did not return"); | ||
1887 | 83 | ::Utils::WaitUntilMSec(updated_called, 5000, "Update not called on PLAY"); | ||
1888 | 84 | } | ||
1889 | 85 | |||
1890 | 86 | void PauseAndWait(PreviewPlayer* player) | ||
1891 | 87 | { | ||
1892 | 88 | bool pause_returned = false; | ||
1893 | 89 | auto callback = [&pause_returned] (glib::Error const& error) { | ||
1894 | 90 | pause_returned = true; | ||
1895 | 91 | EXPECT_TRUE(!error) << "Error: " << error.Message(); | ||
1896 | 92 | }; | ||
1897 | 93 | |||
1898 | 94 | bool updated_called = false; | ||
1899 | 95 | auto updated_callback = [&updated_called] (std::string const&, PlayerState state, double) { | ||
1900 | 96 | updated_called = true; | ||
1901 | 97 | EXPECT_EQ((int)state, (int)PlayerState::PAUSED) << "Incorrect state returned on PAUSE."; | ||
1902 | 98 | }; | ||
1903 | 99 | |||
1904 | 100 | connection::Wrapper conn(player->updated.connect(updated_callback)); | ||
1905 | 101 | player->Pause(callback); | ||
1906 | 102 | ::Utils::WaitUntilMSec(pause_returned, 3000, "PAUSE did not return"); | ||
1907 | 103 | ::Utils::WaitUntilMSec(updated_called, 5000, "Update not called on PAUSE"); | ||
1908 | 104 | } | ||
1909 | 105 | |||
1910 | 106 | void ResumeAndWait(PreviewPlayer* player) | ||
1911 | 107 | { | ||
1912 | 108 | bool resume_returned = false; | ||
1913 | 109 | auto callback = [&resume_returned] (glib::Error const& error) { | ||
1914 | 110 | resume_returned = true; | ||
1915 | 111 | EXPECT_TRUE(!error) << "Error: " << error.Message(); | ||
1916 | 112 | }; | ||
1917 | 113 | |||
1918 | 114 | bool updated_called = false; | ||
1919 | 115 | auto updated_callback = [&updated_called] (std::string const&, PlayerState state, double) { | ||
1920 | 116 | updated_called = true; | ||
1921 | 117 | EXPECT_EQ((int)state, (int)PlayerState::PLAYING) << "Incorrect state returned on RESUME."; | ||
1922 | 118 | }; | ||
1923 | 119 | |||
1924 | 120 | connection::Wrapper conn(player->updated.connect(updated_callback)); | ||
1925 | 121 | player->Resume(callback); | ||
1926 | 122 | ::Utils::WaitUntilMSec(resume_returned, 3000, "RESUME did not return"); | ||
1927 | 123 | ::Utils::WaitUntilMSec(updated_called, 5000, "Update not called on RESUME"); | ||
1928 | 124 | } | ||
1929 | 125 | |||
1930 | 126 | void StopAndWait(PreviewPlayer* player) | ||
1931 | 127 | { | ||
1932 | 128 | bool stop_returned = false; | ||
1933 | 129 | auto callback = [&stop_returned] (glib::Error const& error) { | ||
1934 | 130 | stop_returned = true; | ||
1935 | 131 | EXPECT_TRUE(!error) << "Error: " << error.Message(); | ||
1936 | 132 | }; | ||
1937 | 133 | |||
1938 | 134 | bool updated_called = false; | ||
1939 | 135 | auto updated_callback = [&updated_called] (std::string const&, PlayerState state, double) { | ||
1940 | 136 | updated_called = true; | ||
1941 | 137 | EXPECT_EQ((int)state, (int)PlayerState::STOPPED) << "Incorrect state returned on STOP."; | ||
1942 | 138 | }; | ||
1943 | 139 | |||
1944 | 140 | connection::Wrapper conn(player->updated.connect(updated_callback)); | ||
1945 | 141 | player->Stop(callback); | ||
1946 | 142 | ::Utils::WaitUntilMSec(stop_returned, 3000, "STOP did not return"); | ||
1947 | 143 | ::Utils::WaitUntilMSec(updated_called, 5000, "Update not called on STOP"); | ||
1948 | 144 | } | ||
1949 | 145 | |||
1950 | 146 | struct FakeRemotePlayer | ||
1951 | 147 | { | ||
1952 | 148 | typedef std::shared_ptr<FakeRemotePlayer> Ptr; | ||
1953 | 149 | FakeRemotePlayer() | ||
1954 | 150 | : server_(PLAYER_NAME) | ||
1955 | 151 | { | ||
1956 | 152 | server_.AddObjects(PLAYER_INTERFACE, PLAYER_PATH); | ||
1957 | 153 | auto object = server_.GetObjects().front(); | ||
1958 | 154 | |||
1959 | 155 | object->SetMethodsCallsHandler([this, object] (std::string const& method, GVariant* parameters) { | ||
1960 | 156 | if (method == "Play") | ||
1961 | 157 | { | ||
1962 | 158 | current_uri_ = glib::Variant(parameters).GetString(); | ||
1963 | 159 | object->EmitSignal("Progress", g_variant_new("(sud)", current_uri_.c_str(), PlayerState::PLAYING, 0)); | ||
1964 | 160 | } | ||
1965 | 161 | else if (method == "Pause") | ||
1966 | 162 | { | ||
1967 | 163 | object->EmitSignal("Progress", g_variant_new("(sud)", current_uri_.c_str(), PlayerState::PAUSED, 0)); | ||
1968 | 164 | } | ||
1969 | 165 | else if (method == "Resume") | ||
1970 | 166 | { | ||
1971 | 167 | object->EmitSignal("Progress", g_variant_new("(sud)", current_uri_.c_str(), PlayerState::PLAYING, 0)); | ||
1972 | 168 | } | ||
1973 | 169 | else if (method == "Stop") | ||
1974 | 170 | { | ||
1975 | 171 | object->EmitSignal("Progress", g_variant_new("(sud)", current_uri_.c_str(), PlayerState::STOPPED, 0)); | ||
1976 | 172 | current_uri_ = ""; | ||
1977 | 173 | } | ||
1978 | 174 | |||
1979 | 175 | return static_cast<GVariant*>(nullptr); | ||
1980 | 176 | }); | ||
1981 | 177 | } | ||
1982 | 178 | |||
1983 | 179 | private: | ||
1984 | 180 | glib::DBusServer server_; | ||
1985 | 181 | std::string current_uri_; | ||
1986 | 182 | }; | ||
1987 | 183 | } | ||
1988 | 184 | |||
1989 | 185 | struct TestPreviewPlayer : testing::Test | ||
1990 | 186 | { | ||
1991 | 187 | static void SetUpTestCase() | ||
1992 | 188 | { | ||
1993 | 189 | remote_player_ = std::make_shared<FakeRemotePlayer>(); | ||
1994 | 190 | } | ||
1995 | 191 | |||
1996 | 192 | static void TearDownTestCase() | ||
1997 | 193 | { | ||
1998 | 194 | remote_player_.reset(); | ||
1999 | 195 | } | ||
2000 | 196 | |||
2001 | 197 | static FakeRemotePlayer::Ptr remote_player_; | ||
2002 | 198 | PreviewPlayer player; | ||
2003 | 199 | }; | ||
2004 | 200 | |||
2005 | 201 | FakeRemotePlayer::Ptr TestPreviewPlayer::remote_player_; | ||
2006 | 202 | |||
2007 | 203 | TEST_F(TestPreviewPlayer, TestConstruct) | ||
2008 | 204 | { | ||
2009 | 205 | PreviewPlayer player1; | ||
2010 | 206 | } | ||
2011 | 207 | |||
2012 | 208 | TEST_F(TestPreviewPlayer, TestPlayerControl) | ||
2013 | 209 | { | ||
2014 | 210 | PlayAndWait(&player, WHITE_NOISE); | ||
2015 | 211 | |||
2016 | 212 | PauseAndWait(&player); | ||
2017 | 213 | |||
2018 | 214 | ResumeAndWait(&player); | ||
2019 | 215 | |||
2020 | 216 | StopAndWait(&player); | ||
2021 | 217 | } | ||
2022 | 218 | |||
2023 | 219 | TEST_F(TestPreviewPlayer, TestMultiPlayer) | ||
2024 | 220 | { | ||
2025 | 221 | { | ||
2026 | 222 | PreviewPlayer player2; | ||
2027 | 223 | PlayAndWait(&player2, WHITE_NOISE); | ||
2028 | 224 | } | ||
2029 | 225 | |||
2030 | 226 | StopAndWait(&player); | ||
2031 | 227 | } | ||
2032 | 228 | |||
2033 | 229 | |||
2034 | 230 | } // namespace unity | ||
2035 | 231 | \ No newline at end of file | 0 | \ No newline at end of file |
2036 | diff --git a/tests/test_previews.cpp b/tests/test_previews.cpp | |||
2037 | 232 | deleted file mode 100644 | 1 | deleted file mode 100644 |
2038 | index 3c99a08..0000000 | |||
2039 | --- a/tests/test_previews.cpp | |||
2040 | +++ /dev/null | |||
2041 | @@ -1,230 +0,0 @@ | |||
2042 | 1 | // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- | ||
2043 | 2 | /* | ||
2044 | 3 | * Copyright (C) 2011 Canonical Ltd | ||
2045 | 4 | * | ||
2046 | 5 | * This program is free software: you can redistribute it and/or modify | ||
2047 | 6 | * it under the terms of the GNU General Public License version 3 as | ||
2048 | 7 | * published by the Free Software Foundation. | ||
2049 | 8 | * | ||
2050 | 9 | * This program is distributed in the hope that it will be useful, | ||
2051 | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2052 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2053 | 12 | * GNU General Public License for more details. | ||
2054 | 13 | * | ||
2055 | 14 | * You should have received a copy of the GNU General Public License | ||
2056 | 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2057 | 16 | * | ||
2058 | 17 | * Authored by: Marco Trevisan (TreviƱo) <3v1n0@ubuntu.com> | ||
2059 | 18 | */ | ||
2060 | 19 | |||
2061 | 20 | #include <list> | ||
2062 | 21 | #include <algorithm> | ||
2063 | 22 | #include <gmock/gmock.h> | ||
2064 | 23 | #include <gio/gio.h> | ||
2065 | 24 | #include <UnityCore/Variant.h> | ||
2066 | 25 | #include <UnityCore/Preview.h> | ||
2067 | 26 | #include <UnityCore/ApplicationPreview.h> | ||
2068 | 27 | #include <UnityCore/MoviePreview.h> | ||
2069 | 28 | #include <UnityCore/MusicPreview.h> | ||
2070 | 29 | #include <unity-protocol.h> | ||
2071 | 30 | |||
2072 | 31 | using namespace std; | ||
2073 | 32 | using namespace testing; | ||
2074 | 33 | using namespace unity; | ||
2075 | 34 | using namespace unity::glib; | ||
2076 | 35 | using namespace unity::dash; | ||
2077 | 36 | |||
2078 | 37 | namespace | ||
2079 | 38 | { | ||
2080 | 39 | |||
2081 | 40 | bool IsVariant(Variant const& variant) | ||
2082 | 41 | { | ||
2083 | 42 | return g_variant_get_type_string(variant) != NULL; | ||
2084 | 43 | } | ||
2085 | 44 | |||
2086 | 45 | static void g_variant_unref0(gpointer var) | ||
2087 | 46 | { | ||
2088 | 47 | if (var) g_variant_unref((GVariant*)var); | ||
2089 | 48 | } | ||
2090 | 49 | |||
2091 | 50 | TEST(TestPreviews, DeserializeGeneric) | ||
2092 | 51 | { | ||
2093 | 52 | Object<GIcon> icon(g_icon_new_for_string("accessories", NULL)); | ||
2094 | 53 | Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_generic_preview_new())); | ||
2095 | 54 | unity_protocol_preview_set_title(proto_obj, "Title"); | ||
2096 | 55 | unity_protocol_preview_set_subtitle(proto_obj, "Subtitle"); | ||
2097 | 56 | unity_protocol_preview_set_description(proto_obj, "Description"); | ||
2098 | 57 | unity_protocol_preview_set_image(proto_obj, icon); | ||
2099 | 58 | unity_protocol_preview_set_image_source_uri(proto_obj, "Source"); | ||
2100 | 59 | |||
2101 | 60 | Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), | ||
2102 | 61 | glib::StealRef()); | ||
2103 | 62 | EXPECT_TRUE(IsVariant(v)); | ||
2104 | 63 | |||
2105 | 64 | Preview::Ptr preview = Preview::PreviewForVariant(v); | ||
2106 | 65 | EXPECT_TRUE(preview != nullptr); | ||
2107 | 66 | |||
2108 | 67 | EXPECT_EQ(preview->renderer_name, "preview-generic"); | ||
2109 | 68 | EXPECT_EQ(preview->title, "Title"); | ||
2110 | 69 | EXPECT_EQ(preview->subtitle, "Subtitle"); | ||
2111 | 70 | EXPECT_EQ(preview->description, "Description"); | ||
2112 | 71 | EXPECT_EQ(preview->image_source_uri, "Source"); | ||
2113 | 72 | EXPECT_TRUE(g_icon_equal(preview->image(), icon) != FALSE); | ||
2114 | 73 | } | ||
2115 | 74 | |||
2116 | 75 | TEST(TestPreviews, DeserializeGenericWithMeta) | ||
2117 | 76 | { | ||
2118 | 77 | Object<GIcon> icon(g_icon_new_for_string("accessories", NULL)); | ||
2119 | 78 | Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_generic_preview_new())); | ||
2120 | 79 | unity_protocol_preview_set_title(proto_obj, "Title"); | ||
2121 | 80 | unity_protocol_preview_set_subtitle(proto_obj, "Subtitle"); | ||
2122 | 81 | unity_protocol_preview_set_description(proto_obj, "Description"); | ||
2123 | 82 | unity_protocol_preview_set_image(proto_obj, icon); | ||
2124 | 83 | unity_protocol_preview_set_image_source_uri(proto_obj, "Source"); | ||
2125 | 84 | |||
2126 | 85 | GHashTable* hints = g_hash_table_new_full(g_str_hash, g_direct_equal, g_free, g_variant_unref0); | ||
2127 | 86 | g_hash_table_insert(hints, g_strdup("extra-text"), g_variant_new_string("Foo")); | ||
2128 | 87 | unity_protocol_preview_add_action(proto_obj, "action1", "Action #1", NULL, 0); | ||
2129 | 88 | unity_protocol_preview_add_action_with_hints(proto_obj, "action2", "Action #2", NULL, 0, hints); | ||
2130 | 89 | unity_protocol_preview_add_info_hint(proto_obj, "hint1", "Hint 1", NULL, g_variant_new("i", 34)); | ||
2131 | 90 | unity_protocol_preview_add_info_hint(proto_obj, "hint2", "Hint 2", NULL, g_variant_new("s", "string hint")); | ||
2132 | 91 | |||
2133 | 92 | Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), | ||
2134 | 93 | glib::StealRef()); | ||
2135 | 94 | EXPECT_TRUE(IsVariant(v)); | ||
2136 | 95 | |||
2137 | 96 | Preview::Ptr preview = Preview::PreviewForVariant(v); | ||
2138 | 97 | EXPECT_TRUE(preview != nullptr); | ||
2139 | 98 | |||
2140 | 99 | EXPECT_EQ(preview->renderer_name, "preview-generic"); | ||
2141 | 100 | EXPECT_EQ(preview->title, "Title"); | ||
2142 | 101 | EXPECT_EQ(preview->subtitle, "Subtitle"); | ||
2143 | 102 | EXPECT_EQ(preview->description, "Description"); | ||
2144 | 103 | EXPECT_TRUE(g_icon_equal(preview->image(), icon) != FALSE); | ||
2145 | 104 | EXPECT_EQ(preview->image_source_uri, "Source"); | ||
2146 | 105 | |||
2147 | 106 | auto actions = preview->GetActions(); | ||
2148 | 107 | auto info_hints = preview->GetInfoHints(); | ||
2149 | 108 | |||
2150 | 109 | EXPECT_EQ(actions.size(), 2u); | ||
2151 | 110 | |||
2152 | 111 | auto action1 = actions[0]; | ||
2153 | 112 | EXPECT_EQ(action1->id, "action1"); | ||
2154 | 113 | EXPECT_EQ(action1->display_name, "Action #1"); | ||
2155 | 114 | EXPECT_EQ(action1->icon_hint, ""); | ||
2156 | 115 | EXPECT_EQ(action1->layout_hint, 0); | ||
2157 | 116 | EXPECT_EQ(action1->extra_text, ""); | ||
2158 | 117 | |||
2159 | 118 | auto action2 = actions[1]; | ||
2160 | 119 | EXPECT_EQ(action2->id, "action2"); | ||
2161 | 120 | EXPECT_EQ(action2->display_name, "Action #2"); | ||
2162 | 121 | EXPECT_EQ(action2->icon_hint, ""); | ||
2163 | 122 | EXPECT_EQ(action2->extra_text, "Foo"); | ||
2164 | 123 | |||
2165 | 124 | EXPECT_EQ(info_hints.size(), 2u); | ||
2166 | 125 | auto hint1 = info_hints[0]; | ||
2167 | 126 | EXPECT_EQ(hint1->id, "hint1"); | ||
2168 | 127 | EXPECT_EQ(hint1->display_name, "Hint 1"); | ||
2169 | 128 | EXPECT_EQ(hint1->icon_hint, ""); | ||
2170 | 129 | EXPECT_EQ(hint1->value.GetInt32(), 34); | ||
2171 | 130 | auto hint2 = info_hints[1]; | ||
2172 | 131 | EXPECT_EQ(hint2->id, "hint2"); | ||
2173 | 132 | EXPECT_EQ(hint2->display_name, "Hint 2"); | ||
2174 | 133 | EXPECT_EQ(hint2->icon_hint, ""); | ||
2175 | 134 | EXPECT_EQ(hint2->value.GetString(), "string hint"); | ||
2176 | 135 | } | ||
2177 | 136 | |||
2178 | 137 | TEST(TestPreviews, DeserializeApplication) | ||
2179 | 138 | { | ||
2180 | 139 | Object<GIcon> icon(g_icon_new_for_string("application", NULL)); | ||
2181 | 140 | Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_application_preview_new())); | ||
2182 | 141 | unity_protocol_preview_set_title(proto_obj, "Title"); | ||
2183 | 142 | unity_protocol_preview_set_subtitle(proto_obj, "Subtitle"); | ||
2184 | 143 | unity_protocol_preview_set_description(proto_obj, "Description"); | ||
2185 | 144 | unity_protocol_preview_set_image(proto_obj, icon); | ||
2186 | 145 | auto app_proto_obj = glib::object_cast<UnityProtocolApplicationPreview>(proto_obj); | ||
2187 | 146 | unity_protocol_application_preview_set_last_update(app_proto_obj, "2012/06/13"); | ||
2188 | 147 | unity_protocol_application_preview_set_copyright(app_proto_obj, "(c) Canonical"); | ||
2189 | 148 | unity_protocol_application_preview_set_license(app_proto_obj, "GPLv3"); | ||
2190 | 149 | unity_protocol_application_preview_set_app_icon(app_proto_obj, icon); | ||
2191 | 150 | unity_protocol_application_preview_set_rating(app_proto_obj, 4.0); | ||
2192 | 151 | unity_protocol_application_preview_set_num_ratings(app_proto_obj, 12); | ||
2193 | 152 | |||
2194 | 153 | Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), | ||
2195 | 154 | glib::StealRef()); | ||
2196 | 155 | EXPECT_TRUE(IsVariant(v)); | ||
2197 | 156 | |||
2198 | 157 | Preview::Ptr base_preview = Preview::PreviewForVariant(v); | ||
2199 | 158 | ApplicationPreview::Ptr preview = std::dynamic_pointer_cast<ApplicationPreview>(base_preview); | ||
2200 | 159 | EXPECT_TRUE(preview != nullptr); | ||
2201 | 160 | |||
2202 | 161 | EXPECT_EQ(preview->renderer_name, "preview-application"); | ||
2203 | 162 | EXPECT_EQ(preview->title, "Title"); | ||
2204 | 163 | EXPECT_EQ(preview->subtitle, "Subtitle"); | ||
2205 | 164 | EXPECT_EQ(preview->description, "Description"); | ||
2206 | 165 | EXPECT_TRUE(g_icon_equal(preview->image(), icon) != FALSE); | ||
2207 | 166 | EXPECT_EQ(preview->last_update, "2012/06/13"); | ||
2208 | 167 | EXPECT_EQ(preview->copyright, "(c) Canonical"); | ||
2209 | 168 | EXPECT_EQ(preview->license, "GPLv3"); | ||
2210 | 169 | EXPECT_TRUE(g_icon_equal(preview->app_icon(), icon) != FALSE); | ||
2211 | 170 | EXPECT_EQ(preview->rating, 4.0); | ||
2212 | 171 | EXPECT_EQ(preview->num_ratings, static_cast<unsigned>(12)); | ||
2213 | 172 | } | ||
2214 | 173 | |||
2215 | 174 | TEST(TestPreviews, DeserializeMovie) | ||
2216 | 175 | { | ||
2217 | 176 | Object<GIcon> icon(g_icon_new_for_string("movie", NULL)); | ||
2218 | 177 | Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_movie_preview_new())); | ||
2219 | 178 | unity_protocol_preview_set_title(proto_obj, "Title"); | ||
2220 | 179 | unity_protocol_preview_set_subtitle(proto_obj, "Subtitle"); | ||
2221 | 180 | unity_protocol_preview_set_description(proto_obj, "Description"); | ||
2222 | 181 | unity_protocol_preview_set_image(proto_obj, icon); | ||
2223 | 182 | auto movie_proto_obj = glib::object_cast<UnityProtocolMoviePreview>(proto_obj); | ||
2224 | 183 | unity_protocol_movie_preview_set_year(movie_proto_obj, "2012"); | ||
2225 | 184 | unity_protocol_movie_preview_set_rating(movie_proto_obj, 4.0); | ||
2226 | 185 | unity_protocol_movie_preview_set_num_ratings(movie_proto_obj, 12); | ||
2227 | 186 | |||
2228 | 187 | Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), | ||
2229 | 188 | glib::StealRef()); | ||
2230 | 189 | EXPECT_TRUE(IsVariant(v)); | ||
2231 | 190 | |||
2232 | 191 | Preview::Ptr base_preview = Preview::PreviewForVariant(v); | ||
2233 | 192 | MoviePreview::Ptr preview = std::dynamic_pointer_cast<MoviePreview>(base_preview); | ||
2234 | 193 | EXPECT_TRUE(preview != nullptr); | ||
2235 | 194 | |||
2236 | 195 | EXPECT_EQ(preview->renderer_name, "preview-movie"); | ||
2237 | 196 | EXPECT_EQ(preview->title, "Title"); | ||
2238 | 197 | EXPECT_EQ(preview->subtitle, "Subtitle"); | ||
2239 | 198 | EXPECT_EQ(preview->description, "Description"); | ||
2240 | 199 | EXPECT_TRUE(g_icon_equal(preview->image(), icon) != FALSE); | ||
2241 | 200 | EXPECT_EQ(preview->year, "2012"); | ||
2242 | 201 | EXPECT_EQ(preview->rating, 4.0); | ||
2243 | 202 | EXPECT_EQ(preview->num_ratings, static_cast<unsigned int>(12)); | ||
2244 | 203 | } | ||
2245 | 204 | |||
2246 | 205 | TEST(TestPreviews, DeserializeMusic) | ||
2247 | 206 | { | ||
2248 | 207 | Object<GIcon> icon(g_icon_new_for_string("music", NULL)); | ||
2249 | 208 | Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_music_preview_new())); | ||
2250 | 209 | unity_protocol_preview_set_title(proto_obj, "Title"); | ||
2251 | 210 | unity_protocol_preview_set_subtitle(proto_obj, "Subtitle"); | ||
2252 | 211 | unity_protocol_preview_set_description(proto_obj, "Description"); | ||
2253 | 212 | unity_protocol_preview_set_image(proto_obj, icon); | ||
2254 | 213 | auto music_proto_obj = glib::object_cast<UnityProtocolMusicPreview>(proto_obj); | ||
2255 | 214 | |||
2256 | 215 | Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), | ||
2257 | 216 | glib::StealRef()); | ||
2258 | 217 | EXPECT_TRUE(IsVariant(v)); | ||
2259 | 218 | |||
2260 | 219 | Preview::Ptr base_preview = Preview::PreviewForVariant(v); | ||
2261 | 220 | MusicPreview::Ptr preview = std::dynamic_pointer_cast<MusicPreview>(base_preview); | ||
2262 | 221 | EXPECT_TRUE(preview != nullptr); | ||
2263 | 222 | |||
2264 | 223 | EXPECT_EQ(preview->renderer_name, "preview-music"); | ||
2265 | 224 | EXPECT_EQ(preview->title, "Title"); | ||
2266 | 225 | EXPECT_EQ(preview->subtitle, "Subtitle"); | ||
2267 | 226 | EXPECT_EQ(preview->description, "Description"); | ||
2268 | 227 | EXPECT_TRUE(g_icon_equal(preview->image(), icon) != FALSE); | ||
2269 | 228 | } | ||
2270 | 229 | |||
2271 | 230 | } // Namespace | ||
2272 | diff --git a/tests/test_previews_application.cpp b/tests/test_previews_application.cpp | |||
2273 | 231 | deleted file mode 100644 | 0 | deleted file mode 100644 |
2274 | index 82afc29..0000000 | |||
2275 | --- a/tests/test_previews_application.cpp | |||
2276 | +++ /dev/null | |||
2277 | @@ -1,142 +0,0 @@ | |||
2278 | 1 | // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- | ||
2279 | 2 | /* | ||
2280 | 3 | * Copyright (C) 2012 Canonical Ltd | ||
2281 | 4 | * | ||
2282 | 5 | * This program is free software: you can redistribute it and/or modify | ||
2283 | 6 | * it under the terms of the GNU General Public License version 3 as | ||
2284 | 7 | * published by the Free Software Foundation. | ||
2285 | 8 | * | ||
2286 | 9 | * This program is distributed in the hope that it will be useful, | ||
2287 | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2288 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2289 | 12 | * GNU General Public License for more details. | ||
2290 | 13 | * | ||
2291 | 14 | * You should have received a copy of the GNU General Public License | ||
2292 | 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2293 | 16 | * | ||
2294 | 17 | * Authored by: Nick Dedekind <nick.dedekinc@canonical.com> | ||
2295 | 18 | */ | ||
2296 | 19 | |||
2297 | 20 | #include <list> | ||
2298 | 21 | #include <gmock/gmock.h> | ||
2299 | 22 | using namespace testing; | ||
2300 | 23 | |||
2301 | 24 | #include <Nux/Nux.h> | ||
2302 | 25 | #include <Nux/BaseWindow.h> | ||
2303 | 26 | #include <unity-shared/StaticCairoText.h> | ||
2304 | 27 | #include <unity-shared/DashStyle.h> | ||
2305 | 28 | #include <unity-shared/PreviewStyle.h> | ||
2306 | 29 | #include <unity-shared/ThumbnailGenerator.h> | ||
2307 | 30 | |||
2308 | 31 | #include <unity-protocol.h> | ||
2309 | 32 | #include "UnityCore/ApplicationPreview.h" | ||
2310 | 33 | #include "dash/previews/ApplicationPreview.h" | ||
2311 | 34 | #include "dash/previews/PreviewInfoHintWidget.h" | ||
2312 | 35 | #include "dash/previews/PreviewRatingsWidget.h" | ||
2313 | 36 | #include "dash/previews/ActionButton.h" | ||
2314 | 37 | #include "test_utils.h" | ||
2315 | 38 | using namespace unity; | ||
2316 | 39 | using namespace unity::dash; | ||
2317 | 40 | |||
2318 | 41 | namespace | ||
2319 | 42 | { | ||
2320 | 43 | |||
2321 | 44 | class MockApplicationPreview : public previews::ApplicationPreview | ||
2322 | 45 | { | ||
2323 | 46 | public: | ||
2324 | 47 | typedef nux::ObjectPtr<MockApplicationPreview> Ptr; | ||
2325 | 48 | |||
2326 | 49 | MockApplicationPreview(dash::Preview::Ptr preview_model) | ||
2327 | 50 | : ApplicationPreview(preview_model) | ||
2328 | 51 | {} | ||
2329 | 52 | |||
2330 | 53 | using ApplicationPreview::title_; | ||
2331 | 54 | using ApplicationPreview::subtitle_; | ||
2332 | 55 | using ApplicationPreview::license_; | ||
2333 | 56 | using ApplicationPreview::last_update_; | ||
2334 | 57 | using ApplicationPreview::copywrite_; | ||
2335 | 58 | using ApplicationPreview::description_; | ||
2336 | 59 | using ApplicationPreview::action_buttons_; | ||
2337 | 60 | using ApplicationPreview::preview_info_hints_; | ||
2338 | 61 | using ApplicationPreview::app_rating_; | ||
2339 | 62 | }; | ||
2340 | 63 | |||
2341 | 64 | class TestPreviewApplication : public Test | ||
2342 | 65 | { | ||
2343 | 66 | public: | ||
2344 | 67 | TestPreviewApplication() | ||
2345 | 68 | : parent_window_(new nux::BaseWindow("TestPreviewApplication")) | ||
2346 | 69 | { | ||
2347 | 70 | glib::Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_application_preview_new())); | ||
2348 | 71 | |||
2349 | 72 | GHashTable* action_hints1(g_hash_table_new(g_direct_hash, g_direct_equal)); | ||
2350 | 73 | g_hash_table_insert (action_hints1, g_strdup ("extra-text"), g_variant_new_string("Ā£30.99")); | ||
2351 | 74 | |||
2352 | 75 | unity_protocol_application_preview_set_app_icon(UNITY_PROTOCOL_APPLICATION_PREVIEW(proto_obj.RawPtr()), g_icon_new_for_string(TESTDATADIR "/bfb.png", NULL)); | ||
2353 | 76 | unity_protocol_application_preview_set_license(UNITY_PROTOCOL_APPLICATION_PREVIEW(proto_obj.RawPtr()), "License & special char"); | ||
2354 | 77 | unity_protocol_application_preview_set_copyright(UNITY_PROTOCOL_APPLICATION_PREVIEW(proto_obj.RawPtr()), "Copywrite & special char"); | ||
2355 | 78 | unity_protocol_application_preview_set_last_update(UNITY_PROTOCOL_APPLICATION_PREVIEW(proto_obj.RawPtr()), "11th Apr 2012"); | ||
2356 | 79 | unity_protocol_application_preview_set_rating(UNITY_PROTOCOL_APPLICATION_PREVIEW(proto_obj.RawPtr()), 0.8); | ||
2357 | 80 | unity_protocol_application_preview_set_num_ratings(UNITY_PROTOCOL_APPLICATION_PREVIEW(proto_obj.RawPtr()), 12); | ||
2358 | 81 | |||
2359 | 82 | unity_protocol_preview_set_image_source_uri(proto_obj, "http://ia.media-imdb.com/images/M/MV5BMTM3NDM5MzY5Ml5BMl5BanBnXkFtZTcwNjExMDUwOA@@._V1._SY317_.jpg"); | ||
2360 | 83 | unity_protocol_preview_set_title(proto_obj, "Application Title & special char"); | ||
2361 | 84 | unity_protocol_preview_set_subtitle(proto_obj, "Application Subtitle > special char"); | ||
2362 | 85 | unity_protocol_preview_set_description(proto_obj, "Application Desctiption < special char"); | ||
2363 | 86 | unity_protocol_preview_add_action(proto_obj, "action1", "Action 1", NULL, 0); | ||
2364 | 87 | unity_protocol_preview_add_action_with_hints(proto_obj, "action2", "Action 2", NULL, 0, action_hints1); | ||
2365 | 88 | unity_protocol_preview_add_info_hint(proto_obj, "hint1", "Hint 1", NULL, g_variant_new("s", "string hint 1")); | ||
2366 | 89 | unity_protocol_preview_add_info_hint(proto_obj, "hint2", "Hint 2", NULL, g_variant_new("s", "string hint 2")); | ||
2367 | 90 | unity_protocol_preview_add_info_hint(proto_obj, "hint3", "Hint 3", NULL, g_variant_new("i", 12)); | ||
2368 | 91 | |||
2369 | 92 | glib::Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), glib::StealRef()); | ||
2370 | 93 | preview_model_ = dash::Preview::PreviewForVariant(v); | ||
2371 | 94 | |||
2372 | 95 | g_hash_table_unref(action_hints1); | ||
2373 | 96 | } | ||
2374 | 97 | |||
2375 | 98 | nux::ObjectPtr<nux::BaseWindow> parent_window_; | ||
2376 | 99 | dash::Preview::Ptr preview_model_; | ||
2377 | 100 | |||
2378 | 101 | previews::Style previews_style; | ||
2379 | 102 | dash::Style dash_style; | ||
2380 | 103 | ThumbnailGenerator thumbnail_generator; | ||
2381 | 104 | }; | ||
2382 | 105 | |||
2383 | 106 | TEST_F(TestPreviewApplication, TestCreate) | ||
2384 | 107 | { | ||
2385 | 108 | previews::Preview::Ptr preview_view = previews::Preview::PreviewForModel(preview_model_); | ||
2386 | 109 | |||
2387 | 110 | EXPECT_TRUE(dynamic_cast<previews::ApplicationPreview*>(preview_view.GetPointer()) != NULL); | ||
2388 | 111 | } | ||
2389 | 112 | |||
2390 | 113 | TEST_F(TestPreviewApplication, TestUIValues) | ||
2391 | 114 | { | ||
2392 | 115 | MockApplicationPreview::Ptr preview_view(new MockApplicationPreview(preview_model_)); | ||
2393 | 116 | |||
2394 | 117 | EXPECT_EQ(preview_view->title_->GetText(), "Application Title & special char"); | ||
2395 | 118 | EXPECT_EQ(preview_view->subtitle_->GetText(), "Application Subtitle > special char"); | ||
2396 | 119 | EXPECT_EQ(preview_view->description_->GetText(), "Application Desctiption < special char"); | ||
2397 | 120 | |||
2398 | 121 | EXPECT_EQ(preview_view->action_buttons_.size(), 2u); | ||
2399 | 122 | |||
2400 | 123 | if (preview_view->action_buttons_.size() >= 2) | ||
2401 | 124 | { | ||
2402 | 125 | auto iter = preview_view->action_buttons_.begin(); | ||
2403 | 126 | if ((*iter)->Type().IsDerivedFromType(ActionButton::StaticObjectType)) | ||
2404 | 127 | { | ||
2405 | 128 | ActionButton *action = static_cast<ActionButton*>(*iter); | ||
2406 | 129 | EXPECT_EQ(action->GetLabel(), "Action 1"); | ||
2407 | 130 | EXPECT_EQ(action->GetExtraText(), ""); | ||
2408 | 131 | } | ||
2409 | 132 | iter++; | ||
2410 | 133 | if ((*iter)->Type().IsDerivedFromType(ActionButton::StaticObjectType)) | ||
2411 | 134 | { | ||
2412 | 135 | ActionButton *action = static_cast<ActionButton*>(*iter); | ||
2413 | 136 | EXPECT_EQ(action->GetLabel(), "Action 2"); | ||
2414 | 137 | EXPECT_EQ(action->GetExtraText(), "Ā£30.99"); | ||
2415 | 138 | } | ||
2416 | 139 | } | ||
2417 | 140 | } | ||
2418 | 141 | |||
2419 | 142 | } | ||
2420 | diff --git a/tests/test_previews_generic.cpp b/tests/test_previews_generic.cpp | |||
2421 | 143 | deleted file mode 100644 | 0 | deleted file mode 100644 |
2422 | index c10c99e..0000000 | |||
2423 | --- a/tests/test_previews_generic.cpp | |||
2424 | +++ /dev/null | |||
2425 | @@ -1,129 +0,0 @@ | |||
2426 | 1 | // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- | ||
2427 | 2 | /* | ||
2428 | 3 | * Copyright (C) 2012 Canonical Ltd | ||
2429 | 4 | * | ||
2430 | 5 | * This program is free software: you can redistribute it and/or modify | ||
2431 | 6 | * it under the terms of the GNU General Public License version 3 as | ||
2432 | 7 | * published by the Free Software Foundation. | ||
2433 | 8 | * | ||
2434 | 9 | * This program is distributed in the hope that it will be useful, | ||
2435 | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2436 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2437 | 12 | * GNU General Public License for more details. | ||
2438 | 13 | * | ||
2439 | 14 | * You should have received a copy of the GNU General Public License | ||
2440 | 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2441 | 16 | * | ||
2442 | 17 | * Authored by: Nick Dedekind <nick.dedekinc@canonical.com> | ||
2443 | 18 | */ | ||
2444 | 19 | |||
2445 | 20 | #include <list> | ||
2446 | 21 | #include <gmock/gmock.h> | ||
2447 | 22 | using namespace testing; | ||
2448 | 23 | |||
2449 | 24 | #include <Nux/Nux.h> | ||
2450 | 25 | #include <Nux/BaseWindow.h> | ||
2451 | 26 | #include <unity-shared/StaticCairoText.h> | ||
2452 | 27 | #include <unity-shared/DashStyle.h> | ||
2453 | 28 | #include <unity-shared/PreviewStyle.h> | ||
2454 | 29 | #include <unity-shared/ThumbnailGenerator.h> | ||
2455 | 30 | |||
2456 | 31 | #include <unity-protocol.h> | ||
2457 | 32 | #include "UnityCore/GenericPreview.h" | ||
2458 | 33 | #include "dash/previews/GenericPreview.h" | ||
2459 | 34 | #include "dash/previews/ActionButton.h" | ||
2460 | 35 | #include "test_utils.h" | ||
2461 | 36 | using namespace unity; | ||
2462 | 37 | using namespace unity::dash; | ||
2463 | 38 | |||
2464 | 39 | namespace | ||
2465 | 40 | { | ||
2466 | 41 | |||
2467 | 42 | class MockGenericPreview : public previews::GenericPreview | ||
2468 | 43 | { | ||
2469 | 44 | public: | ||
2470 | 45 | typedef nux::ObjectPtr<MockGenericPreview> Ptr; | ||
2471 | 46 | |||
2472 | 47 | MockGenericPreview(dash::Preview::Ptr preview_model) | ||
2473 | 48 | : GenericPreview(preview_model) | ||
2474 | 49 | {} | ||
2475 | 50 | |||
2476 | 51 | using GenericPreview::title_; | ||
2477 | 52 | using GenericPreview::subtitle_; | ||
2478 | 53 | using GenericPreview::description_; | ||
2479 | 54 | using GenericPreview::action_buttons_; | ||
2480 | 55 | using GenericPreview::preview_info_hints_; | ||
2481 | 56 | }; | ||
2482 | 57 | |||
2483 | 58 | class TestPreviewGeneric : public Test | ||
2484 | 59 | { | ||
2485 | 60 | public: | ||
2486 | 61 | TestPreviewGeneric() | ||
2487 | 62 | : parent_window_(new nux::BaseWindow("TestPreviewGeneric")) | ||
2488 | 63 | { | ||
2489 | 64 | glib::Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_generic_preview_new())); | ||
2490 | 65 | |||
2491 | 66 | GHashTable* action_hints1(g_hash_table_new(g_direct_hash, g_direct_equal)); | ||
2492 | 67 | g_hash_table_insert (action_hints1, g_strdup ("extra-text"), g_variant_new_string("2.00")); | ||
2493 | 68 | |||
2494 | 69 | unity_protocol_preview_set_image_source_uri(proto_obj, "http://ia.media-imdb.com/images/M/MV5BMTM3NDM5MzY5Ml5BMl5BanBnXkFtZTcwNjExMDUwOA@@._V1._SY317_.jpg"); | ||
2495 | 70 | unity_protocol_preview_set_title(proto_obj, "Generic Title & special char"); | ||
2496 | 71 | unity_protocol_preview_set_subtitle(proto_obj, "Generic Subtitle > special char"); | ||
2497 | 72 | unity_protocol_preview_set_description(proto_obj, "Generic Desctiption < special char"); | ||
2498 | 73 | unity_protocol_preview_add_action(proto_obj, "action1", "Action 1", NULL, 0); | ||
2499 | 74 | unity_protocol_preview_add_action_with_hints(proto_obj, "action2", "Action 2", NULL, 0, action_hints1); | ||
2500 | 75 | unity_protocol_preview_add_info_hint(proto_obj, "hint1", "Hint 1", NULL, g_variant_new("s", "string hint 1")); | ||
2501 | 76 | unity_protocol_preview_add_info_hint(proto_obj, "hint2", "Hint 2", NULL, g_variant_new("s", "string hint 2")); | ||
2502 | 77 | unity_protocol_preview_add_info_hint(proto_obj, "hint3", "Hint 3", NULL, g_variant_new("i", 12)); | ||
2503 | 78 | |||
2504 | 79 | glib::Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), glib::StealRef()); | ||
2505 | 80 | preview_model_ = dash::Preview::PreviewForVariant(v); | ||
2506 | 81 | |||
2507 | 82 | g_hash_table_unref(action_hints1); | ||
2508 | 83 | } | ||
2509 | 84 | |||
2510 | 85 | nux::ObjectPtr<nux::BaseWindow> parent_window_; | ||
2511 | 86 | dash::Preview::Ptr preview_model_; | ||
2512 | 87 | |||
2513 | 88 | previews::Style panel_style; | ||
2514 | 89 | dash::Style dash_style; | ||
2515 | 90 | ThumbnailGenerator thumbnail_generator; | ||
2516 | 91 | }; | ||
2517 | 92 | |||
2518 | 93 | TEST_F(TestPreviewGeneric, TestCreate) | ||
2519 | 94 | { | ||
2520 | 95 | previews::Preview::Ptr preview_view = previews::Preview::PreviewForModel(preview_model_); | ||
2521 | 96 | |||
2522 | 97 | EXPECT_TRUE(dynamic_cast<previews::GenericPreview*>(preview_view.GetPointer()) != NULL); | ||
2523 | 98 | } | ||
2524 | 99 | |||
2525 | 100 | TEST_F(TestPreviewGeneric, TestUIValues) | ||
2526 | 101 | { | ||
2527 | 102 | MockGenericPreview::Ptr preview_view(new MockGenericPreview(preview_model_)); | ||
2528 | 103 | |||
2529 | 104 | EXPECT_EQ(preview_view->title_->GetText(), "Generic Title & special char"); | ||
2530 | 105 | EXPECT_EQ(preview_view->subtitle_->GetText(), "Generic Subtitle > special char"); | ||
2531 | 106 | EXPECT_EQ(preview_view->description_->GetText(), "Generic Desctiption < special char"); | ||
2532 | 107 | |||
2533 | 108 | EXPECT_EQ(preview_view->action_buttons_.size(), 2u); | ||
2534 | 109 | |||
2535 | 110 | if (preview_view->action_buttons_.size() >= 2) | ||
2536 | 111 | { | ||
2537 | 112 | auto iter = preview_view->action_buttons_.begin(); | ||
2538 | 113 | if ((*iter)->Type().IsDerivedFromType(ActionButton::StaticObjectType)) | ||
2539 | 114 | { | ||
2540 | 115 | ActionButton *action = static_cast<ActionButton*>(*iter); | ||
2541 | 116 | EXPECT_EQ(action->GetLabel(), "Action 1"); | ||
2542 | 117 | EXPECT_EQ(action->GetExtraText(), ""); | ||
2543 | 118 | } | ||
2544 | 119 | iter++; | ||
2545 | 120 | if ((*iter)->Type().IsDerivedFromType(ActionButton::StaticObjectType)) | ||
2546 | 121 | { | ||
2547 | 122 | ActionButton *action = static_cast<ActionButton*>(*iter); | ||
2548 | 123 | EXPECT_EQ(action->GetLabel(), "Action 2"); | ||
2549 | 124 | EXPECT_EQ(action->GetExtraText(), "2.00"); | ||
2550 | 125 | } | ||
2551 | 126 | } | ||
2552 | 127 | } | ||
2553 | 128 | |||
2554 | 129 | } | ||
2555 | diff --git a/tests/test_previews_movie.cpp b/tests/test_previews_movie.cpp | |||
2556 | 130 | deleted file mode 100644 | 0 | deleted file mode 100644 |
2557 | index ac3b7e1..0000000 | |||
2558 | --- a/tests/test_previews_movie.cpp | |||
2559 | +++ /dev/null | |||
2560 | @@ -1,149 +0,0 @@ | |||
2561 | 1 | // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- | ||
2562 | 2 | /* | ||
2563 | 3 | * Copyright (C) 2012 Canonical Ltd | ||
2564 | 4 | * | ||
2565 | 5 | * This program is free software: you can redistribute it and/or modify | ||
2566 | 6 | * it under the terms of the GNU General Public License version 3 as | ||
2567 | 7 | * published by the Free Software Foundation. | ||
2568 | 8 | * | ||
2569 | 9 | * This program is distributed in the hope that it will be useful, | ||
2570 | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2571 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2572 | 12 | * GNU General Public License for more details. | ||
2573 | 13 | * | ||
2574 | 14 | * You should have received a copy of the GNU General Public License | ||
2575 | 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2576 | 16 | * | ||
2577 | 17 | * Authored by: Nick Dedekind <nick.dedekinc@canonical.com> | ||
2578 | 18 | */ | ||
2579 | 19 | |||
2580 | 20 | #include <list> | ||
2581 | 21 | #include <gmock/gmock.h> | ||
2582 | 22 | using namespace testing; | ||
2583 | 23 | |||
2584 | 24 | #include <Nux/Nux.h> | ||
2585 | 25 | #include <Nux/BaseWindow.h> | ||
2586 | 26 | #include <unity-shared/StaticCairoText.h> | ||
2587 | 27 | #include <unity-shared/DashStyle.h> | ||
2588 | 28 | #include <unity-shared/PreviewStyle.h> | ||
2589 | 29 | #include <unity-shared/ThumbnailGenerator.h> | ||
2590 | 30 | |||
2591 | 31 | #include <unity-protocol.h> | ||
2592 | 32 | #include "UnityCore/MoviePreview.h" | ||
2593 | 33 | #include "dash/previews/MoviePreview.h" | ||
2594 | 34 | #include "dash/previews/PreviewInfoHintWidget.h" | ||
2595 | 35 | #include "dash/previews/PreviewRatingsWidget.h" | ||
2596 | 36 | #include "dash/previews/ActionButton.h" | ||
2597 | 37 | #include "test_utils.h" | ||
2598 | 38 | using namespace unity; | ||
2599 | 39 | using namespace unity::dash; | ||
2600 | 40 | |||
2601 | 41 | namespace | ||
2602 | 42 | { | ||
2603 | 43 | |||
2604 | 44 | class MockMoviePreview : public previews::MoviePreview | ||
2605 | 45 | { | ||
2606 | 46 | public: | ||
2607 | 47 | typedef nux::ObjectPtr<MockMoviePreview> Ptr; | ||
2608 | 48 | |||
2609 | 49 | MockMoviePreview(dash::Preview::Ptr preview_model) | ||
2610 | 50 | : MoviePreview(preview_model) | ||
2611 | 51 | {} | ||
2612 | 52 | |||
2613 | 53 | using MoviePreview::title_; | ||
2614 | 54 | using MoviePreview::subtitle_; | ||
2615 | 55 | using MoviePreview::description_; | ||
2616 | 56 | using MoviePreview::action_buttons_; | ||
2617 | 57 | using MoviePreview::preview_info_hints_; | ||
2618 | 58 | using MoviePreview::rating_; | ||
2619 | 59 | }; | ||
2620 | 60 | |||
2621 | 61 | class TestPreviewMovie : public Test | ||
2622 | 62 | { | ||
2623 | 63 | public: | ||
2624 | 64 | TestPreviewMovie() | ||
2625 | 65 | : parent_window_(new nux::BaseWindow("TestPreviewMovie")) {} | ||
2626 | 66 | |||
2627 | 67 | void create_preview_model(double rating) | ||
2628 | 68 | { | ||
2629 | 69 | glib::Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_movie_preview_new())); | ||
2630 | 70 | |||
2631 | 71 | GHashTable* action_hints1(g_hash_table_new(g_direct_hash, g_direct_equal)); | ||
2632 | 72 | g_hash_table_insert (action_hints1, g_strdup ("extra-text"), g_variant_new_string("Ā£1.00")); | ||
2633 | 73 | |||
2634 | 74 | unity_protocol_movie_preview_set_rating(UNITY_PROTOCOL_MOVIE_PREVIEW(proto_obj.RawPtr()), rating); | ||
2635 | 75 | unity_protocol_movie_preview_set_num_ratings(UNITY_PROTOCOL_MOVIE_PREVIEW(proto_obj.RawPtr()), 12); | ||
2636 | 76 | |||
2637 | 77 | unity_protocol_preview_set_image_source_uri(proto_obj, "http://ia.media-imdb.com/images/M/MV5BMTM3NDM5MzY5Ml5BMl5BanBnXkFtZTcwNjExMDUwOA@@._V1._SY317_.jpg"); | ||
2638 | 78 | unity_protocol_preview_set_title(proto_obj, "Movie Title & special char"); | ||
2639 | 79 | unity_protocol_preview_set_subtitle(proto_obj, "Movie Subtitle > special char"); | ||
2640 | 80 | unity_protocol_preview_set_description(proto_obj, "Movie Desctiption < special char"); | ||
2641 | 81 | unity_protocol_preview_add_action(proto_obj, "action1", "Action 1", NULL, 0); | ||
2642 | 82 | unity_protocol_preview_add_action_with_hints(proto_obj, "action2", "Action 2", NULL, 0, action_hints1); | ||
2643 | 83 | unity_protocol_preview_add_info_hint(proto_obj, "hint1", "Hint 1", NULL, g_variant_new("s", "string hint 1")); | ||
2644 | 84 | unity_protocol_preview_add_info_hint(proto_obj, "hint2", "Hint 2", NULL, g_variant_new("s", "string hint 2")); | ||
2645 | 85 | unity_protocol_preview_add_info_hint(proto_obj, "hint3", "Hint 3", NULL, g_variant_new("i", 12)); | ||
2646 | 86 | |||
2647 | 87 | glib::Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), glib::StealRef()); | ||
2648 | 88 | preview_model_ = dash::Preview::PreviewForVariant(v); | ||
2649 | 89 | |||
2650 | 90 | g_hash_table_unref(action_hints1); | ||
2651 | 91 | } | ||
2652 | 92 | |||
2653 | 93 | nux::ObjectPtr<nux::BaseWindow> parent_window_; | ||
2654 | 94 | dash::Preview::Ptr preview_model_; | ||
2655 | 95 | |||
2656 | 96 | previews::Style panel_style; | ||
2657 | 97 | dash::Style dash_style; | ||
2658 | 98 | ThumbnailGenerator thumbnail_generator; | ||
2659 | 99 | }; | ||
2660 | 100 | |||
2661 | 101 | TEST_F(TestPreviewMovie, TestCreate) | ||
2662 | 102 | { | ||
2663 | 103 | create_preview_model(0.8); | ||
2664 | 104 | previews::Preview::Ptr preview_view = previews::Preview::PreviewForModel(preview_model_); | ||
2665 | 105 | |||
2666 | 106 | EXPECT_TRUE(dynamic_cast<previews::MoviePreview*>(preview_view.GetPointer()) != NULL); | ||
2667 | 107 | } | ||
2668 | 108 | |||
2669 | 109 | TEST_F(TestPreviewMovie, TestUIValues) | ||
2670 | 110 | { | ||
2671 | 111 | create_preview_model(0.8); | ||
2672 | 112 | MockMoviePreview::Ptr preview_view(new MockMoviePreview(preview_model_)); | ||
2673 | 113 | |||
2674 | 114 | EXPECT_EQ(preview_view->title_->GetText(), "Movie Title & special char"); | ||
2675 | 115 | EXPECT_EQ(preview_view->subtitle_->GetText(), "Movie Subtitle > special char"); | ||
2676 | 116 | EXPECT_EQ(preview_view->description_->GetText(), "Movie Desctiption < special char"); | ||
2677 | 117 | |||
2678 | 118 | EXPECT_EQ(preview_view->rating_->GetRating(), 0.8f); | ||
2679 | 119 | EXPECT_EQ(preview_view->action_buttons_.size(), 2u); | ||
2680 | 120 | |||
2681 | 121 | if (preview_view->action_buttons_.size() >= 2) | ||
2682 | 122 | { | ||
2683 | 123 | auto iter = preview_view->action_buttons_.begin(); | ||
2684 | 124 | if ((*iter)->Type().IsDerivedFromType(ActionButton::StaticObjectType)) | ||
2685 | 125 | { | ||
2686 | 126 | ActionButton *action = static_cast<ActionButton*>(*iter); | ||
2687 | 127 | EXPECT_EQ(action->GetLabel(), "Action 1"); | ||
2688 | 128 | EXPECT_EQ(action->GetExtraText(), ""); | ||
2689 | 129 | } | ||
2690 | 130 | iter++; | ||
2691 | 131 | if ((*iter)->Type().IsDerivedFromType(ActionButton::StaticObjectType)) | ||
2692 | 132 | { | ||
2693 | 133 | ActionButton *action = static_cast<ActionButton*>(*iter); | ||
2694 | 134 | EXPECT_EQ(action->GetLabel(), "Action 2"); | ||
2695 | 135 | EXPECT_EQ(action->GetExtraText(), "Ā£1.00"); | ||
2696 | 136 | } | ||
2697 | 137 | } | ||
2698 | 138 | } | ||
2699 | 139 | |||
2700 | 140 | TEST_F(TestPreviewMovie, TestHideRatings) | ||
2701 | 141 | { | ||
2702 | 142 | create_preview_model(-1); | ||
2703 | 143 | MockMoviePreview::Ptr preview_view(new MockMoviePreview(preview_model_)); | ||
2704 | 144 | |||
2705 | 145 | EXPECT_EQ(preview_view->rating_, NULL); | ||
2706 | 146 | } | ||
2707 | 147 | |||
2708 | 148 | |||
2709 | 149 | } | ||
2710 | diff --git a/tests/test_previews_music.cpp b/tests/test_previews_music.cpp | |||
2711 | 150 | deleted file mode 100644 | 0 | deleted file mode 100644 |
2712 | index 4398ec2..0000000 | |||
2713 | --- a/tests/test_previews_music.cpp | |||
2714 | +++ /dev/null | |||
2715 | @@ -1,131 +0,0 @@ | |||
2716 | 1 | // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- | ||
2717 | 2 | /* | ||
2718 | 3 | * Copyright (C) 2012 Canonical Ltd | ||
2719 | 4 | * | ||
2720 | 5 | * This program is free software: you can redistribute it and/or modify | ||
2721 | 6 | * it under the terms of the GNU General Public License version 3 as | ||
2722 | 7 | * published by the Free Software Foundation. | ||
2723 | 8 | * | ||
2724 | 9 | * This program is distributed in the hope that it will be useful, | ||
2725 | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2726 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2727 | 12 | * GNU General Public License for more details. | ||
2728 | 13 | * | ||
2729 | 14 | * You should have received a copy of the GNU General Public License | ||
2730 | 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2731 | 16 | * | ||
2732 | 17 | * Authored by: Nick Dedekind <nick.dedekinc@canonical.com> | ||
2733 | 18 | */ | ||
2734 | 19 | |||
2735 | 20 | #include <list> | ||
2736 | 21 | #include <gmock/gmock.h> | ||
2737 | 22 | using namespace testing; | ||
2738 | 23 | |||
2739 | 24 | #include <Nux/Nux.h> | ||
2740 | 25 | #include <Nux/BaseWindow.h> | ||
2741 | 26 | #include <unity-shared/StaticCairoText.h> | ||
2742 | 27 | #include <unity-shared/DashStyle.h> | ||
2743 | 28 | #include <unity-shared/PreviewStyle.h> | ||
2744 | 29 | #include <unity-shared/ThumbnailGenerator.h> | ||
2745 | 30 | |||
2746 | 31 | #include <unity-protocol.h> | ||
2747 | 32 | #include "UnityCore/MusicPreview.h" | ||
2748 | 33 | #include "dash/previews/MusicPreview.h" | ||
2749 | 34 | #include "dash/previews/PreviewInfoHintWidget.h" | ||
2750 | 35 | #include "dash/previews/PreviewRatingsWidget.h" | ||
2751 | 36 | #include "dash/previews/ActionButton.h" | ||
2752 | 37 | #include "test_utils.h" | ||
2753 | 38 | using namespace unity; | ||
2754 | 39 | using namespace unity::dash; | ||
2755 | 40 | |||
2756 | 41 | namespace | ||
2757 | 42 | { | ||
2758 | 43 | |||
2759 | 44 | class MockMusicPreview : public previews::MusicPreview | ||
2760 | 45 | { | ||
2761 | 46 | public: | ||
2762 | 47 | typedef nux::ObjectPtr<MockMusicPreview> Ptr; | ||
2763 | 48 | |||
2764 | 49 | MockMusicPreview(dash::Preview::Ptr preview_model) | ||
2765 | 50 | : MusicPreview(preview_model) | ||
2766 | 51 | {} | ||
2767 | 52 | |||
2768 | 53 | using MusicPreview::title_; | ||
2769 | 54 | using MusicPreview::subtitle_; | ||
2770 | 55 | using MusicPreview::action_buttons_; | ||
2771 | 56 | using MusicPreview::preview_info_hints_; | ||
2772 | 57 | }; | ||
2773 | 58 | |||
2774 | 59 | class TestPreviewMusic : public Test | ||
2775 | 60 | { | ||
2776 | 61 | public: | ||
2777 | 62 | TestPreviewMusic() | ||
2778 | 63 | : parent_window_(new nux::BaseWindow("TestPreviewMusic")) | ||
2779 | 64 | { | ||
2780 | 65 | glib::Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_music_preview_new())); | ||
2781 | 66 | |||
2782 | 67 | GHashTable* action_hints1(g_hash_table_new(g_direct_hash, g_direct_equal)); | ||
2783 | 68 | g_hash_table_insert (action_hints1, g_strdup ("extra-text"), g_variant_new_string("Ā£3.99")); | ||
2784 | 69 | |||
2785 | 70 | unity_protocol_preview_set_image_source_uri(proto_obj, "http://ia.media-imdb.com/images/M/MV5BMTM3NDM5MzY5Ml5BMl5BanBnXkFtZTcwNjExMDUwOA@@._V1._SY317_.jpg"); | ||
2786 | 71 | unity_protocol_preview_set_title(proto_obj, "Music Title & special char"); | ||
2787 | 72 | unity_protocol_preview_set_subtitle(proto_obj, "Music Subtitle > special char"); | ||
2788 | 73 | unity_protocol_preview_set_description(proto_obj, "Music Desctiption < special char"); | ||
2789 | 74 | unity_protocol_preview_add_action(proto_obj, "action1", "Action 1", NULL, 0); | ||
2790 | 75 | unity_protocol_preview_add_action_with_hints(proto_obj, "action2", "Action 2", NULL, 0, action_hints1); | ||
2791 | 76 | unity_protocol_preview_add_action(proto_obj, "action3", "Action 3", NULL, 0); | ||
2792 | 77 | unity_protocol_preview_add_action(proto_obj, "action4", "Action 4", NULL, 0); | ||
2793 | 78 | unity_protocol_preview_add_info_hint(proto_obj, "hint1", "Hint 1", NULL, g_variant_new("s", "string hint 1")); | ||
2794 | 79 | unity_protocol_preview_add_info_hint(proto_obj, "hint2", "Hint 2", NULL, g_variant_new("s", "string hint 2")); | ||
2795 | 80 | unity_protocol_preview_add_info_hint(proto_obj, "hint3", "Hint 3", NULL, g_variant_new("i", 12)); | ||
2796 | 81 | |||
2797 | 82 | glib::Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), glib::StealRef()); | ||
2798 | 83 | preview_model_ = dash::Preview::PreviewForVariant(v); | ||
2799 | 84 | |||
2800 | 85 | g_hash_table_unref(action_hints1); | ||
2801 | 86 | } | ||
2802 | 87 | |||
2803 | 88 | nux::ObjectPtr<nux::BaseWindow> parent_window_; | ||
2804 | 89 | dash::Preview::Ptr preview_model_; | ||
2805 | 90 | |||
2806 | 91 | previews::Style panel_style; | ||
2807 | 92 | dash::Style dash_style; | ||
2808 | 93 | ThumbnailGenerator thumbnail_generator; | ||
2809 | 94 | }; | ||
2810 | 95 | |||
2811 | 96 | TEST_F(TestPreviewMusic, TestCreate) | ||
2812 | 97 | { | ||
2813 | 98 | previews::Preview::Ptr preview_view = previews::Preview::PreviewForModel(preview_model_); | ||
2814 | 99 | |||
2815 | 100 | EXPECT_TRUE(dynamic_cast<previews::MusicPreview*>(preview_view.GetPointer()) != NULL); | ||
2816 | 101 | } | ||
2817 | 102 | |||
2818 | 103 | TEST_F(TestPreviewMusic, TestUIValues) | ||
2819 | 104 | { | ||
2820 | 105 | MockMusicPreview::Ptr preview_view(new MockMusicPreview(preview_model_)); | ||
2821 | 106 | |||
2822 | 107 | EXPECT_EQ(preview_view->title_->GetText(), "Music Title & special char"); | ||
2823 | 108 | EXPECT_EQ(preview_view->subtitle_->GetText(), "Music Subtitle > special char"); | ||
2824 | 109 | |||
2825 | 110 | EXPECT_EQ(preview_view->action_buttons_.size(), 4u); | ||
2826 | 111 | |||
2827 | 112 | if (preview_view->action_buttons_.size() >= 2) | ||
2828 | 113 | { | ||
2829 | 114 | auto iter = preview_view->action_buttons_.begin(); | ||
2830 | 115 | if ((*iter)->Type().IsDerivedFromType(ActionButton::StaticObjectType)) | ||
2831 | 116 | { | ||
2832 | 117 | ActionButton *action = static_cast<ActionButton*>(*iter); | ||
2833 | 118 | EXPECT_EQ(action->GetLabel(), "Action 1"); | ||
2834 | 119 | EXPECT_EQ(action->GetExtraText(), ""); | ||
2835 | 120 | } | ||
2836 | 121 | iter++; | ||
2837 | 122 | if ((*iter)->Type().IsDerivedFromType(ActionButton::StaticObjectType)) | ||
2838 | 123 | { | ||
2839 | 124 | ActionButton *action = static_cast<ActionButton*>(*iter); | ||
2840 | 125 | EXPECT_EQ(action->GetLabel(), "Action 2"); | ||
2841 | 126 | EXPECT_EQ(action->GetExtraText(), "Ā£3.99"); | ||
2842 | 127 | } | ||
2843 | 128 | } | ||
2844 | 129 | } | ||
2845 | 130 | |||
2846 | 131 | } | ||
2847 | diff --git a/tests/test_previews_music_payment.cpp b/tests/test_previews_music_payment.cpp | |||
2848 | 132 | deleted file mode 100644 | 0 | deleted file mode 100644 |
2849 | index daa6a3b..0000000 | |||
2850 | --- a/tests/test_previews_music_payment.cpp | |||
2851 | +++ /dev/null | |||
2852 | @@ -1,150 +0,0 @@ | |||
2853 | 1 | // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- | ||
2854 | 2 | /* | ||
2855 | 3 | * Copyright (C) 2012-2013 Canonical Ltd | ||
2856 | 4 | * | ||
2857 | 5 | * This program is free software: you can redistribute it and/or modify | ||
2858 | 6 | * it under the terms of the GNU General Public License version 3 as | ||
2859 | 7 | * published by the Free Software Foundation. | ||
2860 | 8 | * | ||
2861 | 9 | * This program is distributed in the hope that it will be useful, | ||
2862 | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2863 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2864 | 12 | * GNU General Public License for more details. | ||
2865 | 13 | * | ||
2866 | 14 | * You should have received a copy of the GNU General Public License | ||
2867 | 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2868 | 16 | * | ||
2869 | 17 | * Authored by: Manuel de la Pena <manuel.delapena@canonical.com> | ||
2870 | 18 | */ | ||
2871 | 19 | |||
2872 | 20 | #include <list> | ||
2873 | 21 | #include <gmock/gmock.h> | ||
2874 | 22 | |||
2875 | 23 | #include <Nux/Nux.h> | ||
2876 | 24 | #include <Nux/VLayout.h> | ||
2877 | 25 | #include <Nux/BaseWindow.h> | ||
2878 | 26 | #include <unity-shared/StaticCairoText.h> | ||
2879 | 27 | #include <unity-shared/CoverArt.h> | ||
2880 | 28 | #include <unity-shared/DashStyle.h> | ||
2881 | 29 | #include <unity-shared/PreviewStyle.h> | ||
2882 | 30 | #include <unity-shared/ThumbnailGenerator.h> | ||
2883 | 31 | |||
2884 | 32 | #include <unity-protocol.h> | ||
2885 | 33 | #include "dash/previews/MusicPaymentPreview.h" | ||
2886 | 34 | #include "test_utils.h" | ||
2887 | 35 | |||
2888 | 36 | using namespace testing; | ||
2889 | 37 | |||
2890 | 38 | namespace unity | ||
2891 | 39 | { | ||
2892 | 40 | |||
2893 | 41 | namespace dash | ||
2894 | 42 | { | ||
2895 | 43 | |||
2896 | 44 | namespace previews | ||
2897 | 45 | { | ||
2898 | 46 | |||
2899 | 47 | class MockedMusicPaymentPreview : public MusicPaymentPreview | ||
2900 | 48 | { | ||
2901 | 49 | public: | ||
2902 | 50 | typedef nux::ObjectPtr<MockedMusicPaymentPreview> Ptr; | ||
2903 | 51 | |||
2904 | 52 | MockedMusicPaymentPreview(dash::Preview::Ptr preview_model) | ||
2905 | 53 | : MusicPaymentPreview(preview_model) | ||
2906 | 54 | {} | ||
2907 | 55 | |||
2908 | 56 | using MusicPaymentPreview::image_; | ||
2909 | 57 | using MusicPaymentPreview::intro_; | ||
2910 | 58 | using MusicPaymentPreview::title_; | ||
2911 | 59 | using MusicPaymentPreview::subtitle_; | ||
2912 | 60 | using MusicPaymentPreview::email_label_; | ||
2913 | 61 | using MusicPaymentPreview::email_; | ||
2914 | 62 | using MusicPaymentPreview::payment_label_; | ||
2915 | 63 | using MusicPaymentPreview::payment_; | ||
2916 | 64 | using MusicPaymentPreview::password_label_; | ||
2917 | 65 | using MusicPaymentPreview::password_entry_; | ||
2918 | 66 | using MusicPaymentPreview::purchase_hint_; | ||
2919 | 67 | using MusicPaymentPreview::purchase_prize_; | ||
2920 | 68 | using MusicPaymentPreview::purchase_type_; | ||
2921 | 69 | using MusicPaymentPreview::change_payment_; | ||
2922 | 70 | using MusicPaymentPreview::forgotten_password_; | ||
2923 | 71 | using MusicPaymentPreview::error_label_; | ||
2924 | 72 | using MusicPaymentPreview::form_layout_; | ||
2925 | 73 | using MusicPaymentPreview::SetupViews; | ||
2926 | 74 | }; | ||
2927 | 75 | |||
2928 | 76 | class TestMusicPaymentPreview : public ::testing::Test | ||
2929 | 77 | { | ||
2930 | 78 | protected: | ||
2931 | 79 | TestMusicPaymentPreview() : | ||
2932 | 80 | Test(), | ||
2933 | 81 | parent_window_(new nux::BaseWindow("TestPreviewMusicPayment")) | ||
2934 | 82 | { | ||
2935 | 83 | title = "Turning Japanese"; | ||
2936 | 84 | subtitle = "The vapors"; | ||
2937 | 85 | header = "Hi test, you purchased in the past from Ubuntu One."; | ||
2938 | 86 | email = "test@canonical.com"; | ||
2939 | 87 | payment_method = "*** *** ** 12"; | ||
2940 | 88 | purchase_prize = "65$"; | ||
2941 | 89 | purchase_type = "Mp3"; | ||
2942 | 90 | preview_type = UNITY_PROTOCOL_PREVIEW_PAYMENT_TYPE_MUSIC; | ||
2943 | 91 | |||
2944 | 92 | glib::Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_payment_preview_new())); | ||
2945 | 93 | |||
2946 | 94 | unity_protocol_preview_set_title(proto_obj, title.c_str()); | ||
2947 | 95 | unity_protocol_preview_set_subtitle(proto_obj, subtitle.c_str()); | ||
2948 | 96 | unity_protocol_preview_add_action(proto_obj, "change_payment_method", "Change payment", NULL, 0); | ||
2949 | 97 | unity_protocol_preview_add_action(proto_obj, "forgot_password", "Forgot password", NULL, 0); | ||
2950 | 98 | unity_protocol_preview_add_action(proto_obj, "cancel_purchase", "Cancel", NULL, 0); | ||
2951 | 99 | unity_protocol_preview_add_action(proto_obj, "purchase_album", "Purchase", NULL, 0); | ||
2952 | 100 | |||
2953 | 101 | |||
2954 | 102 | unity_protocol_payment_preview_set_header(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), header.c_str()); | ||
2955 | 103 | unity_protocol_payment_preview_set_email(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), email.c_str()); | ||
2956 | 104 | unity_protocol_payment_preview_set_payment_method(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), payment_method.c_str()); | ||
2957 | 105 | unity_protocol_payment_preview_set_purchase_prize(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), purchase_prize.c_str()); | ||
2958 | 106 | unity_protocol_payment_preview_set_purchase_type(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), purchase_type.c_str()); | ||
2959 | 107 | unity_protocol_payment_preview_set_preview_type(UNITY_PROTOCOL_PAYMENT_PREVIEW(proto_obj.RawPtr()), preview_type); | ||
2960 | 108 | |||
2961 | 109 | glib::Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), glib::StealRef()); | ||
2962 | 110 | |||
2963 | 111 | preview_model = dash::Preview::PreviewForVariant(v); | ||
2964 | 112 | } | ||
2965 | 113 | |||
2966 | 114 | nux::ObjectPtr<nux::BaseWindow> parent_window_; | ||
2967 | 115 | dash::Preview::Ptr preview_model; | ||
2968 | 116 | |||
2969 | 117 | // testing data | ||
2970 | 118 | std::string title; | ||
2971 | 119 | std::string subtitle; | ||
2972 | 120 | std::string header; | ||
2973 | 121 | std::string email; | ||
2974 | 122 | std::string payment_method; | ||
2975 | 123 | std::string purchase_prize; | ||
2976 | 124 | std::string purchase_type; | ||
2977 | 125 | UnityProtocolPreviewPaymentType preview_type; | ||
2978 | 126 | |||
2979 | 127 | // needed for styles | ||
2980 | 128 | previews::Style previews_style; | ||
2981 | 129 | dash::Style dash_style; | ||
2982 | 130 | }; | ||
2983 | 131 | |||
2984 | 132 | TEST_F(TestMusicPaymentPreview, TestContentLoading) | ||
2985 | 133 | { | ||
2986 | 134 | MockedMusicPaymentPreview::Ptr preview_view(new MockedMusicPaymentPreview(preview_model)); | ||
2987 | 135 | |||
2988 | 136 | EXPECT_EQ(preview_view->title_->GetText(), title); | ||
2989 | 137 | EXPECT_EQ(preview_view->subtitle_->GetText(), subtitle); | ||
2990 | 138 | EXPECT_EQ(preview_view->intro_->GetText(), header); | ||
2991 | 139 | EXPECT_EQ(preview_view->email_->GetText(), email); | ||
2992 | 140 | EXPECT_EQ(preview_view->payment_->GetText(), payment_method); | ||
2993 | 141 | EXPECT_EQ(preview_view->purchase_type_->GetText(), purchase_type); | ||
2994 | 142 | EXPECT_EQ(preview_view->purchase_prize_->GetText(), purchase_prize); | ||
2995 | 143 | } | ||
2996 | 144 | |||
2997 | 145 | |||
2998 | 146 | } // previews | ||
2999 | 147 | |||
3000 | 148 | } // dash | ||
3001 | 149 | |||
3002 | 150 | } // unity | ||
3003 | diff --git a/tests/test_previews_payment.cpp b/tests/test_previews_payment.cpp | |||
3004 | 151 | deleted file mode 100644 | 0 | deleted file mode 100644 |
3005 | index 53f5417..0000000 | |||
3006 | --- a/tests/test_previews_payment.cpp | |||
3007 | +++ /dev/null | |||
3008 | @@ -1,184 +0,0 @@ | |||
3009 | 1 | // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- | ||
3010 | 2 | /* | ||
3011 | 3 | * Copyright (C) 2012-2013 Canonical Ltd | ||
3012 | 4 | * | ||
3013 | 5 | * This program is free software: you can redistribute it and/or modify | ||
3014 | 6 | * it under the terms of the GNU General Public License version 3 as | ||
3015 | 7 | * published by the Free Software Foundation. | ||
3016 | 8 | * | ||
3017 | 9 | * This program is distributed in the hope that it will be useful, | ||
3018 | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3019 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3020 | 12 | * GNU General Public License for more details. | ||
3021 | 13 | * | ||
3022 | 14 | * You should have received a copy of the GNU General Public License | ||
3023 | 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3024 | 16 | * | ||
3025 | 17 | * Authored by: Manuel de la Pena <manuel.delapena@canonical.com> | ||
3026 | 18 | */ | ||
3027 | 19 | #include <list> | ||
3028 | 20 | #include <gmock/gmock.h> | ||
3029 | 21 | |||
3030 | 22 | #include <Nux/Nux.h> | ||
3031 | 23 | #include <Nux/Layout.h> | ||
3032 | 24 | #include <Nux/VLayout.h> | ||
3033 | 25 | #include <Nux/BaseWindow.h> | ||
3034 | 26 | #include <unity-shared/StaticCairoText.h> | ||
3035 | 27 | #include <unity-shared/DashStyle.h> | ||
3036 | 28 | #include <unity-shared/PreviewStyle.h> | ||
3037 | 29 | #include <unity-shared/ThumbnailGenerator.h> | ||
3038 | 30 | #include <unity-shared/CoverArt.h> | ||
3039 | 31 | |||
3040 | 32 | #include <unity-protocol.h> | ||
3041 | 33 | #include "dash/previews/PaymentPreview.h" | ||
3042 | 34 | #include "dash/previews/ActionButton.h" | ||
3043 | 35 | #include "dash/previews/ActionLink.h" | ||
3044 | 36 | #include "test_utils.h" | ||
3045 | 37 | |||
3046 | 38 | using namespace testing; | ||
3047 | 39 | using ::testing::Return; | ||
3048 | 40 | |||
3049 | 41 | namespace unity | ||
3050 | 42 | { | ||
3051 | 43 | |||
3052 | 44 | namespace dash | ||
3053 | 45 | { | ||
3054 | 46 | |||
3055 | 47 | namespace previews | ||
3056 | 48 | { | ||
3057 | 49 | |||
3058 | 50 | class NonAbstractPreview : public PaymentPreview | ||
3059 | 51 | { | ||
3060 | 52 | public: | ||
3061 | 53 | NonAbstractPreview(dash::Preview::Ptr preview_model) | ||
3062 | 54 | : PaymentPreview(preview_model) | ||
3063 | 55 | {} | ||
3064 | 56 | |||
3065 | 57 | virtual nux::Layout* GetTitle() | ||
3066 | 58 | { | ||
3067 | 59 | return new nux::VLayout(); | ||
3068 | 60 | } | ||
3069 | 61 | |||
3070 | 62 | virtual nux::Layout* GetPrice() | ||
3071 | 63 | { | ||
3072 | 64 | return new nux::VLayout(); | ||
3073 | 65 | } | ||
3074 | 66 | |||
3075 | 67 | virtual nux::Layout* GetBody() | ||
3076 | 68 | { | ||
3077 | 69 | return new nux::VLayout(); | ||
3078 | 70 | } | ||
3079 | 71 | |||
3080 | 72 | virtual nux::Layout* GetFooter() | ||
3081 | 73 | { | ||
3082 | 74 | return new nux::VLayout(); | ||
3083 | 75 | } | ||
3084 | 76 | |||
3085 | 77 | virtual void OnActionActivated(ActionButton* button, std::string const& id) | ||
3086 | 78 | { | ||
3087 | 79 | // do nothing | ||
3088 | 80 | } | ||
3089 | 81 | |||
3090 | 82 | virtual void OnActionLinkActivated(ActionLink* link, std::string const& id) | ||
3091 | 83 | { | ||
3092 | 84 | // do nothing | ||
3093 | 85 | } | ||
3094 | 86 | |||
3095 | 87 | virtual void PreLayoutManagement() | ||
3096 | 88 | { | ||
3097 | 89 | // do nothing | ||
3098 | 90 | } | ||
3099 | 91 | |||
3100 | 92 | virtual void LoadActions() | ||
3101 | 93 | { | ||
3102 | 94 | // do nothing | ||
3103 | 95 | } | ||
3104 | 96 | |||
3105 | 97 | using PaymentPreview::GetHeader; | ||
3106 | 98 | using PaymentPreview::full_data_layout_; | ||
3107 | 99 | using PaymentPreview::content_data_layout_; | ||
3108 | 100 | using PaymentPreview::overlay_layout_; | ||
3109 | 101 | using PaymentPreview::header_layout_; | ||
3110 | 102 | using PaymentPreview::body_layout_; | ||
3111 | 103 | using PaymentPreview::footer_layout_; | ||
3112 | 104 | using PaymentPreview::SetupViews; | ||
3113 | 105 | |||
3114 | 106 | }; | ||
3115 | 107 | |||
3116 | 108 | class MockedPaymentPreview : public NonAbstractPreview | ||
3117 | 109 | { | ||
3118 | 110 | public: | ||
3119 | 111 | typedef nux::ObjectPtr<MockedPaymentPreview> Ptr; | ||
3120 | 112 | |||
3121 | 113 | MockedPaymentPreview(dash::Preview::Ptr preview_model) | ||
3122 | 114 | : NonAbstractPreview(preview_model) | ||
3123 | 115 | {} | ||
3124 | 116 | |||
3125 | 117 | // Mock methods that should be implemented so that we can assert that they are | ||
3126 | 118 | // called in the correct moments. | ||
3127 | 119 | MOCK_METHOD0(GetTitle, nux::Layout*()); | ||
3128 | 120 | MOCK_METHOD0(GetPrice, nux::Layout*()); | ||
3129 | 121 | MOCK_METHOD0(GetBody, nux::Layout*()); | ||
3130 | 122 | MOCK_METHOD0(GetFooter, nux::Layout*()); | ||
3131 | 123 | MOCK_METHOD2(OnActionActivated, void(unity::dash::ActionButton*, std::string)); | ||
3132 | 124 | MOCK_METHOD2(OnActionLinkActivated, void(unity::dash::ActionLink*, std::string)); | ||
3133 | 125 | MOCK_METHOD0(PreLayoutManagement, void()); | ||
3134 | 126 | MOCK_METHOD0(LoadActions, void()); | ||
3135 | 127 | |||
3136 | 128 | }; | ||
3137 | 129 | |||
3138 | 130 | class TestPaymentPreview : public ::testing::Test | ||
3139 | 131 | { | ||
3140 | 132 | protected: | ||
3141 | 133 | TestPaymentPreview() : Test() | ||
3142 | 134 | { | ||
3143 | 135 | glib::Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_payment_preview_new())); | ||
3144 | 136 | // we are not testing how the info is really used is more asserting the method calls, we do not add any data then | ||
3145 | 137 | glib::Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), glib::StealRef()); | ||
3146 | 138 | |||
3147 | 139 | preview_model = dash::Preview::PreviewForVariant(v); | ||
3148 | 140 | |||
3149 | 141 | preview = new MockedPaymentPreview(preview_model); | ||
3150 | 142 | |||
3151 | 143 | } | ||
3152 | 144 | nux::ObjectPtr<MockedPaymentPreview> preview; | ||
3153 | 145 | dash::Preview::Ptr preview_model; | ||
3154 | 146 | |||
3155 | 147 | // needed for styles | ||
3156 | 148 | previews::Style previews_style; | ||
3157 | 149 | dash::Style dash_style; | ||
3158 | 150 | }; | ||
3159 | 151 | |||
3160 | 152 | TEST_F(TestPaymentPreview, GetHeaderCallsCorrectMethods) | ||
3161 | 153 | { | ||
3162 | 154 | ON_CALL(*preview.GetPointer(), GetTitle()).WillByDefault(Return(new nux::VLayout())); | ||
3163 | 155 | EXPECT_CALL(*preview.GetPointer(), GetTitle()).Times(1); | ||
3164 | 156 | |||
3165 | 157 | ON_CALL(*preview.GetPointer(), GetPrice()).WillByDefault(Return(new nux::VLayout())); | ||
3166 | 158 | EXPECT_CALL(*preview.GetPointer(), GetPrice()).Times(1); | ||
3167 | 159 | |||
3168 | 160 | preview->GetHeader()->UnReference(); | ||
3169 | 161 | } | ||
3170 | 162 | |||
3171 | 163 | TEST_F(TestPaymentPreview, SetupViewsCallCorrectMethods) | ||
3172 | 164 | { | ||
3173 | 165 | ON_CALL(*preview.GetPointer(), GetTitle()).WillByDefault(Return(new nux::VLayout())); | ||
3174 | 166 | EXPECT_CALL(*preview.GetPointer(), GetTitle()).Times(1); | ||
3175 | 167 | |||
3176 | 168 | ON_CALL(*preview.GetPointer(), GetPrice()).WillByDefault(Return(new nux::VLayout())); | ||
3177 | 169 | EXPECT_CALL(*preview.GetPointer(), GetPrice()).Times(1); | ||
3178 | 170 | |||
3179 | 171 | ON_CALL(*preview.GetPointer(), GetBody()).WillByDefault(Return(new nux::VLayout())); | ||
3180 | 172 | EXPECT_CALL(*preview.GetPointer(), GetBody()).Times(1); | ||
3181 | 173 | |||
3182 | 174 | ON_CALL(*preview.GetPointer(), GetFooter()).WillByDefault(Return(new nux::VLayout())); | ||
3183 | 175 | EXPECT_CALL(*preview.GetPointer(), GetFooter()).Times(1); | ||
3184 | 176 | |||
3185 | 177 | preview->SetupViews(); | ||
3186 | 178 | } | ||
3187 | 179 | |||
3188 | 180 | } // previews | ||
3189 | 181 | |||
3190 | 182 | } // dash | ||
3191 | 183 | |||
3192 | 184 | } // unity | ||
3193 | diff --git a/tests/test_previews_social.cpp b/tests/test_previews_social.cpp | |||
3194 | 185 | deleted file mode 100644 | 0 | deleted file mode 100644 |
3195 | index 76b42e0..0000000 | |||
3196 | --- a/tests/test_previews_social.cpp | |||
3197 | +++ /dev/null | |||
3198 | @@ -1,107 +0,0 @@ | |||
3199 | 1 | // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- | ||
3200 | 2 | /* | ||
3201 | 3 | * Copyright (C) 2012 Canonical Ltd | ||
3202 | 4 | * | ||
3203 | 5 | * This program is free software: you can redistribute it and/or modify | ||
3204 | 6 | * it under the terms of the GNU General Public License version 3 as | ||
3205 | 7 | * published by the Free Software Foundation. | ||
3206 | 8 | * | ||
3207 | 9 | * This program is distributed in the hope that it will be useful, | ||
3208 | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3209 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3210 | 12 | * GNU General Public License for more details. | ||
3211 | 13 | * | ||
3212 | 14 | * You should have received a copy of the GNU General Public License | ||
3213 | 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3214 | 16 | * | ||
3215 | 17 | * Authored by: Ken VanDine <ken.vandine@canonical.com> | ||
3216 | 18 | */ | ||
3217 | 19 | |||
3218 | 20 | #include <list> | ||
3219 | 21 | #include <gmock/gmock.h> | ||
3220 | 22 | using namespace testing; | ||
3221 | 23 | |||
3222 | 24 | #include <Nux/Nux.h> | ||
3223 | 25 | #include <Nux/BaseWindow.h> | ||
3224 | 26 | #include <unity-shared/StaticCairoText.h> | ||
3225 | 27 | #include <unity-shared/DashStyle.h> | ||
3226 | 28 | #include <unity-shared/PreviewStyle.h> | ||
3227 | 29 | #include <unity-shared/ThumbnailGenerator.h> | ||
3228 | 30 | |||
3229 | 31 | #include <unity-protocol.h> | ||
3230 | 32 | #include "UnityCore/SocialPreview.h" | ||
3231 | 33 | #include "dash/previews/SocialPreview.h" | ||
3232 | 34 | #include "dash/previews/SocialPreviewContent.h" | ||
3233 | 35 | #include "dash/previews/SocialPreviewComments.h" | ||
3234 | 36 | #include "dash/previews/PreviewInfoHintWidget.h" | ||
3235 | 37 | #include "dash/previews/PreviewRatingsWidget.h" | ||
3236 | 38 | #include "test_utils.h" | ||
3237 | 39 | using namespace unity; | ||
3238 | 40 | using namespace unity::dash; | ||
3239 | 41 | |||
3240 | 42 | namespace | ||
3241 | 43 | { | ||
3242 | 44 | |||
3243 | 45 | class MockSocialPreview : public previews::SocialPreview | ||
3244 | 46 | { | ||
3245 | 47 | public: | ||
3246 | 48 | typedef nux::ObjectPtr<MockSocialPreview> Ptr; | ||
3247 | 49 | |||
3248 | 50 | MockSocialPreview(dash::Preview::Ptr preview_model) | ||
3249 | 51 | : SocialPreview(preview_model) | ||
3250 | 52 | {} | ||
3251 | 53 | |||
3252 | 54 | using SocialPreview::title_; | ||
3253 | 55 | using SocialPreview::subtitle_; | ||
3254 | 56 | using SocialPreview::content_; | ||
3255 | 57 | using SocialPreview::action_buttons_; | ||
3256 | 58 | using SocialPreview::preview_info_hints_; | ||
3257 | 59 | }; | ||
3258 | 60 | |||
3259 | 61 | class TestPreviewSocial : public Test | ||
3260 | 62 | { | ||
3261 | 63 | public: | ||
3262 | 64 | TestPreviewSocial() | ||
3263 | 65 | : parent_window_(new nux::BaseWindow("TestPreviewSocial")) | ||
3264 | 66 | { | ||
3265 | 67 | glib::Object<UnityProtocolPreview> proto_obj(UNITY_PROTOCOL_PREVIEW(unity_protocol_social_preview_new())); | ||
3266 | 68 | |||
3267 | 69 | unity_protocol_preview_set_image_source_uri(proto_obj, "http://ia.media-imdb.com/images/M/MV5BMTM3NDM5MzY5Ml5BMl5BanBnXkFtZTcwNjExMDUwOA@@._V1._SY317_.jpg"); | ||
3268 | 70 | unity_protocol_preview_set_title(proto_obj, "Social Title & special char"); | ||
3269 | 71 | unity_protocol_preview_set_subtitle(proto_obj, "Social Subtitle > special char"); | ||
3270 | 72 | unity_protocol_preview_set_description(proto_obj, "Social Desctiption < special char"); | ||
3271 | 73 | unity_protocol_preview_add_action(proto_obj, "action1", "Action 1", NULL, 0); | ||
3272 | 74 | unity_protocol_preview_add_action(proto_obj, "action2", "Action 2", NULL, 0); | ||
3273 | 75 | unity_protocol_preview_add_info_hint(proto_obj, "hint1", "Hint 1", NULL, g_variant_new("s", "string hint 1")); | ||
3274 | 76 | unity_protocol_preview_add_info_hint(proto_obj, "hint2", "Hint 2", NULL, g_variant_new("s", "string hint 2")); | ||
3275 | 77 | unity_protocol_preview_add_info_hint(proto_obj, "hint3", "Hint 3", NULL, g_variant_new("i", 12)); | ||
3276 | 78 | |||
3277 | 79 | glib::Variant v(dee_serializable_serialize(DEE_SERIALIZABLE(proto_obj.RawPtr())), glib::StealRef()); | ||
3278 | 80 | preview_model_ = dash::Preview::PreviewForVariant(v); | ||
3279 | 81 | } | ||
3280 | 82 | |||
3281 | 83 | nux::ObjectPtr<nux::BaseWindow> parent_window_; | ||
3282 | 84 | dash::Preview::Ptr preview_model_; | ||
3283 | 85 | |||
3284 | 86 | previews::Style panel_style; | ||
3285 | 87 | dash::Style dash_style; | ||
3286 | 88 | ThumbnailGenerator thumbnail_generator; | ||
3287 | 89 | }; | ||
3288 | 90 | |||
3289 | 91 | TEST_F(TestPreviewSocial, TestCreate) | ||
3290 | 92 | { | ||
3291 | 93 | previews::Preview::Ptr preview_view = previews::Preview::PreviewForModel(preview_model_); | ||
3292 | 94 | |||
3293 | 95 | EXPECT_TRUE(dynamic_cast<previews::SocialPreview*>(preview_view.GetPointer()) != NULL); | ||
3294 | 96 | } | ||
3295 | 97 | |||
3296 | 98 | TEST_F(TestPreviewSocial, TestUIValues) | ||
3297 | 99 | { | ||
3298 | 100 | MockSocialPreview::Ptr preview_view(new MockSocialPreview(preview_model_)); | ||
3299 | 101 | |||
3300 | 102 | EXPECT_EQ(preview_view->title_->GetText(), "Social Title & special char"); | ||
3301 | 103 | EXPECT_EQ(preview_view->subtitle_->GetText(), "Social Subtitle > special char"); | ||
3302 | 104 | EXPECT_EQ(preview_view->action_buttons_.size(), 2u); | ||
3303 | 105 | } | ||
3304 | 106 | |||
3305 | 107 | } | ||
3306 | diff --git a/unity-shared/BackgroundEffectHelper.cpp b/unity-shared/BackgroundEffectHelper.cpp | |||
3307 | index 507c3ea..274f184 100644 | |||
3308 | --- a/unity-shared/BackgroundEffectHelper.cpp | |||
3309 | +++ b/unity-shared/BackgroundEffectHelper.cpp | |||
3310 | @@ -27,7 +27,7 @@ namespace | |||
3311 | 27 | DECLARE_LOGGER(logger, "unity.background_effect_helper"); | 27 | DECLARE_LOGGER(logger, "unity.background_effect_helper"); |
3312 | 28 | 28 | ||
3313 | 29 | const int BLUR_RADIUS = 3; | 29 | const int BLUR_RADIUS = 3; |
3315 | 30 | const float sigma_high = 5.0f; | 30 | const float sigma_high = 10.0f; |
3316 | 31 | const float sigma_med = 3.0f; | 31 | const float sigma_med = 3.0f; |
3317 | 32 | const float sigma_low = 1.0f; | 32 | const float sigma_low = 1.0f; |
3318 | 33 | } | 33 | } |
3319 | diff --git a/unity-shared/CMakeLists.txt b/unity-shared/CMakeLists.txt | |||
3320 | index eddc807..673c7dd 100644 | |||
3321 | --- a/unity-shared/CMakeLists.txt | |||
3322 | +++ b/unity-shared/CMakeLists.txt | |||
3323 | @@ -30,9 +30,9 @@ set (UNITY_SHARED_SOURCES | |||
3324 | 30 | DesktopApplicationManager.cpp | 30 | DesktopApplicationManager.cpp |
3325 | 31 | EMConverter.cpp | 31 | EMConverter.cpp |
3326 | 32 | ExpanderView.cpp | 32 | ExpanderView.cpp |
3327 | 33 | FileManager.cpp | ||
3328 | 34 | GnomeFileManager.cpp | 33 | GnomeFileManager.cpp |
3329 | 35 | FontSettings.cpp | 34 | FontSettings.cpp |
3330 | 35 | FileManager.cpp | ||
3331 | 36 | GraphicsUtils.cpp | 36 | GraphicsUtils.cpp |
3332 | 37 | IMTextEntry.cpp | 37 | IMTextEntry.cpp |
3333 | 38 | IconLoader.cpp | 38 | IconLoader.cpp |
3334 | diff --git a/unity-shared/DashStyle.cpp b/unity-shared/DashStyle.cpp | |||
3335 | index 66ed48c..b0c3eac 100755 | |||
3336 | --- a/unity-shared/DashStyle.cpp | |||
3337 | +++ b/unity-shared/DashStyle.cpp | |||
3338 | @@ -374,35 +374,8 @@ Style::Impl::~Impl() | |||
3339 | 374 | 374 | ||
3340 | 375 | void Style::Impl::Refresh() | 375 | void Style::Impl::Refresh() |
3341 | 376 | { | 376 | { |
3371 | 377 | const char* const SAMPLE_MAX_TEXT = "Chromium Web Browser"; | 377 | text_width_ = 56; |
3372 | 378 | 378 | text_height_ = 12; | |
3344 | 379 | nux::CairoGraphics util_cg(CAIRO_FORMAT_ARGB32, 1, 1); | ||
3345 | 380 | cairo_t* cr = util_cg.GetInternalContext(); | ||
3346 | 381 | |||
3347 | 382 | auto const& font = theme::Settings::Get()->font(); | ||
3348 | 383 | PangoFontDescription* desc = ::pango_font_description_from_string(font.c_str()); | ||
3349 | 384 | ::pango_font_description_set_weight(desc, PANGO_WEIGHT_NORMAL); | ||
3350 | 385 | ::pango_font_description_set_size(desc, 9 * PANGO_SCALE); | ||
3351 | 386 | |||
3352 | 387 | glib::Object<PangoLayout> layout(::pango_cairo_create_layout(cr)); | ||
3353 | 388 | ::pango_layout_set_font_description(layout, desc); | ||
3354 | 389 | ::pango_layout_set_text(layout, SAMPLE_MAX_TEXT, -1); | ||
3355 | 390 | |||
3356 | 391 | PangoContext* cxt = ::pango_layout_get_context(layout); | ||
3357 | 392 | |||
3358 | 393 | GdkScreen* screen = ::gdk_screen_get_default(); | ||
3359 | 394 | ::pango_cairo_context_set_font_options(cxt, ::gdk_screen_get_font_options(screen)); | ||
3360 | 395 | ::pango_cairo_context_set_resolution(cxt, 96.0 * Settings::Instance().font_scaling()); | ||
3361 | 396 | ::pango_layout_context_changed(layout); | ||
3362 | 397 | |||
3363 | 398 | PangoRectangle log_rect; | ||
3364 | 399 | ::pango_layout_get_pixel_extents(layout, NULL, &log_rect); | ||
3365 | 400 | text_width_ = log_rect.width; | ||
3366 | 401 | text_height_ = log_rect.height; | ||
3367 | 402 | |||
3368 | 403 | owner_->changed.emit(); | ||
3369 | 404 | |||
3370 | 405 | pango_font_description_free(desc); | ||
3373 | 406 | } | 379 | } |
3374 | 407 | 380 | ||
3375 | 408 | void Style::Impl::UpdateFormFactor(FormFactor form_factor) | 381 | void Style::Impl::UpdateFormFactor(FormFactor form_factor) |
3376 | @@ -2186,6 +2159,11 @@ BaseTexturePtr Style::GetDashRightCornerMask(double scale) const | |||
3377 | 2186 | return pimpl->LoadScaledTexture("dash_top_right_corner_mask", scale); | 2159 | return pimpl->LoadScaledTexture("dash_top_right_corner_mask", scale); |
3378 | 2187 | } | 2160 | } |
3379 | 2188 | 2161 | ||
3380 | 2162 | BaseTexturePtr Style::GetEmpty(double scale) const | ||
3381 | 2163 | { | ||
3382 | 2164 | return pimpl->LoadScaledTexture("empty", scale); | ||
3383 | 2165 | } | ||
3384 | 2166 | |||
3385 | 2189 | BaseTexturePtr Style::GetSearchMagnifyIcon(double scale) const | 2167 | BaseTexturePtr Style::GetSearchMagnifyIcon(double scale) const |
3386 | 2190 | { | 2168 | { |
3387 | 2191 | return pimpl->LoadScaledTexture("search_magnify", scale); | 2169 | return pimpl->LoadScaledTexture("search_magnify", scale); |
3388 | @@ -2236,33 +2214,33 @@ nux::Color const& Style::GetTextColor() const | |||
3389 | 2236 | 2214 | ||
3390 | 2237 | RawPixel Style::GetTileGIconSize() const | 2215 | RawPixel Style::GetTileGIconSize() const |
3391 | 2238 | { | 2216 | { |
3393 | 2239 | return 64; | 2217 | return 48; |
3394 | 2240 | } | 2218 | } |
3395 | 2241 | 2219 | ||
3396 | 2242 | RawPixel Style::GetTileImageSize() const | 2220 | RawPixel Style::GetTileImageSize() const |
3397 | 2243 | { | 2221 | { |
3399 | 2244 | return 96; | 2222 | return 48; |
3400 | 2245 | } | 2223 | } |
3401 | 2246 | 2224 | ||
3402 | 2247 | RawPixel Style::GetTileWidth() const | 2225 | RawPixel Style::GetTileWidth() const |
3403 | 2248 | { | 2226 | { |
3405 | 2249 | return std::max(pimpl->text_width_, 150); | 2227 | return std::max(pimpl->text_width_, 106); |
3406 | 2250 | } | 2228 | } |
3407 | 2251 | 2229 | ||
3408 | 2252 | RawPixel Style::GetTileHeight() const | 2230 | RawPixel Style::GetTileHeight() const |
3409 | 2253 | { | 2231 | { |
3410 | 2254 | return std::max(GetTileImageSize() + (pimpl->text_height_ * 2) + 15, | 2232 | return std::max(GetTileImageSize() + (pimpl->text_height_ * 2) + 15, |
3412 | 2255 | GetTileImageSize() + 32); // magic design numbers. | 2233 | GetTileImageSize() + 80); // magic design numbers. |
3413 | 2256 | } | 2234 | } |
3414 | 2257 | 2235 | ||
3415 | 2258 | RawPixel Style::GetTileIconHightlightHeight() const | 2236 | RawPixel Style::GetTileIconHightlightHeight() const |
3416 | 2259 | { | 2237 | { |
3418 | 2260 | return 106; | 2238 | return 48; |
3419 | 2261 | } | 2239 | } |
3420 | 2262 | 2240 | ||
3421 | 2263 | RawPixel Style::GetTileIconHightlightWidth() const | 2241 | RawPixel Style::GetTileIconHightlightWidth() const |
3422 | 2264 | { | 2242 | { |
3424 | 2265 | return 106; | 2243 | return 48; |
3425 | 2266 | } | 2244 | } |
3426 | 2267 | 2245 | ||
3427 | 2268 | RawPixel Style::GetHomeTileIconSize() const | 2246 | RawPixel Style::GetHomeTileIconSize() const |
3428 | @@ -2363,7 +2341,7 @@ RawPixel Style::GetHSeparatorSize() const | |||
3429 | 2363 | 2341 | ||
3430 | 2364 | RawPixel Style::GetFilterBarWidth() const | 2342 | RawPixel Style::GetFilterBarWidth() const |
3431 | 2365 | { | 2343 | { |
3433 | 2366 | return 300; | 2344 | return 250; |
3434 | 2367 | } | 2345 | } |
3435 | 2368 | 2346 | ||
3436 | 2369 | RawPixel Style::GetFilterBarLeftPadding() const | 2347 | RawPixel Style::GetFilterBarLeftPadding() const |
3437 | @@ -2418,7 +2396,7 @@ RawPixel Style::GetFilterHighlightPadding() const | |||
3438 | 2418 | 2396 | ||
3439 | 2419 | RawPixel Style::GetSpaceBetweenFilterWidgets() const | 2397 | RawPixel Style::GetSpaceBetweenFilterWidgets() const |
3440 | 2420 | { | 2398 | { |
3442 | 2421 | return 12; | 2399 | return 6; |
3443 | 2422 | } | 2400 | } |
3444 | 2423 | 2401 | ||
3445 | 2424 | RawPixel Style::GetAllButtonHeight() const | 2402 | RawPixel Style::GetAllButtonHeight() const |
3446 | @@ -2498,12 +2476,12 @@ RawPixel Style::GetPlacesGroupTopSpace() const | |||
3447 | 2498 | 2476 | ||
3448 | 2499 | RawPixel Style::GetPlacesGroupResultTopPadding() const | 2477 | RawPixel Style::GetPlacesGroupResultTopPadding() const |
3449 | 2500 | { | 2478 | { |
3451 | 2501 | return 2; | 2479 | return 19; |
3452 | 2502 | } | 2480 | } |
3453 | 2503 | 2481 | ||
3454 | 2504 | RawPixel Style::GetPlacesGroupResultLeftPadding() const | 2482 | RawPixel Style::GetPlacesGroupResultLeftPadding() const |
3455 | 2505 | { | 2483 | { |
3457 | 2506 | return 25; | 2484 | return 19; |
3458 | 2507 | } | 2485 | } |
3459 | 2508 | 2486 | ||
3460 | 2509 | RawPixel Style::GetCategoryHeaderLeftPadding() const | 2487 | RawPixel Style::GetCategoryHeaderLeftPadding() const |
3461 | diff --git a/unity-shared/DashStyle.h b/unity-shared/DashStyle.h | |||
3462 | index f080297..dd127c4 100755 | |||
3463 | --- a/unity-shared/DashStyle.h | |||
3464 | +++ b/unity-shared/DashStyle.h | |||
3465 | @@ -178,6 +178,8 @@ public: | |||
3466 | 178 | BaseTexturePtr GetDashLeftTile(double scale) const; | 178 | BaseTexturePtr GetDashLeftTile(double scale) const; |
3467 | 179 | BaseTexturePtr GetDashTopTile(double scale) const; | 179 | BaseTexturePtr GetDashTopTile(double scale) const; |
3468 | 180 | 180 | ||
3469 | 181 | BaseTexturePtr GetEmpty(double scale) const; | ||
3470 | 182 | |||
3471 | 181 | BaseTexturePtr GetDashCorner(double scale) const; | 183 | BaseTexturePtr GetDashCorner(double scale) const; |
3472 | 182 | BaseTexturePtr GetDashCornerMask(double scale) const; | 184 | BaseTexturePtr GetDashCornerMask(double scale) const; |
3473 | 183 | BaseTexturePtr GetDashLeftCorner(double scale) const; | 185 | BaseTexturePtr GetDashLeftCorner(double scale) const; |
3474 | diff --git a/unity-shared/FileManager.cpp b/unity-shared/FileManager.cpp | |||
3475 | index c48a466..6fc574e 100644 | |||
3476 | --- a/unity-shared/FileManager.cpp | |||
3477 | +++ b/unity-shared/FileManager.cpp | |||
3478 | @@ -24,7 +24,7 @@ | |||
3479 | 24 | #include "GnomeFileManager.h" | 24 | #include "GnomeFileManager.h" |
3480 | 25 | #include "NemoFileManager.h" | 25 | #include "NemoFileManager.h" |
3481 | 26 | 26 | ||
3483 | 27 | #include <gio/gdesktopappinfo.h> | 27 | #include <gio/gio.h> |
3484 | 28 | 28 | ||
3485 | 29 | namespace unity | 29 | namespace unity |
3486 | 30 | { | 30 | { |
3487 | diff --git a/unity-shared/FileManager.h b/unity-shared/FileManager.h | |||
3488 | index bb636d4..6b802c6 100644 | |||
3489 | --- a/unity-shared/FileManager.h | |||
3490 | +++ b/unity-shared/FileManager.h | |||
3491 | @@ -61,4 +61,4 @@ private: | |||
3492 | 61 | 61 | ||
3493 | 62 | } // namespace unity | 62 | } // namespace unity |
3494 | 63 | 63 | ||
3496 | 64 | #endif | 64 | #endif |
3497 | 65 | \ No newline at end of file | 65 | \ No newline at end of file |
3498 | diff --git a/unity-shared/GnomeFileManager.h b/unity-shared/GnomeFileManager.h | |||
3499 | index b9c3dd8..6fa53a6 100644 | |||
3500 | --- a/unity-shared/GnomeFileManager.h | |||
3501 | +++ b/unity-shared/GnomeFileManager.h | |||
3502 | @@ -51,4 +51,4 @@ private: | |||
3503 | 51 | 51 | ||
3504 | 52 | } | 52 | } |
3505 | 53 | 53 | ||
3507 | 54 | #endif | 54 | #endif |
3508 | 55 | \ No newline at end of file | 55 | \ No newline at end of file |
3509 | diff --git a/unity-shared/NemoFileManager.cpp b/unity-shared/NemoFileManager.cpp | |||
3510 | index 81432cf..e8889e6 100644 | |||
3511 | --- a/unity-shared/NemoFileManager.cpp | |||
3512 | +++ b/unity-shared/NemoFileManager.cpp | |||
3513 | @@ -19,12 +19,12 @@ | |||
3514 | 19 | 19 | ||
3515 | 20 | #include "NemoFileManager.h" | 20 | #include "NemoFileManager.h" |
3516 | 21 | #include <NuxCore/Logger.h> | 21 | #include <NuxCore/Logger.h> |
3518 | 22 | 22 | #include <UnityCore/DesktopUtilities.h> | |
3519 | 23 | #include <UnityCore/GLibDBusProxy.h> | 23 | #include <UnityCore/GLibDBusProxy.h> |
3520 | 24 | #include <UnityCore/GLibWrapper.h> | 24 | #include <UnityCore/GLibWrapper.h> |
3521 | 25 | #include <gio/gdesktopappinfo.h> | ||
3522 | 26 | #include <gdk/gdk.h> | 25 | #include <gdk/gdk.h> |
3523 | 27 | #include <gio/gio.h> | 26 | #include <gio/gio.h> |
3524 | 27 | #include <gio/gdesktopappinfo.h> | ||
3525 | 28 | 28 | ||
3526 | 29 | namespace unity | 29 | namespace unity |
3527 | 30 | { | 30 | { |
3528 | @@ -38,30 +38,48 @@ const std::string FILE_SCHEMA = "file://"; | |||
3529 | 38 | 38 | ||
3530 | 39 | const std::string NEMO_DESKTOP_ID = "nemo.desktop"; | 39 | const std::string NEMO_DESKTOP_ID = "nemo.desktop"; |
3531 | 40 | const std::string NEMO_NAME = "org.Nemo"; | 40 | const std::string NEMO_NAME = "org.Nemo"; |
3533 | 41 | const std::string NEMO_PATH = "/org/Nemo"; | 41 | const std::string NEMO_FILE_OPS_PATH = "/org/Nemo"; |
3534 | 42 | } | 42 | } |
3535 | 43 | 43 | ||
3536 | 44 | struct NemoFileManager::Impl | 44 | struct NemoFileManager::Impl |
3537 | 45 | { | 45 | { |
3538 | 46 | Impl(NemoFileManager* parent) | 46 | Impl(NemoFileManager* parent) |
3539 | 47 | : parent_(parent) | 47 | : parent_(parent) |
3540 | 48 | , app_info_(g_desktop_app_info_new(NEMO_DESKTOP_ID.c_str())) | ||
3541 | 49 | { | 48 | { |
3542 | 50 | } | 49 | } |
3543 | 51 | 50 | ||
3544 | 52 | glib::DBusProxy::Ptr NemoOperationsProxy() const | 51 | glib::DBusProxy::Ptr NemoOperationsProxy() const |
3545 | 53 | { | 52 | { |
3546 | 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); |
3548 | 55 | return std::make_shared<glib::DBusProxy>(NEMO_NAME, NEMO_PATH, | 54 | return std::make_shared<glib::DBusProxy>(NEMO_NAME, NEMO_FILE_OPS_PATH, |
3549 | 56 | "org.Nemo.FileOperations", | 55 | "org.Nemo.FileOperations", |
3550 | 57 | G_BUS_TYPE_SESSION, flags); | 56 | G_BUS_TYPE_SESSION, flags); |
3551 | 58 | } | 57 | } |
3552 | 59 | 58 | ||
3557 | 60 | void Activate(uint64_t timestamp) | 59 | NemoFileManager* parent_; |
3558 | 61 | { | 60 | }; |
3559 | 62 | if (!app_info_) | 61 | |
3560 | 63 | return; | 62 | |
3561 | 63 | FileManager::Ptr NemoFileManager::Get() | ||
3562 | 64 | { | ||
3563 | 65 | static FileManager::Ptr instance(new NemoFileManager()); | ||
3564 | 66 | return instance; | ||
3565 | 67 | } | ||
3566 | 68 | |||
3567 | 69 | NemoFileManager::NemoFileManager() | ||
3568 | 70 | : impl_(new Impl(this)) | ||
3569 | 71 | {} | ||
3570 | 72 | |||
3571 | 73 | NemoFileManager::~NemoFileManager() | ||
3572 | 74 | {} | ||
3573 | 64 | 75 | ||
3574 | 76 | void Activate(uint64_t timestamp) | ||
3575 | 77 | { | ||
3576 | 78 | glib::Cancellable cancellable; | ||
3577 | 79 | glib::Object<GAppInfo> app_info(G_APP_INFO (g_desktop_app_info_new(NEMO_DESKTOP_ID.c_str()))); | ||
3578 | 80 | |||
3579 | 81 | if (app_info) | ||
3580 | 82 | { | ||
3581 | 65 | GdkDisplay* display = gdk_display_get_default(); | 83 | GdkDisplay* display = gdk_display_get_default(); |
3582 | 66 | glib::Object<GdkAppLaunchContext> context(gdk_display_get_app_launch_context(display)); | 84 | glib::Object<GdkAppLaunchContext> context(gdk_display_get_app_launch_context(display)); |
3583 | 67 | 85 | ||
3584 | @@ -69,11 +87,10 @@ struct NemoFileManager::Impl | |||
3585 | 69 | gdk_app_launch_context_set_timestamp(context, timestamp); | 87 | gdk_app_launch_context_set_timestamp(context, timestamp); |
3586 | 70 | 88 | ||
3587 | 71 | auto const& gcontext = glib::object_cast<GAppLaunchContext>(context); | 89 | auto const& gcontext = glib::object_cast<GAppLaunchContext>(context); |
3590 | 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, |
3591 | 73 | "org.freedesktop.Application"); | 91 | "org.freedesktop.Application"); |
3592 | 74 | 92 | ||
3595 | 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)); |
3594 | 76 | gcontext, glib::object_cast<GAppInfo>(app_info_), nullptr)); | ||
3596 | 77 | 94 | ||
3597 | 78 | if (context_string && g_utf8_validate(context_string, -1, nullptr)) | 95 | if (context_string && g_utf8_validate(context_string, -1, nullptr)) |
3598 | 79 | { | 96 | { |
3599 | @@ -86,25 +103,8 @@ struct NemoFileManager::Impl | |||
3600 | 86 | proxy->CallBegin("Activate", param, [proxy] (GVariant*, glib::Error const&) {}); | 103 | proxy->CallBegin("Activate", param, [proxy] (GVariant*, glib::Error const&) {}); |
3601 | 87 | } | 104 | } |
3602 | 88 | } | 105 | } |
3603 | 89 | |||
3604 | 90 | glib::Object<GDesktopAppInfo> app_info_; | ||
3605 | 91 | NemoFileManager* parent_; | ||
3606 | 92 | }; | ||
3607 | 93 | |||
3608 | 94 | |||
3609 | 95 | FileManager::Ptr NemoFileManager::Get() | ||
3610 | 96 | { | ||
3611 | 97 | static FileManager::Ptr instance(new NemoFileManager()); | ||
3612 | 98 | return instance; | ||
3613 | 99 | } | 106 | } |
3614 | 100 | 107 | ||
3615 | 101 | NemoFileManager::NemoFileManager() | ||
3616 | 102 | : impl_(new Impl(this)) | ||
3617 | 103 | {} | ||
3618 | 104 | |||
3619 | 105 | NemoFileManager::~NemoFileManager() | ||
3620 | 106 | {} | ||
3621 | 107 | |||
3622 | 108 | void NemoFileManager::Open(std::string const& uri, uint64_t timestamp) | 108 | void NemoFileManager::Open(std::string const& uri, uint64_t timestamp) |
3623 | 109 | { | 109 | { |
3624 | 110 | if (uri.empty()) | 110 | if (uri.empty()) |
3625 | @@ -152,7 +152,7 @@ void NemoFileManager::EmptyTrash(uint64_t timestamp, Window parent_xid) | |||
3626 | 152 | auto const& proxy = impl_->NemoOperationsProxy(); | 152 | auto const& proxy = impl_->NemoOperationsProxy(); |
3627 | 153 | 153 | ||
3628 | 154 | // Passing the proxy to the lambda we ensure that it will be destroyed when needed | 154 | // Passing the proxy to the lambda we ensure that it will be destroyed when needed |
3630 | 155 | impl_->Activate(timestamp); | 155 | Activate(timestamp); |
3631 | 156 | proxy->CallBegin("EmptyTrash", nullptr, [proxy] (GVariant*, glib::Error const&) {}); | 156 | proxy->CallBegin("EmptyTrash", nullptr, [proxy] (GVariant*, glib::Error const&) {}); |
3632 | 157 | } | 157 | } |
3633 | 158 | 158 | ||
3634 | @@ -184,7 +184,7 @@ void NemoFileManager::CopyFiles(std::set<std::string> const& uris, std::string c | |||
3635 | 184 | // Passing the proxy to the lambda we ensure that it will be destroyed when needed | 184 | // Passing the proxy to the lambda we ensure that it will be destroyed when needed |
3636 | 185 | auto const& proxy = impl_->NemoOperationsProxy(); | 185 | auto const& proxy = impl_->NemoOperationsProxy(); |
3637 | 186 | proxy->CallBegin("CopyURIs", parameters, [proxy] (GVariant*, glib::Error const&) {}); | 186 | proxy->CallBegin("CopyURIs", parameters, [proxy] (GVariant*, glib::Error const&) {}); |
3639 | 187 | impl_->Activate(timestamp); | 187 | Activate(timestamp); |
3640 | 188 | } | 188 | } |
3641 | 189 | } | 189 | } |
3642 | 190 | 190 | ||
3643 | @@ -199,4 +199,4 @@ std::string NemoFileManager::LocationForWindow(ApplicationWindowPtr const& win) | |||
3644 | 199 | return std::string(); | 199 | return std::string(); |
3645 | 200 | } | 200 | } |
3646 | 201 | 201 | ||
3648 | 202 | } // namespace unity | 202 | } // namespace unity |
3649 | 203 | \ No newline at end of file | 203 | \ No newline at end of file |
3650 | diff --git a/unity-shared/NemoFileManager.h b/unity-shared/NemoFileManager.h | |||
3651 | index aaa4e91..94321a9 100644 | |||
3652 | --- a/unity-shared/NemoFileManager.h | |||
3653 | +++ b/unity-shared/NemoFileManager.h | |||
3654 | @@ -47,4 +47,4 @@ private: | |||
3655 | 47 | std::unique_ptr<Impl> impl_; | 47 | std::unique_ptr<Impl> impl_; |
3656 | 48 | }; | 48 | }; |
3657 | 49 | 49 | ||
3659 | 50 | } // namespace unity | 50 | } |
3660 | diff --git a/unity-shared/OverlayRenderer.cpp b/unity-shared/OverlayRenderer.cpp | |||
3661 | index 475ad5e..e35a3e8 100644 | |||
3662 | --- a/unity-shared/OverlayRenderer.cpp | |||
3663 | +++ b/unity-shared/OverlayRenderer.cpp | |||
3664 | @@ -99,6 +99,8 @@ public: | |||
3665 | 99 | nux::ObjectPtr<nux::BaseTexture> right_corner_; | 99 | nux::ObjectPtr<nux::BaseTexture> right_corner_; |
3666 | 100 | nux::ObjectPtr<nux::BaseTexture> right_corner_mask_; | 100 | nux::ObjectPtr<nux::BaseTexture> right_corner_mask_; |
3667 | 101 | 101 | ||
3668 | 102 | OverlayPosition dash_position = OverlayPosition::LEFT; | ||
3669 | 103 | |||
3670 | 102 | // temporary variable that stores the number of backgrounds we have rendered | 104 | // temporary variable that stores the number of backgrounds we have rendered |
3671 | 103 | int bgs; | 105 | int bgs; |
3672 | 104 | bool visible; | 106 | bool visible; |
3673 | @@ -140,20 +142,37 @@ void OverlayRendererImpl::LoadScaledTextures() | |||
3674 | 140 | double scale = parent->scale; | 142 | double scale = parent->scale; |
3675 | 141 | auto& style = dash::Style::Instance(); | 143 | auto& style = dash::Style::Instance(); |
3676 | 142 | 144 | ||
3691 | 143 | horizontal_texture_ = style.GetDashHorizontalTile(scale); | 145 | if (parent->owner_type == OverlayOwner::Hud) { |
3692 | 144 | horizontal_texture_mask_ = style.GetDashHorizontalTileMask(scale); | 146 | horizontal_texture_ = style.GetDashHorizontalTile(scale); |
3693 | 145 | right_texture_ = style.GetDashRightTile(scale); | 147 | horizontal_texture_mask_ = style.GetDashHorizontalTileMask(scale); |
3694 | 146 | right_texture_mask_ = style.GetDashRightTileMask(scale); | 148 | right_texture_ = style.GetDashRightTile(scale); |
3695 | 147 | top_left_texture_ = style.GetDashTopLeftTile(scale); | 149 | right_texture_mask_ = style.GetDashRightTileMask(scale); |
3696 | 148 | left_texture_ = style.GetDashLeftTile(scale); | 150 | top_left_texture_ = style.GetDashTopLeftTile(scale); |
3697 | 149 | top_texture_ = style.GetDashTopTile(scale); | 151 | left_texture_ = style.GetDashLeftTile(scale); |
3698 | 150 | 152 | top_texture_ = style.GetDashTopTile(scale); | |
3699 | 151 | corner_ = style.GetDashCorner(scale); | 153 | |
3700 | 152 | corner_mask_ = style.GetDashCornerMask(scale); | 154 | corner_ = style.GetDashCorner(scale); |
3701 | 153 | left_corner_ = style.GetDashLeftCorner(scale); | 155 | corner_mask_ = style.GetDashCornerMask(scale); |
3702 | 154 | left_corner_mask_ = style.GetDashLeftCornerMask(scale); | 156 | left_corner_ = style.GetDashLeftCorner(scale); |
3703 | 155 | right_corner_ = style.GetDashRightCorner(scale); | 157 | left_corner_mask_ = style.GetDashLeftCornerMask(scale); |
3704 | 156 | right_corner_mask_ = style.GetDashRightCornerMask(scale); | 158 | right_corner_ = style.GetDashRightCorner(scale); |
3705 | 159 | right_corner_mask_ = style.GetDashRightCornerMask(scale); | ||
3706 | 160 | } else { | ||
3707 | 161 | horizontal_texture_ = style.GetEmpty(scale); | ||
3708 | 162 | horizontal_texture_mask_ = style.GetEmpty(scale); | ||
3709 | 163 | right_texture_ = style.GetEmpty(scale); | ||
3710 | 164 | right_texture_mask_ = style.GetEmpty(scale); | ||
3711 | 165 | top_left_texture_ = style.GetEmpty(scale); | ||
3712 | 166 | left_texture_ = style.GetEmpty(scale); | ||
3713 | 167 | top_texture_ = style.GetEmpty(scale); | ||
3714 | 168 | |||
3715 | 169 | corner_ = style.GetEmpty(scale); | ||
3716 | 170 | corner_mask_ = style.GetEmpty(scale); | ||
3717 | 171 | left_corner_ = style.GetEmpty(scale); | ||
3718 | 172 | left_corner_mask_ = style.GetEmpty(scale); | ||
3719 | 173 | right_corner_ = style.GetEmpty(scale); | ||
3720 | 174 | right_corner_mask_ = style.GetEmpty(scale); | ||
3721 | 175 | } | ||
3722 | 157 | } | 176 | } |
3723 | 158 | 177 | ||
3724 | 159 | void OverlayRendererImpl::OnBgColorChanged(nux::Color const& new_color) | 178 | void OverlayRendererImpl::OnBgColorChanged(nux::Color const& new_color) |
3725 | @@ -186,7 +205,7 @@ void OverlayRendererImpl::UpdateTextures() | |||
3726 | 186 | rop.Blend = true; | 205 | rop.Blend = true; |
3727 | 187 | rop.SrcBlend = GL_ZERO; | 206 | rop.SrcBlend = GL_ZERO; |
3728 | 188 | rop.DstBlend = GL_SRC_COLOR; | 207 | rop.DstBlend = GL_SRC_COLOR; |
3730 | 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); |
3731 | 190 | 209 | ||
3732 | 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. |
3733 | 192 | if (Settings::Instance().low_gfx()) | 211 | if (Settings::Instance().low_gfx()) |
3734 | @@ -198,7 +217,7 @@ void OverlayRendererImpl::UpdateTextures() | |||
3735 | 198 | } | 217 | } |
3736 | 199 | 218 | ||
3737 | 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); |
3739 | 201 | bg_shine_texture_ = dash::Style::Instance().GetDashShine()->GetDeviceTexture(); | 220 | // bg_shine_texture_ = dash::Style::Instance().GetDashShine()->GetDeviceTexture(); |
3740 | 202 | 221 | ||
3741 | 203 | auto const& bg_refine_tex = dash::Style::Instance().GetRefineTextureDash(); | 222 | auto const& bg_refine_tex = dash::Style::Instance().GetRefineTextureDash(); |
3742 | 204 | 223 | ||
3743 | @@ -619,7 +638,6 @@ void OverlayRendererImpl::Draw(nux::GraphicsEngine& gfx_context, nux::Geometry c | |||
3744 | 619 | int launcher_size = Settings::Instance().LauncherSize(monitor); | 638 | int launcher_size = Settings::Instance().LauncherSize(monitor); |
3745 | 620 | int panel_height = panel::Style::Instance().PanelHeight(monitor); | 639 | int panel_height = panel::Style::Instance().PanelHeight(monitor); |
3746 | 621 | 640 | ||
3747 | 622 | auto dash_position = OverlayPosition::LEFT; | ||
3748 | 623 | int border_y = content_geo.y; | 641 | int border_y = conten |
Some my previous comments are still valid:
- invalid trove classifier
- reference to non-existing license file
- bare "except:"
And a few new comments.