Merge lp:~brandontschaefer/unity/lp.1239381-fix-7.0 into lp:unity/7.1

Proposed by Brandon Schaefer
Status: Rejected
Rejected by: Brandon Schaefer
Proposed branch: lp:~brandontschaefer/unity/lp.1239381-fix-7.0
Merge into: lp:unity/7.1
Diff against target: 875 lines (+447/-2) (has conflicts)
20 files modified
dash/ResultRendererTile.cpp (+54/-1)
dash/previews/MusicPreview.cpp (+57/-0)
dash/previews/MusicPreview.h (+6/-0)
debian/changelog (+72/-0)
launcher/ApplicationLauncherIcon.cpp (+11/-0)
launcher/ApplicationLauncherIcon.h (+5/-0)
launcher/LauncherIcon.h (+9/-0)
launcher/SwitcherController.cpp (+12/-1)
plugins/unityshell/src/unityshell.cpp (+45/-0)
services/panel-service.c (+20/-0)
tests/mock-application.h (+14/-0)
tests/test_application_launcher_icon.cpp (+26/-0)
tests/test_switcher_controller.cpp (+18/-0)
tests/test_switcher_controller.h (+15/-0)
tests/test_switcher_controller_class.cpp (+29/-0)
unity-shared/IconRenderer.cpp (+9/-0)
unity-shared/IconTextureSource.cpp (+18/-0)
unity-shared/IconTextureSource.h (+7/-0)
unity-shared/PreviewStyle.cpp (+16/-0)
unity-shared/StandaloneWindowManager.h (+4/-0)
Text conflict in dash/previews/MusicPreview.cpp
Text conflict in dash/previews/MusicPreview.h
Text conflict in debian/changelog
Text conflict in launcher/ApplicationLauncherIcon.cpp
Text conflict in launcher/ApplicationLauncherIcon.h
Text conflict in launcher/LauncherIcon.h
Text conflict in launcher/SwitcherController.cpp
Text conflict in plugins/unityshell/src/unityshell.cpp
Text conflict in services/panel-service.c
Text conflict in tests/mock-application.h
Text conflict in tests/test_application_launcher_icon.cpp
Text conflict in tests/test_switcher_controller.cpp
Text conflict in tests/test_switcher_controller.h
Text conflict in tests/test_switcher_controller_class.cpp
Text conflict in unity-shared/IconRenderer.cpp
Text conflict in unity-shared/IconTextureSource.cpp
Text conflict in unity-shared/IconTextureSource.h
Text conflict in unity-shared/PreviewStyle.cpp
Text conflict in unity-shared/StandaloneWindowManager.h
To merge this branch: bzr merge lp:~brandontschaefer/unity/lp.1239381-fix-7.0
Reviewer Review Type Date Requested Status
Christopher Townsend Pending
Review via email: mp+200690@code.launchpad.net

This proposal supersedes a proposal from 2014-01-06.

Commit message

Replaces blacklisted characters with '?'. This is a workaround for an issue else where in pango.

Description of the change

*THIS IS A WORKAROUND*

It causes a crash on characters when renderering. So the workaround for now is to replace all blacklisted characters with '?' until this bug is fixed. As we don't want to crash or filter out results.

To post a comment you must log in.
Revision history for this message
Christopher Townsend (townsend) wrote : Posted in a previous version of this proposal

+1

review: Approve
Revision history for this message
Christopher Townsend (townsend) wrote : Posted in a previous version of this proposal

Oops, this was targeted against the wrong Unity branch. I assume this is for Saucy, so it should be targeted for lp:unity/7.1.

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

Dam though saucy was 7.0. Need to make a new branch :)

Unmerged revisions

3323. By Brandon Schaefer

* Backport ResultRenderTile workaround where it was crashing in pango based
  on the type of text recived.

3322. By Andrea Azzarone

Cherrypick lp:unity rev 3443.

Approved by Stephen M. Webb, PS Jenkins bot.

3321. By PS Jenkins bot

Releasing 7.0.0daily13.06.19~13.04-0ubuntu1 to ubuntu.

Approved by PS Jenkins bot.

3320. By Łukasz Zemczak

Revert changelog entry that never went into ubuntu #nochangelog

3319. By PS Jenkins bot

Releasing 7.0.0daily13.05.31~13.04-0ubuntu1 to ubuntu.

Approved by PS Jenkins bot.

3318. By William Hua

Revert 3196 to fix menu highlighting issues with LibreOffice.

Revision 3196 prevents LibreOffice's menu items from highlighting.
See Launchpad bug #1153350. Fixes: https://bugs.launchpad.net/bugs/1153350.

Approved by PS Jenkins bot, Andrea Azzarone, Marco Trevisan (Treviño).

3317. By Marco Trevisan (Treviño)

SwitcherController: use proper long long types for WindowActiveNumber

Otherwise an overflow can cause bad window selection after long uptime. Fixes: https://bugs.launchpad.net/bugs/1181367.

Approved by PS Jenkins bot, Andrea Azzarone, Brandon Schaefer.

3316. By Christopher Townsend

Fixes issue where minimizing a full screen window would not draw the Launcher and Panel after minimization. This is a backport of lp:unity revno. 3320. Fixes: https://bugs.launchpad.net/bugs/1064155.

Approved by Brandon Schaefer, PS Jenkins bot.

3315. By PS Jenkins bot

Releasing 7.0.0daily13.05.08~13.04-0ubuntu1 to ubuntu.

Approved by PS Jenkins bot.

3314. By Andrea Azzarone

Disable detail view for webapp icons. Fixes: https://bugs.launchpad.net/bugs/1169340.

Approved by PS Jenkins bot, Marco Trevisan (Treviño).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'dash/ResultRendererTile.cpp'
2--- dash/ResultRendererTile.cpp 2013-04-30 16:58:48 +0000
3+++ dash/ResultRendererTile.cpp 2014-01-07 16:49:23 +0000
4@@ -45,6 +45,7 @@
5 namespace
6 {
7 const int FONT_SIZE = 10;
8+const char REPLACEMENT_CHAR = '?';
9
10 const float CORNER_HIGHTLIGHT_RADIUS = 2.0f;
11
12@@ -393,6 +394,55 @@
13 }
14 }
15
16+/* Blacklisted unicode ranges:
17+ * Burmese: U+1000 -> U+109F
18+ * Extended: U+AA60 -> U+AA7B
19+*/
20+bool IsBlacklistedChar(gunichar uni_c)
21+{
22+ if ((uni_c >= 0x1000 && uni_c <= 0x109F) ||
23+ (uni_c >= 0xAA60 && uni_c >= 0xAA7B))
24+ {
25+ return true;
26+ }
27+
28+ return false;
29+}
30+
31+// FIXME Bug (lp.1239381) in the backend of pango that crashes
32+// when using ellipsize with/height setting in pango
33+std::string ReplaceBlacklistedChars(std::string const& str)
34+{
35+ std::string new_string("");
36+
37+ if (!g_utf8_validate(str.c_str(), -1, NULL))
38+ return new_string;
39+
40+ gchar const* uni_s = str.c_str();
41+ gunichar uni_c;
42+ gchar utf8_buff[6];
43+
44+ int size = g_utf8_strlen(uni_s, -1);
45+ for (int i = 0; i < size; ++i)
46+ {
47+ uni_s = g_utf8_next_char(uni_s);
48+ uni_c = g_utf8_get_char(uni_s);
49+
50+ if (IsBlacklistedChar(uni_c))
51+ {
52+ new_string += REPLACEMENT_CHAR;
53+ }
54+ else
55+ {
56+ int end = g_unichar_to_utf8(uni_c, utf8_buff);
57+ utf8_buff[end] = '\0';
58+
59+ new_string += utf8_buff;
60+ }
61+ }
62+
63+ return new_string;
64+}
65
66 void ResultRendererTile::LoadText(Result const& row)
67 {
68@@ -426,7 +476,10 @@
69 pango_layout_set_width(layout, (style.GetTileWidth() - (padding * 2))* PANGO_SCALE);
70 pango_layout_set_height(layout, -2);
71
72- char *escaped_text = g_markup_escape_text(row.name().c_str() , -1);
73+ // FIXME bug #1239381
74+ std::string name = ReplaceBlacklistedChars(row.name());
75+
76+ char *escaped_text = g_markup_escape_text(name.c_str(), -1);
77
78 pango_layout_set_markup(layout, escaped_text, -1);
79
80
81=== modified file 'dash/previews/MusicPreview.cpp'
82--- dash/previews/MusicPreview.cpp 2013-05-14 16:04:26 +0000
83+++ dash/previews/MusicPreview.cpp 2014-01-07 16:49:23 +0000
84@@ -188,6 +188,7 @@
85 // Hints && Actions
86 nux::VLayout* hints_layout = NULL;
87 nux::Layout* actions_layout = NULL;
88+<<<<<<< TREE
89 bool has_u1_creds = HasUbuntuOneCredentials();
90
91 if (has_u1_creds)
92@@ -242,6 +243,62 @@
93
94 }
95
96+=======
97+ bool has_u1_creds = HasUbuntuOneCredentials();
98+
99+ if (has_u1_creds)
100+ {
101+ if (!preview_model_->GetInfoHints().empty())
102+ {
103+ hints_layout = new nux::VLayout();
104+ hints_layout->SetSpaceBetweenChildren(0);
105+ hints_layout->AddSpace(0, 1);
106+ preview_info_hints_ = new PreviewInfoHintWidget(preview_model_, style.GetInfoHintIconSizeWidth());
107+ AddChild(preview_info_hints_.GetPointer());
108+ preview_info_hints_->request_close().connect([this]() { preview_container_->request_close.emit(); });
109+ hints_layout->AddView(preview_info_hints_.GetPointer(), 0);
110+
111+ // If there are actions, we use a vertical layout
112+ action_buttons_.clear();
113+ actions_layout = BuildVerticalActionsLayout(preview_model_->GetActions(), action_buttons_);
114+ actions_layout->SetLeftAndRightPadding(0, style.GetDetailsRightMargin());
115+ }
116+ else // otherwise we add a grid layout.
117+ {
118+ action_buttons_.clear();
119+ actions_layout = BuildGridActionsLayout(preview_model_->GetActions(), action_buttons_);
120+ if (action_buttons_.size() < 2)
121+ hint_actions_layout->AddSpace(0, 1);
122+ actions_layout->SetLeftAndRightPadding(0, style.GetDetailsRightMargin());
123+ }
124+ }
125+ else
126+ {
127+ // let the user know he needs to connect
128+ previews::Style& style = dash::previews::Style::Instance();
129+ actions_layout = new nux::HLayout();
130+ nux::VLayout* icon_layout = new nux::VLayout();
131+ icon_layout->SetLeftAndRightPadding(10);
132+
133+ warning_texture_ = new IconTexture(style.GetWarningIcon());
134+ icon_layout->AddView(warning_texture_.GetPointer(), 0, nux::MINOR_POSITION_START,
135+ nux::MINOR_SIZE_FULL, 100.0f, nux::NUX_LAYOUT_BEGIN);
136+ actions_layout->AddLayout(icon_layout, 0, nux::MINOR_POSITION_CENTER);
137+
138+ warning_msg_ = new StaticCairoText(
139+ no_credentials_message_, true,
140+ NUX_TRACKER_LOCATION);
141+ warning_msg_->SetFont(style.u1_warning_font().c_str());
142+ warning_msg_->SetLines(-2);
143+ warning_msg_->SetMinimumHeight(50);
144+ warning_msg_->SetMaximumWidth(300);
145+
146+ actions_layout->AddView(warning_msg_.GetPointer(), 0, nux::MINOR_POSITION_CENTER);
147+
148+ }
149+
150+
151+>>>>>>> MERGE-SOURCE
152 /////////////////////
153
154 if (hints_layout) hint_actions_layout->AddView(hints_layout, 1);
155
156=== modified file 'dash/previews/MusicPreview.h'
157--- dash/previews/MusicPreview.h 2013-05-10 10:07:04 +0000
158+++ dash/previews/MusicPreview.h 2014-01-07 16:49:23 +0000
159@@ -54,9 +54,15 @@
160
161 virtual void SetupViews();
162
163+<<<<<<< TREE
164 virtual void OnNavigateOut();
165
166 bool HasUbuntuOneCredentials();
167+=======
168+ void OnPlayTrack(std::string const& uri);
169+ void OnPauseTrack(std::string const& uri);
170+ bool HasUbuntuOneCredentials();
171+>>>>>>> MERGE-SOURCE
172
173 protected:
174 nux::ObjectPtr<Tracks> tracks_;
175
176=== modified file 'debian/changelog'
177--- debian/changelog 2013-10-14 11:24:03 +0000
178+++ debian/changelog 2014-01-07 16:49:23 +0000
179@@ -1,3 +1,4 @@
180+<<<<<<< TREE
181 unity (7.1.2+13.10.20131014.1-0ubuntu1) saucy; urgency=low
182
183 [ William Grant ]
184@@ -1138,6 +1139,77 @@
185
186 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 10 Apr 2013 07:16:02 +0000
187
188+=======
189+unity (7.0.0daily13.06.19~13.04-0ubuntu1) raring; urgency=low
190+
191+ [ William Hua ]
192+ * Revert 3196 to fix menu highlighting issues with LibreOffice.
193+ Revision 3196 prevents LibreOffice's menu items from highlighting.
194+ See Launchpad bug #1153350. (LP: #1153350)
195+
196+ [ Chris Townsend ]
197+ * Fixes issue where minimizing a full screen window would not draw the
198+ Launcher and Panel after minimization. This is a backport of
199+ lp:unity revno. 3320. (LP: #1064155)
200+
201+ [ Marco Trevisan (Treviño) ]
202+ * SwitcherController: use proper long long types for
203+ WindowActiveNumber Otherwise an overflow can cause bad window
204+ selection after long uptime. (LP: #1181367)
205+
206+ [ Ubuntu daily release ]
207+ * Automatic snapshot from revision 3319 (bootstrap)
208+ * Automatic snapshot from revision 3320
209+
210+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 19 Jun 2013 04:02:40 +0000
211+
212+unity (7.0.0daily13.05.08~13.04-0ubuntu1) raring; urgency=low
213+
214+ [ Sebastien Bacher ]
215+ * Some untranslatable and wrong strings in the previews (LP: #1074038)
216+
217+ [ Andrea Azzarone ]
218+ * [alt-tab] Disable detail view for webapp icons. (LP: #1169340)
219+
220+ [ Marco Trevisan (Treviño) ]
221+ * Launcher - count label pops out in auto-hide mode (LP: #1171476)
222+ * Panel shadow is drawn above full-screen windows when notifications
223+ are shown (LP: #1171934)
224+ * [regression] Icon count is not shown if the icon is not transformed
225+ (LP: #1171663)
226+
227+ [ Ubuntu daily release ]
228+ * Automatic snapshot from revision 3314
229+
230+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 08 May 2013 04:37:10 +0000
231+
232+unity (7.0.0daily13.04.18~13.04-0ubuntu1) raring; urgency=low
233+
234+ [ Manuel de la Pena ]
235+ * Purchased songs won't download when not logged to U1 (LP: #1168674)
236+
237+ [ Ubuntu daily release ]
238+ * Automatic snapshot from revision 3309
239+
240+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 18 Apr 2013 05:43:34 +0000
241+
242+unity (7.0.0daily13.04.17~13.04-0ubuntu1) raring; urgency=low
243+
244+ [ Marco Trevisan (Treviño) ]
245+ * Top Bar, window managment - top bar shadow not falling on restored
246+ windows that are partially off the top edge of the screen (LP:
247+ #871758)
248+
249+ [ Matthieu James ]
250+ * [UIFe] BFB icon swirl should run clockwise not anti-clockwise (LP:
251+ #1169238)
252+
253+ [ Ubuntu daily release ]
254+ * Automatic snapshot from revision 3305
255+
256+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 17 Apr 2013 04:07:04 +0000
257+
258+>>>>>>> MERGE-SOURCE
259 unity (7.0.0daily13.04.15-0ubuntu1) raring; urgency=low
260
261 [ Brandon Schaefer ]
262
263=== modified file 'launcher/AbstractLauncherIcon.h'
264=== modified file 'launcher/ApplicationLauncherIcon.cpp'
265--- launcher/ApplicationLauncherIcon.cpp 2013-11-20 01:13:03 +0000
266+++ launcher/ApplicationLauncherIcon.cpp 2014-01-07 16:49:23 +0000
267@@ -1219,6 +1219,7 @@
268 return result;
269 }
270
271+<<<<<<< TREE
272 bool ApplicationLauncherIcon::AllowDetailViewInSwitcher() const
273 {
274 return app_->type() != "webapp";
275@@ -1227,6 +1228,16 @@
276 uint64_t ApplicationLauncherIcon::SwitcherPriority()
277 {
278 uint64_t result = 0;
279+=======
280+bool ApplicationLauncherIcon::AllowDetailViewInSwitcher() const
281+{
282+ return app_->type() != "webapp";
283+}
284+
285+unsigned long long ApplicationLauncherIcon::SwitcherPriority()
286+{
287+ unsigned long long result = 0;
288+>>>>>>> MERGE-SOURCE
289 // Webapps always go at the back.
290 if (app_->type() == "webapp")
291 return result;
292
293=== modified file 'launcher/ApplicationLauncherIcon.h'
294--- launcher/ApplicationLauncherIcon.h 2013-10-10 12:22:47 +0000
295+++ launcher/ApplicationLauncherIcon.h 2014-01-07 16:49:23 +0000
296@@ -61,8 +61,13 @@
297 virtual void UnStick();
298
299 virtual bool ShowInSwitcher(bool current);
300+<<<<<<< TREE
301 virtual bool AllowDetailViewInSwitcher() const override;
302 virtual uint64_t SwitcherPriority();
303+=======
304+ virtual bool AllowDetailViewInSwitcher() const override;
305+ virtual unsigned long long SwitcherPriority();
306+>>>>>>> MERGE-SOURCE
307
308 virtual nux::Color BackgroundColor() const;
309
310
311=== modified file 'launcher/LauncherIcon.cpp'
312=== modified file 'launcher/LauncherIcon.h'
313--- launcher/LauncherIcon.h 2013-10-07 23:30:27 +0000
314+++ launcher/LauncherIcon.h 2014-01-07 16:49:23 +0000
315@@ -113,12 +113,21 @@
316 return false;
317 };
318
319+<<<<<<< TREE
320 virtual bool AllowDetailViewInSwitcher() const override
321 {
322 return false;
323 }
324
325 virtual uint64_t SwitcherPriority()
326+=======
327+ virtual bool AllowDetailViewInSwitcher() const override
328+ {
329+ return false;
330+ }
331+
332+ virtual unsigned long long SwitcherPriority()
333+>>>>>>> MERGE-SOURCE
334 {
335 return 0;
336 }
337
338=== modified file 'launcher/MockLauncherIcon.h'
339=== modified file 'launcher/SwitcherController.cpp'
340--- launcher/SwitcherController.cpp 2013-10-02 23:36:48 +0000
341+++ launcher/SwitcherController.cpp 2014-01-07 16:49:23 +0000
342@@ -605,7 +605,7 @@
343 obj_->detail_mode_ = DetailMode::TAB_NEXT_WINDOW;
344 }
345 else
346- {
347+ {
348 model_->detail_selection = false;
349 }
350 }
351@@ -746,19 +746,30 @@
352 return;
353 }
354
355+<<<<<<< TREE
356 uint64_t first_highest = 0;
357 uint64_t first_second = 0; // first icons second highest active
358 uint64_t second_first = 0; // second icons first highest active
359+=======
360+ unsigned long long first_highest = 0;
361+ unsigned long long first_second = 0; // first icons second highest active
362+ unsigned long long second_first = 0; // second icons first highest active
363+>>>>>>> MERGE-SOURCE
364
365 WindowManager& wm = WindowManager::Default();
366 for (auto& window : first->Windows())
367 {
368+<<<<<<< TREE
369 Window xid = window->window_id();
370
371 if (model_->only_detail_on_viewport && !wm.IsWindowOnCurrentDesktop(xid))
372 continue;
373
374 uint64_t num = wm.GetWindowActiveNumber(xid);
375+=======
376+ Window xid = window->window_id();
377+ unsigned long long num = wm.GetWindowActiveNumber(xid);
378+>>>>>>> MERGE-SOURCE
379
380 if (num > first_highest)
381 {
382
383=== modified file 'plugins/unityshell/src/unityshell.cpp'
384--- plugins/unityshell/src/unityshell.cpp 2013-10-03 13:09:29 +0000
385+++ plugins/unityshell/src/unityshell.cpp 2014-01-07 16:49:23 +0000
386@@ -2595,6 +2595,7 @@
387 uScreen->paintDisplay();
388 }
389
390+<<<<<<< TREE
391 enum class DrawPanelShadow
392 {
393 NO,
394@@ -2655,6 +2656,50 @@
395 }
396
397 if (draw_panel_shadow == DrawPanelShadow::BELOW_WINDOW)
398+=======
399+ enum class DrawPanelShadow
400+ {
401+ NO,
402+ BELOW_WINDOW,
403+ OVER_WINDOW,
404+ };
405+
406+ auto draw_panel_shadow = DrawPanelShadow::NO;
407+
408+ if (!(mask & PAINT_WINDOW_ON_TRANSFORMED_SCREEN_MASK))
409+ {
410+ Window active_window = screen->activeWindow();
411+
412+ if (G_UNLIKELY(window->type() == CompWindowTypeDesktopMask))
413+ {
414+ uScreen->setPanelShadowMatrix(matrix);
415+
416+ if (active_window == 0 || active_window == window->id())
417+ draw_panel_shadow = DrawPanelShadow::OVER_WINDOW;
418+ }
419+ else
420+ {
421+ if (window->id() == active_window)
422+ {
423+ draw_panel_shadow = DrawPanelShadow::BELOW_WINDOW;
424+
425+ if (!(window->state() & CompWindowStateMaximizedVertMask) &&
426+ !(window->state() & CompWindowStateFullscreenMask) &&
427+ !(window->type() & CompWindowTypeFullscreenMask))
428+ {
429+ auto const& output = uScreen->screen->currentOutputDev();
430+
431+ if (window->y() - window->border().top < output.y() + uScreen->panel_style_.panel_height)
432+ {
433+ draw_panel_shadow = DrawPanelShadow::OVER_WINDOW;
434+ }
435+ }
436+ }
437+ }
438+ }
439+
440+ if (draw_panel_shadow == DrawPanelShadow::BELOW_WINDOW)
441+>>>>>>> MERGE-SOURCE
442 uScreen->paintPanelShadow(region);
443
444 bool ret = gWindow->glDraw(matrix, attrib, region, mask);
445
446=== modified file 'plugins/unityshell/src/unityshell.h'
447=== modified file 'plugins/unityshell/unityshell.xml.in'
448=== modified file 'po/POTFILES.in'
449=== modified file 'services/panel-service.c'
450--- services/panel-service.c 2013-10-03 15:15:35 +0000
451+++ services/panel-service.c 2014-01-07 16:49:23 +0000
452@@ -1528,6 +1528,16 @@
453 priv->last_y = 0;
454 priv->last_menu_button = 0;
455
456+<<<<<<< TREE
457+=======
458+ g_signal_handler_disconnect (priv->last_menu, priv->last_menu_id);
459+ g_signal_handler_disconnect (priv->last_menu, priv->last_menu_move_id);
460+
461+ GtkWidget *top_win = gtk_widget_get_toplevel (GTK_WIDGET (priv->last_menu));
462+ if (GTK_IS_WINDOW (top_win))
463+ gtk_window_set_attached_to (GTK_WINDOW (top_win), NULL);
464+
465+>>>>>>> MERGE-SOURCE
466 priv->last_menu = NULL;
467 priv->last_entry = NULL;
468 priv->last_left = 0;
469@@ -1978,6 +1988,16 @@
470 G_CALLBACK (menuitem_activated), entry);
471 }
472
473+ GtkWidget *top_widget = gtk_widget_get_toplevel (GTK_WIDGET (priv->last_menu));
474+
475+ if (GTK_IS_WINDOW (top_widget))
476+ {
477+ GtkWindow *top_win = GTK_WINDOW (top_widget);
478+
479+ if (gtk_window_get_attached_to (top_win) != priv->menubar)
480+ gtk_window_set_attached_to (top_win, priv->menubar);
481+ }
482+
483 priv->last_entry = entry;
484 priv->last_x = x;
485 priv->last_y = y;
486
487=== modified file 'tests/autopilot/unity/tests/__init__.py'
488=== modified file 'tests/autopilot/unity/tests/test_panel.py'
489=== modified file 'tests/mock-application.h'
490--- tests/mock-application.h 2013-09-11 07:56:26 +0000
491+++ tests/mock-application.h 2014-01-07 16:49:23 +0000
492@@ -157,6 +157,7 @@
493 bool running_;
494 bool urgent_;
495 unity::WindowList windows_;
496+<<<<<<< TREE
497 std::string type_;
498 std::vector<std::pair<unity::ApplicationEventType, unity::ApplicationSubjectPtr>> actions_log_;
499
500@@ -173,6 +174,19 @@
501 MOCK_CONST_METHOD0(Quit, void());
502
503 bool LocalOwnsWindow(Window window_id) const {
504+=======
505+ std::string type_;
506+
507+
508+ virtual std::string icon() const { return icon_; }
509+ virtual std::string title() const { return title_; }
510+ virtual std::string desktop_file() const { return desktop_file_; }
511+ virtual std::string type() const { return type_; }
512+ virtual std::string repr() const { return "MockApplication"; }
513+
514+ virtual unity::WindowList GetWindows() const { return windows_; }
515+ virtual bool OwnsWindow(Window window_id) const {
516+>>>>>>> MERGE-SOURCE
517 auto end = std::end(windows_);
518 return std::find_if(std::begin(windows_), end, [window_id] (unity::ApplicationWindowPtr window) {
519 return window->window_id() == window_id;
520
521=== modified file 'tests/test_application_launcher_icon.cpp'
522--- tests/test_application_launcher_icon.cpp 2013-11-20 01:13:03 +0000
523+++ tests/test_application_launcher_icon.cpp 2014-01-07 16:49:23 +0000
524@@ -1080,6 +1080,7 @@
525 EXPECT_FALSE(empty_icon->IsFileManager());
526 EXPECT_FALSE(mock_icon->IsFileManager());
527
528+<<<<<<< TREE
529 auto app = std::make_shared<MockApplication::Nice>("/any/path/nautilus.desktop", "Nautilus");
530 MockApplicationLauncherIcon::Ptr icon(new NiceMock<MockApplicationLauncherIcon>(app));
531 EXPECT_TRUE(icon->IsFileManager());
532@@ -1324,3 +1325,28 @@
533 }
534
535 } // anonymous namespace
536+=======
537+ auto app = std::make_shared<MockApplication>("/any/path/nautilus.desktop", "Nautilus");
538+ nux::ObjectPtr<MockApplicationLauncherIcon> icon(new NiceMock<MockApplicationLauncherIcon>(app));
539+ EXPECT_TRUE(icon->IsFileManager());
540+
541+ app = std::make_shared<MockApplication>("/any/path/nautilus-folder-handler.desktop", "Nautilus");
542+ icon = new NiceMock<MockApplicationLauncherIcon>(app);
543+ EXPECT_TRUE(icon->IsFileManager());
544+
545+ app = std::make_shared<MockApplication>("/any/path/nautilus-home.desktop", "Nautilus");
546+ icon = new NiceMock<MockApplicationLauncherIcon>(app);
547+ EXPECT_TRUE(icon->IsFileManager());
548+}
549+
550+TEST_F(TestApplicationLauncherIcon, AllowDetailViewInSwitcher)
551+{
552+ mock_app->type_ = "mock";
553+ EXPECT_TRUE(mock_icon->AllowDetailViewInSwitcher());
554+
555+ mock_app->type_ = "webapp";
556+ EXPECT_FALSE(mock_icon->AllowDetailViewInSwitcher());
557+}
558+
559+}
560+>>>>>>> MERGE-SOURCE
561
562=== modified file 'tests/test_switcher_controller.cpp'
563--- tests/test_switcher_controller.cpp 2013-09-29 23:26:29 +0000
564+++ tests/test_switcher_controller.cpp 2014-01-07 16:49:23 +0000
565@@ -63,6 +63,7 @@
566 EXPECT_LT(model->detail_selection.changed.size(), prev_size);
567 }
568
569+<<<<<<< TREE
570 TEST_F(TestSwitcherController, DisconnectWMSignalsOnDestruction)
571 {
572 auto& color_property = WindowManager::Default().average_color;
573@@ -163,6 +164,23 @@
574 EXPECT_FALSE(controller_->IsDetailViewShown());
575 }
576
577+=======
578+TEST_F(TestSwitcherController, InitiateDetailWebapps)
579+{
580+ controller_->Show(ShowMode::ALL, SortMode::LAUNCHER_ORDER, icons_);
581+
582+ controller_->Select(3);
583+ controller_->InitiateDetail();
584+
585+ auto const& view = controller_->GetView();
586+ auto const& model = view->GetModel();
587+ EXPECT_EQ(controller_->detail_mode(), DetailMode::TAB_NEXT_TILE);
588+ EXPECT_FALSE(view->animate());
589+ EXPECT_FALSE(model->detail_selection());
590+}
591+
592+
593+>>>>>>> MERGE-SOURCE
594 TEST_F(TestSwitcherController, ShowSwitcher)
595 {
596 EXPECT_FALSE(controller_->Visible());
597
598=== modified file 'tests/test_switcher_controller.h'
599--- tests/test_switcher_controller.h 2013-06-26 17:10:45 +0000
600+++ tests/test_switcher_controller.h 2014-01-07 16:49:23 +0000
601@@ -52,7 +52,11 @@
602 class FakeApplicationWindow : public unity::ApplicationWindow
603 {
604 public:
605+<<<<<<< TREE
606 FakeApplicationWindow(Window xid, uint64_t active_number = 0);
607+=======
608+ FakeApplicationWindow(Window xid, unsigned long long active_number = 0);
609+>>>>>>> MERGE-SOURCE
610
611 virtual std::string type() const;
612
613@@ -71,6 +75,7 @@
614 */
615 struct FakeLauncherIcon : unity::launcher::SimpleLauncherIcon
616 {
617+<<<<<<< TREE
618 FakeLauncherIcon(std::string const& app_name, bool allow_detail_view, uint64_t priority);
619
620 unity::WindowList Windows() override;
621@@ -79,6 +84,16 @@
622
623 bool allow_detail_view_;
624 uint64_t priority_;
625+=======
626+ FakeLauncherIcon(std::string const& app_name, bool allow_detail_view, unsigned long long priority);
627+
628+ unity::WindowList Windows() override;
629+ bool AllowDetailViewInSwitcher() const override;
630+ unsigned long long SwitcherPriority() override;
631+
632+ bool allow_detail_view_;
633+ unsigned long long priority_;
634+>>>>>>> MERGE-SOURCE
635 unity::WindowList window_list;
636 };
637
638
639=== modified file 'tests/test_switcher_controller_class.cpp'
640--- tests/test_switcher_controller_class.cpp 2013-06-26 17:10:45 +0000
641+++ tests/test_switcher_controller_class.cpp 2014-01-07 16:49:23 +0000
642@@ -25,6 +25,7 @@
643 using namespace unity::switcher;
644 using namespace std::chrono;
645
646+<<<<<<< TREE
647 FakeApplicationWindow::FakeApplicationWindow(Window xid, uint64_t active_number)
648 : xid_(xid)
649 {
650@@ -37,6 +38,19 @@
651 icon.SetGetterFunction([this] { return ""; });
652 }
653
654+=======
655+FakeApplicationWindow::FakeApplicationWindow(Window xid, unsigned long long active_number)
656+ : xid_(xid)
657+{
658+ auto WM = dynamic_cast<StandaloneWindowManager*>(&WindowManager::Default());
659+ auto standalone_window = std::make_shared<StandaloneWindow>(xid_);
660+ standalone_window->active_number = active_number;
661+ WM->AddStandaloneWindow(standalone_window);
662+}
663+
664+std::string FakeApplicationWindow::title() const { return "FakeApplicationWindow"; }
665+std::string FakeApplicationWindow::icon() const { return ""; }
666+>>>>>>> MERGE-SOURCE
667 std::string FakeApplicationWindow::type() const { return "mock"; }
668
669 Window FakeApplicationWindow::window_id() const { return xid_; }
670@@ -45,7 +59,11 @@
671 bool FakeApplicationWindow::Focus() const { return false; }
672 void FakeApplicationWindow::Quit() const { WindowManager::Default().Close(xid_); }
673
674+<<<<<<< TREE
675 FakeLauncherIcon::FakeLauncherIcon(std::string const& app_name, bool allow_detail_view, uint64_t priority)
676+=======
677+FakeLauncherIcon::FakeLauncherIcon(std::string const& app_name, bool allow_detail_view, unsigned long long priority)
678+>>>>>>> MERGE-SOURCE
679 : launcher::SimpleLauncherIcon(IconType::APPLICATION)
680 , allow_detail_view_(allow_detail_view)
681 , priority_(priority)
682@@ -60,6 +78,7 @@
683 return window_list;
684 }
685
686+<<<<<<< TREE
687 bool FakeLauncherIcon::AllowDetailViewInSwitcher() const
688 {
689 return allow_detail_view_;
690@@ -68,6 +87,16 @@
691 uint64_t FakeLauncherIcon::SwitcherPriority()
692 {
693 return std::numeric_limits<uint64_t>::max() - priority_;
694+=======
695+bool FakeLauncherIcon::AllowDetailViewInSwitcher() const
696+{
697+ return allow_detail_view_;
698+}
699+
700+unsigned long long FakeLauncherIcon::SwitcherPriority()
701+{
702+ return std::numeric_limits<unsigned long long>::max() - priority_;
703+>>>>>>> MERGE-SOURCE
704 }
705
706 /**
707
708=== modified file 'unity-shared/IconRenderer.cpp'
709--- unity-shared/IconRenderer.cpp 2013-10-04 00:46:07 +0000
710+++ unity-shared/IconRenderer.cpp 2014-01-07 16:49:23 +0000
711@@ -301,8 +301,13 @@
712 if (it->render_center == launcher_icon->LastRenderCenter(monitor) &&
713 it->logical_center == launcher_icon->LastLogicalCenter(monitor) &&
714 it->rotation == launcher_icon->LastRotation(monitor) &&
715+<<<<<<< TREE
716 it->skip == launcher_icon->WasSkipping(monitor) &&
717 (launcher_icon->Emblem() != nullptr) == launcher_icon->HadEmblem(monitor))
718+=======
719+ it->skip == launcher_icon->WasSkipping(monitor) &&
720+ (launcher_icon->Emblem() != nullptr) == launcher_icon->HadEmblem())
721+>>>>>>> MERGE-SOURCE
722 {
723 continue;
724 }
725@@ -310,7 +315,11 @@
726 launcher_icon->RememberCenters(monitor, it->render_center, it->logical_center);
727 launcher_icon->RememberRotation(monitor, it->rotation);
728 launcher_icon->RememberSkip(monitor, it->skip);
729+<<<<<<< TREE
730 launcher_icon->RememberEmblem(monitor, launcher_icon->Emblem() != nullptr);
731+=======
732+ launcher_icon->RememberEmblem(launcher_icon->Emblem() != nullptr);
733+>>>>>>> MERGE-SOURCE
734
735 float w = icon_size;
736 float h = icon_size;
737
738=== modified file 'unity-shared/IconTextureSource.cpp'
739--- unity-shared/IconTextureSource.cpp 2013-10-04 00:46:07 +0000
740+++ unity-shared/IconTextureSource.cpp 2014-01-07 16:49:23 +0000
741@@ -32,8 +32,13 @@
742 }
743
744 IconTextureSource::IconTextureSource()
745+<<<<<<< TREE
746 : skip_(RENDERERS_SIZE, false)
747 , had_emblem_(RENDERERS_SIZE, false)
748+=======
749+ : had_emblem_(false)
750+ , skip_(RENDERERS_SIZE, false)
751+>>>>>>> MERGE-SOURCE
752 , last_render_center_(RENDERERS_SIZE)
753 , last_logical_center_(RENDERERS_SIZE)
754 , last_rotation_(RENDERERS_SIZE)
755@@ -81,6 +86,7 @@
756 return skip_[monitor];
757 }
758
759+<<<<<<< TREE
760 void IconTextureSource::RememberEmblem(int monitor, bool has_emblem)
761 {
762 had_emblem_[monitor] = has_emblem;
763@@ -91,5 +97,17 @@
764 return had_emblem_[monitor];
765 }
766
767+=======
768+void IconTextureSource::RememberEmblem(bool has_emblem)
769+{
770+ had_emblem_ = has_emblem;
771+}
772+
773+bool IconTextureSource::HadEmblem() const
774+{
775+ return had_emblem_;
776+}
777+
778+>>>>>>> MERGE-SOURCE
779 }
780 }
781\ No newline at end of file
782
783=== modified file 'unity-shared/IconTextureSource.h'
784--- unity-shared/IconTextureSource.h 2013-10-04 00:46:07 +0000
785+++ unity-shared/IconTextureSource.h 2014-01-07 16:49:23 +0000
786@@ -58,9 +58,15 @@
787 void RememberSkip(int monitor, bool skip);
788 bool WasSkipping(int monitor) const;
789
790+<<<<<<< TREE
791 void RememberEmblem(int monitor, bool has_emblem);
792 bool HadEmblem(int monitor) const;
793
794+=======
795+ void RememberEmblem(bool has_emblem);
796+ bool HadEmblem() const;
797+
798+>>>>>>> MERGE-SOURCE
799 virtual nux::Color BackgroundColor() const = 0;
800
801 virtual nux::Color GlowColor() = 0;
802@@ -70,6 +76,7 @@
803 virtual nux::BaseTexture* Emblem() = 0;
804
805 private:
806+ bool had_emblem_;
807 std::vector<bool> skip_;
808 std::vector<bool> had_emblem_;
809 std::vector<nux::Point3> last_render_center_;
810
811=== modified file 'unity-shared/PreviewStyle.cpp'
812--- unity-shared/PreviewStyle.cpp 2013-05-10 10:07:04 +0000
813+++ unity-shared/PreviewStyle.cpp 2014-01-07 16:49:23 +0000
814@@ -294,6 +294,7 @@
815 return 12;
816 }
817
818+<<<<<<< TREE
819 std::string Style::payment_title_font() const
820 {
821 return "Ubuntu 22";
822@@ -384,6 +385,13 @@
823 return "Ubuntu Bold 11.5";
824 }
825
826+=======
827+std::string Style::u1_warning_font() const
828+{
829+ return "Ubuntu Bold 11.5";
830+}
831+
832+>>>>>>> MERGE-SOURCE
833 float Style::GetVideoImageAspectRatio() const
834 {
835 return float(540)/380;
836@@ -493,6 +501,7 @@
837 return pimpl->preview_pause_texture_.texture();
838 }
839
840+<<<<<<< TREE
841 nux::BaseTexture* Style::GetLockIcon()
842 {
843 return nux::CreateTexture2DFromFile(
844@@ -504,6 +513,13 @@
845 return pimpl->warning_icon_texture_.texture();
846 }
847
848+=======
849+nux::BaseTexture* Style::GetWarningIcon()
850+{
851+ return pimpl->warning_icon_texture_.texture();
852+}
853+
854+>>>>>>> MERGE-SOURCE
855 nux::BaseTexture* Style::GetSearchSpinIcon(int size)
856 {
857 return pimpl->preview_spin_texture_.texture(size);
858
859=== modified file 'unity-shared/PreviewStyle.h'
860=== modified file 'unity-shared/StandaloneWindowManager.cpp'
861=== modified file 'unity-shared/StandaloneWindowManager.h'
862--- unity-shared/StandaloneWindowManager.h 2013-09-14 09:56:10 +0000
863+++ unity-shared/StandaloneWindowManager.h 2014-01-07 16:49:23 +0000
864@@ -44,7 +44,11 @@
865 nux::Size deco_sizes[4];
866 unsigned current_desktop;
867 unsigned monitor;
868+<<<<<<< TREE
869 uint64_t active_number;
870+=======
871+ unsigned long long active_number;
872+>>>>>>> MERGE-SOURCE
873 nux::Property<bool> active;
874 nux::Property<bool> mapped;
875 nux::Property<bool> visible;

Subscribers

People subscribed via source and target branches

to all changes: