From a508c17f0a7048a5592d91c0a6587bfb59c28e84 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sun, 6 Sep 2015 16:01:40 -0700 Subject: [PATCH] UI: Add confirmation when clicking stop stream I decided to add a confirmation message box simply to prevent cases where users may accidentally click "Stop Streaming". --- obs/data/locale/en-US.ini | 2 ++ obs/window-basic-main.cpp | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/obs/data/locale/en-US.ini b/obs/data/locale/en-US.ini index bbaea10ec..2ede7c004 100644 --- a/obs/data/locale/en-US.ini +++ b/obs/data/locale/en-US.ini @@ -224,6 +224,8 @@ Basic.Main.StartRecording="Start Recording" Basic.Main.StartStreaming="Start Streaming" Basic.Main.StopRecording="Stop Recording" Basic.Main.StopStreaming="Stop Streaming" +Basic.Main.StopStreaming.Title="Stop stream?" +Basic.Main.StopStreaming.Text="Are you sure you want to stop the stream?" # basic mode file menu Basic.MainMenu.File="&File" diff --git a/obs/window-basic-main.cpp b/obs/window-basic-main.cpp index 0a08454e9..474bdaacf 100644 --- a/obs/window-basic-main.cpp +++ b/obs/window-basic-main.cpp @@ -3058,6 +3058,12 @@ void OBSBasic::StartStreaming() void OBSBasic::StopStreaming() { + QMessageBox::StandardButton button = QMessageBox::question(this, + QTStr("Basic.Main.StopStreaming.Title"), + QTStr("Basic.Main.StopStreaming.Text")); + if (button == QMessageBox::No) + return; + SaveProject(); if (outputHandler->StreamingActive())