X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Fmainwindow.cpp;h=f2adbf240c94a6e42afe8a2238553075f7cfcc38;hb=a60a2c892c08f6fab3a1e6b7cf4343cad8689058;hp=f33c57d6b2d24f6343c9bab2b04464e6ed489e8f;hpb=f8da8feaff269b75480625e1384951c20c3a529d;p=nageru diff --git a/nageru/mainwindow.cpp b/nageru/mainwindow.cpp index f33c57d..f2adbf2 100644 --- a/nageru/mainwindow.cpp +++ b/nageru/mainwindow.cpp @@ -252,6 +252,9 @@ MainWindow::MainWindow() connect(ui->me_live, &GLWidget::transition_names_updated, this, &MainWindow::set_transition_names); qRegisterMetaType("Mixer::Output"); + connect(ui->me_live, &GLWidget::name_updated, this, &MainWindow::update_channel_name); + connect(ui->me_preview, &GLWidget::name_updated, this, &MainWindow::update_channel_name); + // Hook up the prev/next buttons on the audio views. connect(ui->compact_prev_page, &QAbstractButton::clicked, this, &MainWindow::prev_page); connect(ui->compact_next_page, &QAbstractButton::clicked, this, &MainWindow::next_page); @@ -910,6 +913,12 @@ void MainWindow::fill_menu_from_theme_menu(const vectoraddAction(QString::fromStdString(entry->text)); + if (entry->entry.flags == Theme::MenuEntry::CHECKABLE) { + action->setCheckable(true); + } else if (entry->entry.flags == Theme::MenuEntry::CHECKED) { + action->setCheckable(true); + action->setChecked(true); + } connect(action, &QAction::triggered, [lua_ref = entry->entry.lua_ref] { global_mixer->theme_menu_entry_clicked(lua_ref); }); @@ -1497,7 +1506,11 @@ void MainWindow::set_transition_names(vector transition_names) void MainWindow::update_channel_name(Mixer::Output output, const string &name) { - if (output >= Mixer::OUTPUT_INPUT0) { + if (output == Mixer::OUTPUT_LIVE) { + ui->label_live->setText(name.c_str()); + } else if (output == Mixer::OUTPUT_PREVIEW) { + ui->label_preview->setText(name.c_str()); + } else if (output >= Mixer::OUTPUT_INPUT0) { unsigned channel = output - Mixer::OUTPUT_INPUT0; previews[channel]->label->setText(name.c_str()); }