Merge lp:~brandontschaefer/unity/lp1085045-fix-title-not-updating-6.0 into lp:unity

Proposed by Brandon Schaefer
Status: Superseded
Proposed branch: lp:~brandontschaefer/unity/lp1085045-fix-title-not-updating-6.0
Merge into: lp:unity
Diff against target: 41 lines (+10/-1) (has conflicts)
3 files modified
panel/PanelMenuView.cpp (+1/-1)
plugins/unityshell/src/unityshell.cpp (+4/-0)
tests/autopilot/unity/tests/launcher/test_keynav.py (+5/-0)
Text conflict in plugins/unityshell/src/unityshell.cpp
To merge this branch: bzr merge lp:~brandontschaefer/unity/lp1085045-fix-title-not-updating-6.0
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+137347@code.launchpad.net

Commit message

Panel title is now being set when in KeyNav mode.

Description of the change

=== Problem ===
When going into KeyNav mode through Alt+F1 the panel title was not being updated to reflect the icon name.

The panel_title was being set to the icon name, but after that in Refresh a check if _panel_title == new_title was always returning true. This is because GetCurrentTitle would reutrn the _panel_title if in keynav more or in switcher mode. So _panel_title == _panel_title....

=== Fix ===
Force the panel title to update.

=== Test ===
There is a nice simple AP test for this.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'panel/PanelMenuView.cpp'
2--- panel/PanelMenuView.cpp 2012-11-26 16:09:53 +0000
3+++ panel/PanelMenuView.cpp 2012-11-30 23:38:26 +0000
4@@ -1576,7 +1576,7 @@
5 const gchar *title = g_variant_get_string(data, 0);
6 _panel_title = (title ? title : "");
7
8- Refresh();
9+ Refresh(true);
10 QueueDraw();
11 }
12
13
14=== modified file 'plugins/unityshell/src/unityshell.cpp'
15--- plugins/unityshell/src/unityshell.cpp 2012-11-27 00:39:39 +0000
16+++ plugins/unityshell/src/unityshell.cpp 2012-11-30 23:38:26 +0000
17@@ -3847,7 +3847,11 @@
18 int text_x = win::decoration::ITEMS_PADDING * 2 + win::decoration::CLOSE_SIZE;
19 RenderText(context, text_x, 0.0, width - win::decoration::ITEMS_PADDING, height);
20 decoration_selected_tex_ = context.pixmap_texture_;
21+<<<<<<< TREE
22 uScreen->damageRegion(CompRegion(geo.x, geo.y, width, height));
23+=======
24+ uScreen->damageRegion(CompRegion(scaled_geo.x, scaled_geo.y, width, height));
25+>>>>>>> MERGE-SOURCE
26 }
27 else
28 {
29
30=== modified file 'tests/autopilot/unity/tests/launcher/test_keynav.py'
31--- tests/autopilot/unity/tests/launcher/test_keynav.py 2012-09-13 10:56:42 +0000
32+++ tests/autopilot/unity/tests/launcher/test_keynav.py 2012-11-30 23:38:26 +0000
33@@ -234,3 +234,8 @@
34 self.assertThat(self.dash.visible, Eventually(Equals(True)))
35 self.assertThat(self.launcher.key_nav_is_active, Eventually(Equals(False)))
36
37+ def test_launcher_keynav_changes_panel(self):
38+ """The panel title must change when in key nav mode."""
39+
40+ self.start_keynav_with_cleanup_cancel()
41+ self.assertThat(self.panels.get_active_panel().title, Eventually(Equals("Dash Home")))