Merge lp:~veebers/unity/fix-950782 into lp:unity

Proposed by Christopher Lee
Status: Merged
Approved by: Andrea Azzarone
Approved revision: no longer in the source branch.
Merged at revision: 2605
Proposed branch: lp:~veebers/unity/fix-950782
Merge into: lp:unity
Diff against target: 65 lines (+13/-14)
3 files modified
panel/PanelMenuView.cpp (+0/-13)
panel/PanelMenuView.h (+0/-1)
tests/autopilot/unity/tests/test_panel.py (+13/-0)
To merge this branch: bzr merge lp:~veebers/unity/fix-950782
Reviewer Review Type Date Requested Status
Andrea Azzarone (community) Approve
Thomi Richards (community) quality Approve
Tim Penhey Pending
Review via email: mp+120692@code.launchpad.net

Commit message

Adding test for fix-950782, Application switching (Alt+tab) no longer updates panel menu titles.

Description of the change

I removed the ubus registration and related callback for the "workspace switch selection changed" from the panel menu view.

To post a comment you must log in.
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) :
review: Approve (quality)
Revision history for this message
Andrea Azzarone (azzar1) wrote :

LGTM.

review: Approve

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-07-30 17:09:43 +0000
+++ panel/PanelMenuView.cpp 2012-08-22 04:35:23 +0000
@@ -152,7 +152,6 @@
152 _titlebar_grab_area->mouse_leave.connect(sigc::mem_fun(this, &PanelMenuView::OnPanelViewMouseLeave));152 _titlebar_grab_area->mouse_leave.connect(sigc::mem_fun(this, &PanelMenuView::OnPanelViewMouseLeave));
153153
154 _ubus_manager.RegisterInterest(UBUS_SWITCHER_SHOWN, sigc::mem_fun(this, &PanelMenuView::OnSwitcherShown));154 _ubus_manager.RegisterInterest(UBUS_SWITCHER_SHOWN, sigc::mem_fun(this, &PanelMenuView::OnSwitcherShown));
155 _ubus_manager.RegisterInterest(UBUS_SWITCHER_SELECTION_CHANGED, sigc::mem_fun(this, &PanelMenuView::OnSwitcherSelectionChanged));
156155
157 _ubus_manager.RegisterInterest(UBUS_LAUNCHER_START_KEY_NAV, sigc::mem_fun(this, &PanelMenuView::OnLauncherKeyNavStarted));156 _ubus_manager.RegisterInterest(UBUS_LAUNCHER_START_KEY_NAV, sigc::mem_fun(this, &PanelMenuView::OnLauncherKeyNavStarted));
158 _ubus_manager.RegisterInterest(UBUS_LAUNCHER_END_KEY_NAV, sigc::mem_fun(this, &PanelMenuView::OnLauncherKeyNavEnded));157 _ubus_manager.RegisterInterest(UBUS_LAUNCHER_END_KEY_NAV, sigc::mem_fun(this, &PanelMenuView::OnLauncherKeyNavEnded));
@@ -1552,18 +1551,6 @@
1552 QueueDraw();1551 QueueDraw();
1553}1552}
15541553
1555void PanelMenuView::OnSwitcherSelectionChanged(GVariant* data)
1556{
1557 if (!data || !_switcher_showing)
1558 return;
1559
1560 const gchar *title = g_variant_get_string(data, 0);
1561 _panel_title = (title ? title : "");
1562
1563 Refresh();
1564 QueueDraw();
1565}
1566
1567void PanelMenuView::OnLauncherKeyNavStarted(GVariant* data)1554void PanelMenuView::OnLauncherKeyNavStarted(GVariant* data)
1568{1555{
1569 if (_launcher_keynav)1556 if (_launcher_keynav)
15701557
=== modified file 'panel/PanelMenuView.h'
--- panel/PanelMenuView.h 2012-06-18 02:57:23 +0000
+++ panel/PanelMenuView.h 2012-08-22 04:35:23 +0000
@@ -113,7 +113,6 @@
113 std::string GetActiveViewName(bool use_appname = false) const;113 std::string GetActiveViewName(bool use_appname = false) const;
114114
115 void OnSwitcherShown(GVariant* data);115 void OnSwitcherShown(GVariant* data);
116 void OnSwitcherSelectionChanged(GVariant* data);
117 void OnLauncherKeyNavStarted(GVariant* data);116 void OnLauncherKeyNavStarted(GVariant* data);
118 void OnLauncherKeyNavEnded(GVariant* data);117 void OnLauncherKeyNavEnded(GVariant* data);
119 void OnLauncherSelectionChanged(GVariant* data);118 void OnLauncherSelectionChanged(GVariant* data);
120119
=== modified file 'tests/autopilot/unity/tests/test_panel.py'
--- tests/autopilot/unity/tests/test_panel.py 2012-08-09 17:12:10 +0000
+++ tests/autopilot/unity/tests/test_panel.py 2012-08-22 04:35:23 +0000
@@ -206,6 +206,19 @@
206 self.assertThat(lambda: text_win.title, Eventually(NotEquals(old_title)))206 self.assertThat(lambda: text_win.title, Eventually(NotEquals(old_title)))
207 self.assertThat(self.panel.title, Eventually(Equals(text_win.title)))207 self.assertThat(self.panel.title, Eventually(Equals(text_win.title)))
208208
209 def test_panel_title_doesnt_change_with_switcher(self):
210 """Switching between apps must not change the Panels title."""
211 calc_win = self.open_new_application_window("Calculator")
212 text_win = self.open_new_application_window("Text Editor")
213 current_title = self.panel.title
214
215 self.switcher.initiate()
216 self.addCleanup(self.switcher.terminate)
217 self.switcher.next_icon()
218
219 self.assertThat(self.panel.title,
220 Eventually(Equals(current_title)))
221
209222
210class PanelWindowButtonsTests(PanelTestsBase):223class PanelWindowButtonsTests(PanelTestsBase):
211224