feat(speed-dial): add plugin page capabilities as actions

Plugin Pages capabilities (top-level notebook tabs) were missing from the Speed Dial because ActionRegistry only ingested Script capabilities.

Enumerate and subscribe to Pages as well. Launching a page action switches the notebook to that page, swapping it into the visible slot first when it lives behind the overflow dropdown.
This commit is contained in:
Lam Wei Lun
2026-10-09 23:44:52 +08:00
parent b5f5b50157
commit e72ace164b
4 changed files with 109 additions and 5 deletions
+11
View File
@@ -400,6 +400,17 @@ void PluginPages::relayout()
}
}
void PluginPages::select_page(const PluginCapabilityId& id)
{
if (m_parent == nullptr || m_pages.find(id) == m_pages.end())
return;
// Swap the page into the visible slot first when it lives behind the overflow menu.
m_swapped_in_id = id;
relayout();
m_parent->SelectPageByName(page_tab_id(id));
}
void PluginPages::show_overflow_menu()
{
const int visible_slots = std::max(1, m_visible_page_count);