mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-03-04 06:36:08 -05:00
Add 'source selection' dialog
Add a 'source selection' dialog to replace the 'enter a name' dialog. This new dialog allows you to make new instances of pre-existing sources so that you can add a pre-existing source to a different scene, or in to the same scene more than once. Also started implementing locale. Comtemplating switching to JSON-based locale later, so we can add things like descriptions/disambiguation, and so we can use jansson's built-in hash table when doing the string lookup.
This commit is contained in:
@@ -363,7 +363,8 @@ void OBSBasicSettings::LoadVideoSettings()
|
||||
|
||||
if (video_output_active(obs_video())) {
|
||||
ui->videoPage->setEnabled(false);
|
||||
ui->videoMsg->setText(QTStr("Settings.Video.CurrentlyActive"));
|
||||
ui->videoMsg->setText(
|
||||
QTStr("Basic.Settings.Video.CurrentlyActive"));
|
||||
}
|
||||
|
||||
LoadRendererList();
|
||||
@@ -634,8 +635,8 @@ bool OBSBasicSettings::QueryChanges()
|
||||
QMessageBox::StandardButton button;
|
||||
|
||||
button = QMessageBox::question(this,
|
||||
QTStr("Settings.ConfirmTitle"),
|
||||
QTStr("Settings.Confirm"),
|
||||
QTStr("Basic.Settings.ConfirmTitle"),
|
||||
QTStr("Basic.Settings.Confirm"),
|
||||
QMessageBox::Yes | QMessageBox::No |
|
||||
QMessageBox::Cancel);
|
||||
|
||||
@@ -711,6 +712,8 @@ static inline bool StreamExists(const char *name)
|
||||
return obs_get_service_by_name(name) != nullptr;
|
||||
}
|
||||
|
||||
#define INVALID_RES_STR "Basic.Settings.Video.InvalidResolution"
|
||||
|
||||
static bool ValidResolutions(Ui::OBSBasicSettings *ui)
|
||||
{
|
||||
QString baseRes = ui->baseResolution->lineEdit()->text();
|
||||
@@ -720,8 +723,7 @@ static bool ValidResolutions(Ui::OBSBasicSettings *ui)
|
||||
if (!ConvertResText(QT_TO_UTF8(baseRes), cx, cy) ||
|
||||
!ConvertResText(QT_TO_UTF8(outputRes), cx, cy)) {
|
||||
|
||||
ui->videoMsg->setText(
|
||||
QTStr("Settings.Video.InvalidResolution"));
|
||||
ui->videoMsg->setText(QTStr(INVALID_RES_STR));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -762,7 +764,7 @@ void OBSBasicSettings::AudioChangedRestart()
|
||||
{
|
||||
if (!loading) {
|
||||
audioChanged = true;
|
||||
ui->audioMsg->setText(QTStr("Settings.ProgramRestart"));
|
||||
ui->audioMsg->setText(QTStr("Basic.Settings.ProgramRestart"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -770,7 +772,7 @@ void OBSBasicSettings::VideoChangedRestart()
|
||||
{
|
||||
if (!loading) {
|
||||
videoChanged = true;
|
||||
ui->videoMsg->setText(QTStr("Settings.ProgramRestart"));
|
||||
ui->videoMsg->setText(QTStr("Basic.Settings.ProgramRestart"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user