diff options
| -rw-r--r-- | panel/PanelIndicatorsView.cpp | 6 | ||||
| -rw-r--r-- | panel/PanelIndicatorsView.h | 2 | ||||
| -rw-r--r-- | panel/PanelMenuView.cpp | 3 | ||||
| -rw-r--r-- | panel/PanelView.cpp | 2 | ||||
| -rw-r--r-- | panel/PanelView.h | 2 | ||||
| -rw-r--r-- | tests/autopilot/unity/tests/test_panel.py | 3 |
6 files changed, 9 insertions, 9 deletions
diff --git a/panel/PanelIndicatorsView.cpp b/panel/PanelIndicatorsView.cpp index 97ac92241..3d5cef935 100644 --- a/panel/PanelIndicatorsView.cpp +++ b/panel/PanelIndicatorsView.cpp @@ -296,7 +296,7 @@ void PanelIndicatorsView::AddEntryView(PanelIndicatorEntryView* view, IndicatorE { view->refreshed.connect(sigc::mem_fun(this, &PanelIndicatorsView::OnEntryRefreshed)); entries_.insert({entry_id, view}); - on_indicator_updated.emit(view); + on_indicator_updated.emit(); entry_added.emit(view); } } @@ -318,7 +318,7 @@ void PanelIndicatorsView::OnEntryRefreshed(PanelIndicatorEntryView* view) { QueueRelayout(); QueueDraw(); - on_indicator_updated.emit(view); + on_indicator_updated.emit(); } void PanelIndicatorsView::RemoveEntryView(PanelIndicatorEntryView* view) @@ -334,7 +334,7 @@ void PanelIndicatorsView::RemoveEntryView(PanelIndicatorEntryView* view) RemoveChild(view); entries_.erase(view->GetEntryID()); layout_->RemoveChildObject(view); - on_indicator_updated.emit(view); + on_indicator_updated.emit(); QueueRelayout(); QueueDraw(); diff --git a/panel/PanelIndicatorsView.h b/panel/PanelIndicatorsView.h index 8067a02d9..cdcdd889f 100644 --- a/panel/PanelIndicatorsView.h +++ b/panel/PanelIndicatorsView.h @@ -71,7 +71,7 @@ public: nux::Property<double> opacity; - sigc::signal<void, PanelIndicatorEntryView*> on_indicator_updated; + sigc::signal<void> on_indicator_updated; sigc::signal<void, PanelIndicatorEntryView*> entry_added; sigc::signal<void, PanelIndicatorEntryView*> entry_removed; diff --git a/panel/PanelMenuView.cpp b/panel/PanelMenuView.cpp index ae3b29032..940cdd985 100644 --- a/panel/PanelMenuView.cpp +++ b/panel/PanelMenuView.cpp @@ -1114,6 +1114,9 @@ bool PanelMenuView::UpdateActiveWindowPosition() { we_control_active_ = we_control_window; + if (!entries_.empty()) + on_indicator_updated.emit(); + if (Refresh()) QueueDraw(); } diff --git a/panel/PanelView.cpp b/panel/PanelView.cpp index 1ac209ad3..666e5e54a 100644 --- a/panel/PanelView.cpp +++ b/panel/PanelView.cpp @@ -562,7 +562,7 @@ void PanelView::OnObjectRemoved(indicator::Indicator::Ptr const& proxy) QueueDraw(); } -void PanelView::OnIndicatorViewUpdated(PanelIndicatorEntryView* view) +void PanelView::OnIndicatorViewUpdated() { needs_geo_sync_ = true; QueueRelayout(); diff --git a/panel/PanelView.h b/panel/PanelView.h index c2888fe66..3fe479367 100644 --- a/panel/PanelView.h +++ b/panel/PanelView.h @@ -91,7 +91,7 @@ protected: void OnObjectAdded(indicator::Indicator::Ptr const& proxy); void OnObjectRemoved(indicator::Indicator::Ptr const& proxy); - void OnIndicatorViewUpdated(PanelIndicatorEntryView* view); + void OnIndicatorViewUpdated(); void OnMenuPointerMoved(int x, int y); void OnEntryActivateRequest(std::string const& entry_id); void OnEntryActivated(std::string const& entry_id, nux::Rect const& geo); diff --git a/tests/autopilot/unity/tests/test_panel.py b/tests/autopilot/unity/tests/test_panel.py index 67eaac70f..d9472bc42 100644 --- a/tests/autopilot/unity/tests/test_panel.py +++ b/tests/autopilot/unity/tests/test_panel.py @@ -1030,9 +1030,6 @@ class PanelKeyNavigationTests(PanelTestsBase): expected_indicator = self.panel.get_indicator_entries(include_hidden_menus=True)[0] self.assertThat(open_indicator.entry_id, Eventually(Equals(expected_indicator.entry_id))) - self.keybinding("panel/open_first_menu") - self.assertThat(self.panel.get_active_indicator, Eventually(Equals(None))) - def test_panel_menu_accelerators_work(self): """Pressing a valid menu accelerator must open the correct menu item.""" self.open_new_application_window("Text Editor") |
