From 59b7fa532277bcc98ad66416f4cf402f8391a006 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 13 Oct 2014 20:51:50 +0100 Subject: [PATCH] Add ctrl+tab shortcut for changing tabs (rack and patchbay for now) --- resources/ui/carla_host.ui | 10 +++++++++- source/carla_host.py | 14 ++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/resources/ui/carla_host.ui b/resources/ui/carla_host.ui index 2ae7a8b1b..72759c837 100644 --- a/resources/ui/carla_host.ui +++ b/resources/ui/carla_host.ui @@ -137,7 +137,7 @@ 0 0 870 - 17 + 19 @@ -786,6 +786,14 @@ Show External + + + Next Tab + + + Ctrl+Tab + + diff --git a/source/carla_host.py b/source/carla_host.py index c550cb7da..047f10130 100644 --- a/source/carla_host.py +++ b/source/carla_host.py @@ -346,6 +346,8 @@ class HostWindow(QMainWindow): self.ui.act_help_about_juce.triggered.connect(self.slot_aboutJuce) self.ui.act_help_about_qt.triggered.connect(self.slot_aboutQt) + self.ui.act_extra_next_tab.triggered.connect(self.slot_tabsNext) + self.ui.cb_disk.currentIndexChanged.connect(self.slot_diskFolderChanged) self.ui.b_disk_add.clicked.connect(self.slot_diskFolderAdd) self.ui.b_disk_remove.clicked.connect(self.slot_diskFolderRemove) @@ -1301,6 +1303,18 @@ class HostWindow(QMainWindow): def slot_aboutQt(self): QApplication.instance().aboutQt() + # -------------------------------------------------------------------------------------------------------- + # Extra (menu actions) + + @pyqtSlot() + def slot_tabsNext(self): + nextTab = self.ui.tabWidget.currentIndex()+1 + + if nextTab > self.ui.tabWidget.count(): + nextTab = 0 + + self.ui.tabWidget.setCurrentIndex(nextTab) + # -------------------------------------------------------------------------------------------------------- # Disk (menu actions)