summaryrefslogtreecommitdiff
path: root/src/components/channeltabswitcherhandy.cpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2022-05-10 01:09:42 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2022-05-10 01:09:42 -0400
commit1d8ef79da68a89c4561b9079b795d05484ddc419 (patch)
treeb0c223e933897509ef346e6ba5b96612e432f4f0 /src/components/channeltabswitcherhandy.cpp
parentbbf32730cd322ab8d826b9fb73d83fbde73c5419 (diff)
downloadabaddon-portaudio-1d8ef79da68a89c4561b9079b795d05484ddc419.tar.gz
abaddon-portaudio-1d8ef79da68a89c4561b9079b795d05484ddc419.zip
add ctrl+number key shortcuts for tabs
Diffstat (limited to 'src/components/channeltabswitcherhandy.cpp')
-rw-r--r--src/components/channeltabswitcherhandy.cpp5
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);
}