Auto suggest scene and source names.

NameDialog can have placeholder text.
Localize scene number.
Pre-select scene and source text.
This commit is contained in:
Socapex
2014-05-09 18:09:17 -04:00
parent 978de126b3
commit 6dc84ad8fe
5 changed files with 22 additions and 3 deletions

View File

@@ -18,6 +18,7 @@
#include "window-basic-main.hpp"
#include "window-basic-source-select.hpp"
#include "qt-wrappers.hpp"
#include "obs-app.hpp"
bool OBSBasicSourceSelect::EnumSources(void *data, obs_source_t source)
{
@@ -143,5 +144,13 @@ OBSBasicSourceSelect::OBSBasicSourceSelect(OBSBasic *parent, const char *type_)
{
ui->setupUi(this);
const char *placeHolderText = obs_source_getdisplayname(
OBS_SOURCE_TYPE_INPUT,
type_, App()->GetLocale());
ui->sourceName->setText(QT_UTF8(placeHolderText));
ui->sourceName->setFocus(); //Fixes deselect of text.
ui->sourceName->selectAll();
obs_enum_sources(EnumSources, this);
}