Merge lp:~aacid/unity/fix_panek_title_escaping_1067357 into lp:unity
| Status: | Merged |
|---|---|
| Approved by: | Marco Trevisan (Treviño) on 2012-10-22 |
| Approved revision: | 2873 |
| Merged at revision: | 2865 |
| Proposed branch: | lp:~aacid/unity/fix_panek_title_escaping_1067357 |
| Merge into: | lp:unity |
| Diff against target: |
332 lines (+170/-47) 6 files modified
panel/PanelMenuView.cpp (+48/-42) panel/PanelMenuView.h (+4/-2) tests/CMakeLists.txt (+2/-1) tests/test_panel_menu_view.cpp (+96/-0) unity-shared/StandaloneWindowManager.cpp (+14/-2) unity-shared/StandaloneWindowManager.h (+6/-0) |
| To merge this branch: | bzr merge lp:~aacid/unity/fix_panek_title_escaping_1067357 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| PS Jenkins bot | continuous-integration | Needs Fixing on 2012-10-22 | |
| Marco Trevisan (Treviño) | 2012-10-17 | Approve on 2012-10-19 | |
|
Review via email:
|
|||
Commit Message
Fix escaping of _panel_title
It only has to be escpaed if comes from new_title
if coming from UBUS_LAUNCHER_
Fixes bug #1067357
Description of the Change
Fix escaping of _panel_title
It only has to be escpaed if comes from new_title
if coming from UBUS_LAUNCHER_
Fixes bug #1067357
| Marco Trevisan (Treviño) (3v1n0) wrote : | # |
| Albert Astals Cid (aacid) wrote : | # |
Suggestions integrated
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
| Albert Astals Cid (aacid) wrote : | # |
Reapproving now that the merger is not broken anymore
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
- 2873. By Albert Astals Cid on 2012-10-22
-
Merge lp:unity
| Albert Astals Cid (aacid) wrote : | # |
Fixed merge conflict


89 + const std::string prevTitle = _panel_title;
90 + RefreshTitle();
91 + if (prevTitle == _panel_title && !force && _last_geo == geo && _title_texture)
92 + {
93 + // No need to redraw the title, let's save some CPU time!
94 + return;
95 }
Mh, at this point I think it's better to make RefreshTitle to return a string... Channging it to GetCurrentTitle() so we can:
std::string const& new_title = GetCurrentTitle() // always use not-capital chars on variables
if (new_title == prev_title_) ....
130 + std::string _panel_title;
Please don't make it public, put it back as private.
If you need to access it on testing, just add a: friend class TestPanelMenuView;
Doing so in your struct TestPanelMenuView you can access to this member (see LauncherController or Launcher tests for reference).
+ EXPECT_ EQ(panelMenuVie w._panel_ title, "");
Better EXPECT_TRUE( ... .empty()).
264 + EXPECT_TRUE(wm != nullptr);
Use an assert here, so that there won't be crashes:
ASSERT_NE(wm, nullptr);