diff --git a/advanced-scene-switcher-module.c b/advanced-scene-switcher-module.c index df8e2de7..4443d2cd 100644 --- a/advanced-scene-switcher-module.c +++ b/advanced-scene-switcher-module.c @@ -1,7 +1,6 @@ #include OBS_DECLARE_MODULE() -OBS_MODULE_USE_DEFAULT_LOCALE("frontend-tools", "en-US") void InitSceneSwitcher(); void FreeSceneSwitcher(); diff --git a/advanced-scene-switcher.cpp b/advanced-scene-switcher.cpp index 705833f9..c5c76df3 100644 --- a/advanced-scene-switcher.cpp +++ b/advanced-scene-switcher.cpp @@ -998,14 +998,12 @@ void loadKeybinding(obs_hotkey_id hotkeyId); extern "C" void InitSceneSwitcher() { QAction* action - = (QAction*)obs_frontend_add_tools_menu_qaction(obs_module_text("Advanced Scene Switcher")); + = (QAction*)obs_frontend_add_tools_menu_qaction("Advanced Scene Switcher"); switcher = new SwitcherData; auto cb = []() { - obs_frontend_push_ui_translation(obs_module_get_string); - QMainWindow* window = (QMainWindow*)obs_frontend_get_main_window(); SceneSwitcher ss(window); diff --git a/general.cpp b/general.cpp index 5e84d5b8..30cf3fca 100644 --- a/general.cpp +++ b/general.cpp @@ -65,14 +65,14 @@ void SceneSwitcher::on_checkInterval_valueChanged(int value) void SceneSwitcher::SetStarted() { - ui->toggleStartButton->setText(obs_module_text("Stop")); - ui->pluginRunningText->setText(obs_module_text("Active")); + ui->toggleStartButton->setText("Stop"); + ui->pluginRunningText->setText("Active"); } void SceneSwitcher::SetStopped() { - ui->toggleStartButton->setText(obs_module_text("Start")); - ui->pluginRunningText->setText(obs_module_text("Inactive")); + ui->toggleStartButton->setText("Start"); + ui->pluginRunningText->setText("Inactive"); } void SceneSwitcher::on_toggleStartButton_clicked() diff --git a/scene-round-trip.cpp b/scene-round-trip.cpp index 1030ce4e..f13c62b7 100644 --- a/scene-round-trip.cpp +++ b/scene-round-trip.cpp @@ -47,8 +47,9 @@ void SceneSwitcher::on_sceneRoundTripAdd_clicked() lock_guard lock(switcher->m); for (auto& s : switcher->sceneRoundTripSwitches) { - if (s.scene1 == source1 && s.scene2 == source2) + if (s.scene1 == source1) { + s.scene2 = source2; s.delay = int(delay * 1000); s.transition = transition; s.sceneRoundTripStr = text.toUtf8().constData(); @@ -247,7 +248,7 @@ void SceneSwitcher::on_sceneRoundTrips_currentRowChanged(int idx) QListWidgetItem* item = ui->sceneRoundTrips->item(idx); - QString sceneRoundTrip = item->data(Qt::UserRole).toString(); + QString sceneRoundTrip = item->text(); lock_guard lock(switcher->m); for (auto& s : switcher->sceneRoundTripSwitches) @@ -270,7 +271,7 @@ void SceneSwitcher::on_sceneRoundTrips_currentRowChanged(int idx) int SceneSwitcher::SceneRoundTripFindByData(const QString& scene1) { - QRegExp rx(scene1 + " -> wait for [0-9]* seconds -> .*"); + QRegExp rx(scene1 + " ->.*"); int count = ui->sceneRoundTrips->count(); int idx = -1;