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
1=== modified file 'panel/PanelMenuView.cpp'
2--- panel/PanelMenuView.cpp 2012-07-30 17:09:43 +0000
3+++ panel/PanelMenuView.cpp 2012-08-22 04:35:23 +0000
4@@ -152,7 +152,6 @@
5 _titlebar_grab_area->mouse_leave.connect(sigc::mem_fun(this, &PanelMenuView::OnPanelViewMouseLeave));
6
7 _ubus_manager.RegisterInterest(UBUS_SWITCHER_SHOWN, sigc::mem_fun(this, &PanelMenuView::OnSwitcherShown));
8- _ubus_manager.RegisterInterest(UBUS_SWITCHER_SELECTION_CHANGED, sigc::mem_fun(this, &PanelMenuView::OnSwitcherSelectionChanged));
9
10 _ubus_manager.RegisterInterest(UBUS_LAUNCHER_START_KEY_NAV, sigc::mem_fun(this, &PanelMenuView::OnLauncherKeyNavStarted));
11 _ubus_manager.RegisterInterest(UBUS_LAUNCHER_END_KEY_NAV, sigc::mem_fun(this, &PanelMenuView::OnLauncherKeyNavEnded));
12@@ -1552,18 +1551,6 @@
13 QueueDraw();
14 }
15
16-void PanelMenuView::OnSwitcherSelectionChanged(GVariant* data)
17-{
18- if (!data || !_switcher_showing)
19- return;
20-
21- const gchar *title = g_variant_get_string(data, 0);
22- _panel_title = (title ? title : "");
23-
24- Refresh();
25- QueueDraw();
26-}
27-
28 void PanelMenuView::OnLauncherKeyNavStarted(GVariant* data)
29 {
30 if (_launcher_keynav)
31
32=== modified file 'panel/PanelMenuView.h'
33--- panel/PanelMenuView.h 2012-06-18 02:57:23 +0000
34+++ panel/PanelMenuView.h 2012-08-22 04:35:23 +0000
35@@ -113,7 +113,6 @@
36 std::string GetActiveViewName(bool use_appname = false) const;
37
38 void OnSwitcherShown(GVariant* data);
39- void OnSwitcherSelectionChanged(GVariant* data);
40 void OnLauncherKeyNavStarted(GVariant* data);
41 void OnLauncherKeyNavEnded(GVariant* data);
42 void OnLauncherSelectionChanged(GVariant* data);
43
44=== modified file 'tests/autopilot/unity/tests/test_panel.py'
45--- tests/autopilot/unity/tests/test_panel.py 2012-08-09 17:12:10 +0000
46+++ tests/autopilot/unity/tests/test_panel.py 2012-08-22 04:35:23 +0000
47@@ -206,6 +206,19 @@
48 self.assertThat(lambda: text_win.title, Eventually(NotEquals(old_title)))
49 self.assertThat(self.panel.title, Eventually(Equals(text_win.title)))
50
51+ def test_panel_title_doesnt_change_with_switcher(self):
52+ """Switching between apps must not change the Panels title."""
53+ calc_win = self.open_new_application_window("Calculator")
54+ text_win = self.open_new_application_window("Text Editor")
55+ current_title = self.panel.title
56+
57+ self.switcher.initiate()
58+ self.addCleanup(self.switcher.terminate)
59+ self.switcher.next_icon()
60+
61+ self.assertThat(self.panel.title,
62+ Eventually(Equals(current_title)))
63+
64
65 class PanelWindowButtonsTests(PanelTestsBase):
66