From d75ed150377c81bb46b097cca12cbdb5bd83a75f Mon Sep 17 00:00:00 2001 From: partouf Date: Sun, 31 Jan 2016 18:37:16 +0100 Subject: [PATCH] libobs: Add file saving to file property (This commit also modifies the UI) Closes jp9000/obs-studio#502 --- libobs/obs-properties.h | 1 + obs/properties-view.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/libobs/obs-properties.h b/libobs/obs-properties.h index 5528a2f5c..8d400a6d7 100644 --- a/libobs/obs-properties.h +++ b/libobs/obs-properties.h @@ -72,6 +72,7 @@ enum obs_combo_type { enum obs_path_type { OBS_PATH_FILE, + OBS_PATH_FILE_SAVE, OBS_PATH_DIRECTORY }; diff --git a/obs/properties-view.cpp b/obs/properties-view.cpp index 5131f52bf..1d16b3245 100644 --- a/obs/properties-view.cpp +++ b/obs/properties-view.cpp @@ -1496,6 +1496,10 @@ bool WidgetInfo::PathChanged(const char *setting) path = QFileDialog::getOpenFileName(view, QT_UTF8(desc), QT_UTF8(default_path), QT_UTF8(filter)); + else if (type == OBS_PATH_FILE_SAVE) + path = QFileDialog::getSaveFileName(view, + QT_UTF8(desc), QT_UTF8(default_path), + QT_UTF8(filter)); if (path.isEmpty()) return false;