diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 6a2d2b45..10290604 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -381,8 +381,10 @@ void MainWindow::setup_FileMenu_Actions() if (presetsMenu == nullptr) { presetsMenu = new QMenu(tr("New Tab From &Preset"), this); - presetsMenu->addAction(QIcon(), tr("1 &Terminal"), - this, SLOT(addNewTab())); + auto a = presetsMenu->addAction(QIcon(), tr("1 &Terminal")); + connect(a, &QAction::triggered, consoleTabulator, [this]() { + consoleTabulator->addNewTab(m_config); + }); presetsMenu->addAction(QIcon(), tr("2 &Horizontal Terminals"), consoleTabulator, SLOT(preset2Horizontal())); presetsMenu->addAction(QIcon(), tr("2 &Vertical Terminals"), diff --git a/src/propertiesdialog.cpp b/src/propertiesdialog.cpp index d28ada4e..281b26cb 100644 --- a/src/propertiesdialog.cpp +++ b/src/propertiesdialog.cpp @@ -87,7 +87,12 @@ PropertiesDialog::PropertiesDialog(QWidget *parent) this, &PropertiesDialog::chooseBackgroundImageButton_clicked); // fixed size - connect(saveSizeOnExitCheckBox, &QCheckBox::stateChanged, [this] (int state) { +#if (QT_VERSION >= QT_VERSION_CHECK(6,7,0)) + connect(saveSizeOnExitCheckBox, &QCheckBox::checkStateChanged, [this] (int state) +#else + connect(saveSizeOnExitCheckBox, &QCheckBox::stateChanged, [this] (int state) +#endif + { fixedSizeLabel->setEnabled(state == Qt::Unchecked); xLabel->setEnabled(state == Qt::Unchecked); fixedWithSpinBox->setEnabled(state == Qt::Unchecked); diff --git a/src/termwidget.cpp b/src/termwidget.cpp index 2067e767..7cc81cc2 100644 --- a/src/termwidget.cpp +++ b/src/termwidget.cpp @@ -200,6 +200,11 @@ void TermWidgetImpl::customContextMenuCall(const QPoint & pos) menu.addAction(actions[QStringLiteral(TOGGLE_MENU)]); menu.addAction(actions[QStringLiteral(HIDE_WINDOW_BORDERS)]); menu.addAction(actions[QStringLiteral(PREFERENCES)]); + + // The disabled actions should be updated before showing the menu because + // the "Actions" menu of the main window may have not been shown yet. + mainWindow->updateDisabledActions(); + menu.exec(mapToGlobal(pos)); }