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
=== modified file 'panel/PanelMenuView.cpp'
--- panel/PanelMenuView.cpp 2012-11-26 16:09:53 +0000
+++ panel/PanelMenuView.cpp 2012-11-30 23:38:26 +0000
@@ -1576,7 +1576,7 @@
1576 const gchar *title = g_variant_get_string(data, 0);1576 const gchar *title = g_variant_get_string(data, 0);
1577 _panel_title = (title ? title : "");1577 _panel_title = (title ? title : "");
15781578
1579 Refresh();1579 Refresh(true);
1580 QueueDraw();1580 QueueDraw();
1581}1581}
15821582
15831583
=== modified file 'plugins/unityshell/src/unityshell.cpp'
--- plugins/unityshell/src/unityshell.cpp 2012-11-27 00:39:39 +0000
+++ plugins/unityshell/src/unityshell.cpp 2012-11-30 23:38:26 +0000
@@ -3847,7 +3847,11 @@
3847 int text_x = win::decoration::ITEMS_PADDING * 2 + win::decoration::CLOSE_SIZE;3847 int text_x = win::decoration::ITEMS_PADDING * 2 + win::decoration::CLOSE_SIZE;
3848 RenderText(context, text_x, 0.0, width - win::decoration::ITEMS_PADDING, height);3848 RenderText(context, text_x, 0.0, width - win::decoration::ITEMS_PADDING, height);
3849 decoration_selected_tex_ = context.pixmap_texture_;3849 decoration_selected_tex_ = context.pixmap_texture_;
3850<<<<<<< TREE
3850 uScreen->damageRegion(CompRegion(geo.x, geo.y, width, height));3851 uScreen->damageRegion(CompRegion(geo.x, geo.y, width, height));
3852=======
3853 uScreen->damageRegion(CompRegion(scaled_geo.x, scaled_geo.y, width, height));
3854>>>>>>> MERGE-SOURCE
3851 }3855 }
3852 else3856 else
3853 {3857 {
38543858
=== modified file 'tests/autopilot/unity/tests/launcher/test_keynav.py'
--- tests/autopilot/unity/tests/launcher/test_keynav.py 2012-09-13 10:56:42 +0000
+++ tests/autopilot/unity/tests/launcher/test_keynav.py 2012-11-30 23:38:26 +0000
@@ -234,3 +234,8 @@
234 self.assertThat(self.dash.visible, Eventually(Equals(True)))234 self.assertThat(self.dash.visible, Eventually(Equals(True)))
235 self.assertThat(self.launcher.key_nav_is_active, Eventually(Equals(False)))235 self.assertThat(self.launcher.key_nav_is_active, Eventually(Equals(False)))
236236
237 def test_launcher_keynav_changes_panel(self):
238 """The panel title must change when in key nav mode."""
239
240 self.start_keynav_with_cleanup_cancel()
241 self.assertThat(self.panels.get_active_panel().title, Eventually(Equals("Dash Home")))