Skip to content

Commit 5279574

Browse files
committed
GUI - make goto buffer shortcuts standard and remove pref to disable them
1 parent ae4934a commit 5279574

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

app/gui/qt/mainwindow.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3074,7 +3074,6 @@ void MainWindow::readSettings() {
30743074
piSettings->show_scopes = settings.value("prefs/scope/show-scopes", true).toBool();
30753075
piSettings->show_scope_labels = settings.value("prefs/scope/show-labels", false).toBool();
30763076
piSettings->show_cues = settings.value("prefs/show_cues", true).toBool();
3077-
piSettings->goto_buffer_shortcuts = settings.value("prefs/goto_buffer_shortcuts", false).toBool();
30783077
QString styleName = settings.value("prefs/theme", "").toString();
30793078
piSettings->themeStyle = theme->themeNameToStyle(styleName);
30803079
piSettings->show_autocompletion = settings.value("prefs/show-autocompletion", true).toBool();
@@ -3123,7 +3122,6 @@ void MainWindow::writeSettings()
31233122
settings.setValue("prefs/scope/show-labels", piSettings->show_scope_labels );
31243123
settings.setValue("prefs/scope/show-scopes", piSettings->show_scopes );
31253124
settings.setValue("prefs/show_cues", piSettings->show_cues);
3126-
settings.setValue("prefs/goto_buffer_shortcuts", piSettings->goto_buffer_shortcuts);
31273125
settings.setValue("prefs/theme", theme->themeStyleToName(piSettings->themeStyle));
31283126

31293127
settings.setValue("prefs/show-autocompletion", piSettings->show_autocompletion);
@@ -3384,11 +3382,8 @@ void MainWindow::tabPrev() {
33843382
}
33853383

33863384
void MainWindow::tabGoto(int index) {
3387-
if (!piSettings->goto_buffer_shortcuts)
3388-
return;
3389-
3390-
if (index < tabs->count())
3391-
QMetaObject::invokeMethod(tabs, "setCurrentIndex", Q_ARG(int, index));
3385+
if (index < tabs->count())
3386+
QMetaObject::invokeMethod(tabs, "setCurrentIndex", Q_ARG(int, index));
33923387
}
33933388

33943389
void MainWindow::setLineMarkerinCurrentWorkspace(int num) {

app/gui/qt/widgets/settingswidget.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,6 @@ QGroupBox* SettingsWidget::createEditorPrefsTab() {
304304
show_tabs->setToolTip(tr("Toggle visibility of the buffer selection tabs."));
305305
full_screen = new QCheckBox(tr("Full screen"));
306306
full_screen->setToolTip(tooltipStrShiftMeta('F', tr("Toggle full screen mode.")));
307-
goto_buffer_shortcuts = new QCheckBox(tr("Enable buffer shortcuts"));
308-
goto_buffer_shortcuts->setToolTip(tr("Use C-M-0 .. C-M-9 to go to buffer directly"));
309307

310308
colourModeButtonGroup = new QButtonGroup(this);
311309
lightModeCheck = new QCheckBox(tr("Light"));
@@ -342,7 +340,7 @@ QGroupBox* SettingsWidget::createEditorPrefsTab() {
342340

343341
automation_box_layout->addWidget(auto_indent_on_run);
344342
automation_box_layout->addWidget(full_screen);
345-
automation_box_layout->addWidget(goto_buffer_shortcuts);
343+
346344
automation_box->setLayout(automation_box_layout);
347345

348346
QGroupBox *debug_box = new QGroupBox(tr("Logging"));
@@ -657,7 +655,6 @@ void SettingsWidget::updateSettings() {
657655
piSettings->show_buttons = show_buttons->isChecked();
658656
piSettings->show_tabs = show_tabs->isChecked();
659657
piSettings->full_screen = full_screen->isChecked();
660-
piSettings->goto_buffer_shortcuts = goto_buffer_shortcuts->isChecked();
661658
piSettings->log_synths = log_synths->isChecked();
662659
piSettings->clear_output_on_run = clear_output_on_run->isChecked();
663660
piSettings->log_cues = log_cues->isChecked();
@@ -697,7 +694,6 @@ void SettingsWidget::settingsChanged() {
697694
show_buttons->setChecked(piSettings->show_buttons);
698695
show_tabs->setChecked(piSettings->show_tabs);
699696
full_screen->setChecked(piSettings->full_screen);
700-
goto_buffer_shortcuts->setChecked(piSettings->goto_buffer_shortcuts);
701697
log_synths->setChecked(piSettings->log_synths);
702698
clear_output_on_run->setChecked(piSettings->clear_output_on_run);
703699
log_cues->setChecked(piSettings->log_cues);
@@ -743,7 +739,6 @@ void SettingsWidget::connectAll() {
743739
connect(show_buttons, SIGNAL(clicked()), this, SLOT(updateSettings()));
744740
connect(show_tabs, SIGNAL(clicked()), this, SLOT(updateSettings()));
745741
connect(full_screen, SIGNAL(clicked()), this, SLOT(updateSettings()));
746-
connect(goto_buffer_shortcuts, SIGNAL(clicked()), this, SLOT(updateSettings()));
747742
connect(log_synths, SIGNAL(clicked()), this, SLOT(updateSettings()));
748743
connect(clear_output_on_run, SIGNAL(clicked()), this, SLOT(updateSettings()));
749744
connect(log_cues, SIGNAL(clicked()), this, SLOT(updateSettings()));

0 commit comments

Comments
 (0)