mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
SettingsDialog: Show confirmation when video is active
Show a confirmation dialog when the Show Connect Info button is clicked and video is active, to prevent users from unintentionally showing sensitive information while live.
This commit is contained in:
parent
3cc612cb1c
commit
81636dcbfa
@ -12,6 +12,9 @@ OBSWebSocket.Settings.Password="Server Password"
|
||||
OBSWebSocket.Settings.GeneratePassword="Generate Password"
|
||||
OBSWebSocket.Settings.ServerPort="Server Port"
|
||||
OBSWebSocket.Settings.ShowConnectInfo="Show Connect Info"
|
||||
OBSWebSocket.Settings.ShowConnectInfoWarningTitle="Warning: Currently Live"
|
||||
OBSWebSocket.Settings.ShowConnectInfoWarningMessage="It appears that an output (stream, recording, etc.) is currently active."
|
||||
OBSWebSocket.Settings.ShowConnectInfoWarningInfoText="Are you sure that you want to show your connect info?"
|
||||
|
||||
OBSWebSocket.SessionTable.Title="Connected WebSocket Sessions"
|
||||
OBSWebSocket.SessionTable.RemoteAddressColumnTitle="Remote Address"
|
||||
|
@ -215,6 +215,24 @@ void SettingsDialog::GeneratePasswordButtonClicked()
|
||||
|
||||
void SettingsDialog::ShowConnectInfoButtonClicked()
|
||||
{
|
||||
if (obs_video_active()) {
|
||||
QMessageBox msgBox;
|
||||
msgBox.setWindowTitle(obs_module_text("OBSWebSocket.Settings.ShowConnectInfoWarningTitle"));
|
||||
msgBox.setText(obs_module_text("OBSWebSocket.Settings.ShowConnectInfoWarningMessage"));
|
||||
msgBox.setInformativeText(obs_module_text("OBSWebSocket.Settings.ShowConnectInfoWarningInfoText"));
|
||||
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
|
||||
msgBox.setDefaultButton(QMessageBox::No);
|
||||
int ret = msgBox.exec();
|
||||
|
||||
switch (ret) {
|
||||
case QMessageBox::Yes:
|
||||
break;
|
||||
case QMessageBox::No:
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
connectInfo->show();
|
||||
connectInfo->activateWindow();
|
||||
connectInfo->raise();
|
||||
|
Loading…
Reference in New Issue
Block a user