obs-transitions: Fix All Files option for Stingers
On Windows, All Files was added by default with (*), but on macOS and Linux this appeared as an empty option in the dropdown and treated as a Video Files filter rather than All Files. This also adds proper translation handling for 'Video Files', matching the obs-ffmpeg-source. Fixes #5870
This commit is contained in:
parent
657c4d0125
commit
3aa90f7076
@ -12,6 +12,8 @@ Direction.Down="Down"
|
||||
SwipeIn="Swipe In"
|
||||
Color="Color"
|
||||
VideoFile="Video File"
|
||||
FileFilter.VideoFiles="Video Files"
|
||||
FileFilter.AllFiles="All Files"
|
||||
TransitionPoint="Transition Point"
|
||||
TransitionPointFrame="Transition Point (frame)"
|
||||
TransitionPointType="Transition Point Type"
|
||||
|
@ -570,8 +570,7 @@ static void stinger_enum_all_sources(void *data,
|
||||
enum_callback(s->source, s->matte_source, param);
|
||||
}
|
||||
|
||||
#define FILE_FILTER \
|
||||
"Video Files (*.mp4 *.ts *.mov *.wmv *.flv *.mkv *.avi *.gif *.webm);;"
|
||||
#define FILE_FILTER " (*.mp4 *.ts *.mov *.wmv *.flv *.mkv *.avi *.gif *.webm);;"
|
||||
|
||||
static bool transition_point_type_modified(obs_properties_t *ppts,
|
||||
obs_property_t *p, obs_data_t *s)
|
||||
@ -633,12 +632,18 @@ static bool track_matte_enabled_modified(obs_properties_t *ppts,
|
||||
static obs_properties_t *stinger_properties(void *data)
|
||||
{
|
||||
obs_properties_t *ppts = obs_properties_create();
|
||||
struct dstr filter = {0};
|
||||
|
||||
obs_properties_set_flags(ppts, OBS_PROPERTIES_DEFER_UPDATE);
|
||||
|
||||
dstr_copy(&filter, obs_module_text("FileFilter.VideoFiles"));
|
||||
dstr_cat(&filter, FILE_FILTER);
|
||||
dstr_cat(&filter, obs_module_text("FileFilter.AllFiles"));
|
||||
dstr_cat(&filter, " (*.*)");
|
||||
|
||||
// main stinger settings
|
||||
obs_properties_add_path(ppts, "path", obs_module_text("VideoFile"),
|
||||
OBS_PATH_FILE, FILE_FILTER, NULL);
|
||||
OBS_PATH_FILE, filter.array, NULL);
|
||||
|
||||
obs_property_t *p = obs_properties_add_list(
|
||||
ppts, "tp_type", obs_module_text("TransitionPointType"),
|
||||
@ -688,7 +693,7 @@ static obs_properties_t *stinger_properties(void *data)
|
||||
|
||||
obs_properties_add_path(track_matte_group, "track_matte_path",
|
||||
obs_module_text("TrackMatteVideoFile"),
|
||||
OBS_PATH_FILE, FILE_FILTER, NULL);
|
||||
OBS_PATH_FILE, filter.array, NULL);
|
||||
|
||||
obs_properties_add_bool(track_matte_group, "invert_matte",
|
||||
obs_module_text("InvertTrackMatte"));
|
||||
@ -701,6 +706,7 @@ static obs_properties_t *stinger_properties(void *data)
|
||||
obs_property_set_modified_callback(
|
||||
p, track_matte_enabled_modified);
|
||||
}
|
||||
dstr_free(&filter);
|
||||
|
||||
// audio output settings
|
||||
obs_property_t *monitor_list = obs_properties_add_list(
|
||||
|
Loading…
x
Reference in New Issue
Block a user