From 9c30dd0f95a11cb24f97b7eabd8eebb7ebdd5134 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Fri, 20 Jan 2023 20:02:26 +0100 Subject: UX improvement, populate output path --- Examples/WhisperDesktop/TranscribeDlg.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Examples/WhisperDesktop/TranscribeDlg.h') diff --git a/Examples/WhisperDesktop/TranscribeDlg.h b/Examples/WhisperDesktop/TranscribeDlg.h index 354e002..9a90510 100644 --- a/Examples/WhisperDesktop/TranscribeDlg.h +++ b/Examples/WhisperDesktop/TranscribeDlg.h @@ -28,6 +28,7 @@ public: ON_BUTTON_CLICK( IDC_CONSOLE, cbConsole.click ) ON_BUTTON_CLICK( IDCANCEL, onClose ) ON_BUTTON_CLICK( IDC_BACK, onBack ) + ON_BUTTON_CLICK( IDC_USE_INPUT_FOLDER, onInputFolderCheck ) ON_BUTTON_CLICK( IDC_BROWSE_MEDIA, onBrowseMedia ) ON_BUTTON_CLICK( IDC_BROWSE_RESULT, onBrowseOutput ) ON_BUTTON_CLICK( IDC_TRANSCRIBE, onTranscribe ) @@ -41,6 +42,7 @@ public: DDX_CONTROL_HANDLE( IDC_MODEL_DESC, modelDesc ) DDX_CONTROL_HANDLE( IDC_PATH_MEDIA, sourceMediaPath ) DDX_CONTROL_HANDLE( IDC_OUTPUT_FORMAT, transcribeOutFormat ) + DDX_CONTROL_HANDLE( IDC_USE_INPUT_FOLDER, useInputFolder ) DDX_CONTROL_HANDLE( IDC_PATH_RESULT, transcribeOutputPath ) DDX_CONTROL_HANDLE( IDC_BROWSE_RESULT, transcribeOutputBrowse ); DDX_CONTROL_HANDLE( IDC_TRANSCRIBE_PROGRESS, progressBar ); @@ -70,6 +72,7 @@ private: TranslateCheckbox cbTranslate; CEdit sourceMediaPath; + CButton useInputFolder; CEdit transcribeOutputPath; CButton transcribeOutputBrowse; CComboBox transcribeOutFormat; @@ -77,6 +80,7 @@ private: void populateOutputFormats(); LRESULT OnOutFormatChange( UINT, INT, HWND, BOOL& bHandled ); + void onInputFolderCheck(); void onBrowseMedia(); void onBrowseOutput(); void onTranscribe(); @@ -121,4 +125,6 @@ private: HRESULT progressCallback( double p ) noexcept; void onWmClose(); + void setOutputPath(); + void setOutputPath( const CString& input ); }; \ No newline at end of file -- cgit v1.2.3