From 31cbec7260dc06fa1b8cfbf05e0e9e5bcb1a2e3f Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Wed, 12 Dec 2018 11:59:56 -0800 Subject: [PATCH] LinGui: accept {source-path} in addition to {source_path} Standardize on '-' but accept legacy '_' --- gtk/src/callbacks.c | 7 ++++--- gtk/src/ghb.m4 | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index 28561445c..ee778de34 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -1166,10 +1166,11 @@ set_destination_settings(signal_user_data_t *ud, GhbValue *settings) const gchar *p; p = ghb_dict_get_string(ud->prefs, "auto_name_template"); - // {source_path} is only allowed as the first element of the + // {source-path} is only allowed as the first element of the // template since the path must come first in the filename if (p != NULL && - !strncasecmp(p, "{source_path}", strlen("{source_path}"))) + (!strncasecmp(p, "{source-path}", strlen("{source-path}")) || + !strncasecmp(p, "{source_path}", strlen("{source_path}")))) { const gchar * source; @@ -1186,7 +1187,7 @@ set_destination_settings(signal_user_data_t *ud, GhbValue *settings) } g_free(dirname); } - p += strlen("{source_path}"); + p += strlen("{source-path}"); } while (*p) { diff --git a/gtk/src/ghb.m4 b/gtk/src/ghb.m4 index 2f2fb3cc9..5aa339cb1 100644 --- a/gtk/src/ghb.m4 +++ b/gtk/src/ghb.m4 @@ -7413,7 +7413,7 @@ filter_output([ - Available Options: {source_path} {source} {title} {preset} {chapters} {date} {time} {creation-date} {creation-time} {quality} {bitrate} + Available Options: {source-path} {source} {title} {preset} {chapters} {date} {time} {creation-date} {creation-time} {quality} {bitrate} True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK -- 2.40.0