mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-20 16:25:43 -05:00
Removed Translations, bugfixes for Round Trip
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#include <obs-module.h>
|
||||
|
||||
OBS_DECLARE_MODULE()
|
||||
OBS_MODULE_USE_DEFAULT_LOCALE("frontend-tools", "en-US")
|
||||
|
||||
void InitSceneSwitcher();
|
||||
void FreeSceneSwitcher();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -47,8 +47,9 @@ void SceneSwitcher::on_sceneRoundTripAdd_clicked()
|
||||
lock_guard<mutex> 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<mutex> 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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user