diff options
Diffstat (limited to 'src/components/channeltabswitcherhandy.cpp')
-rw-r--r-- | src/components/channeltabswitcherhandy.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/components/channeltabswitcherhandy.cpp b/src/components/channeltabswitcherhandy.cpp index 2faa2e2..7488d6f 100644 --- a/src/components/channeltabswitcherhandy.cpp +++ b/src/components/channeltabswitcherhandy.cpp @@ -131,6 +131,11 @@ void ChannelTabSwitcherHandy::GoToNextTab() { } } +void ChannelTabSwitcherHandy::GoToTab(int idx) { + if (hdy_tab_view_get_n_pages(m_tab_view) >= idx + 1) + hdy_tab_view_set_selected_page(m_tab_view, hdy_tab_view_get_nth_page(m_tab_view, idx)); +} + int ChannelTabSwitcherHandy::GetNumberOfTabs() const { return hdy_tab_view_get_n_pages(m_tab_view); } |