summaryrefslogtreecommitdiffstats
path: root/gtk/src
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2018-12-12 11:59:56 -0800
committerJohn Stebbins <[email protected]>2018-12-12 12:01:05 -0800
commit31cbec7260dc06fa1b8cfbf05e0e9e5bcb1a2e3f (patch)
treecf00743492f20700a8bbd31e9a3481d36163ad42 /gtk/src
parent962b4f29851bb56b6a696823c00e38a01a38a209 (diff)
LinGui: accept {source-path} in addition to {source_path}
Standardize on '-' but accept legacy '_'
Diffstat (limited to 'gtk/src')
-rw-r--r--gtk/src/callbacks.c7
-rw-r--r--gtk/src/ghb.m42
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([
</child>
<child>
<object class="GtkEntry" id="auto_name_template">
- <property name="tooltip_text" translatable="yes">Available Options: {source_path} {source} {title} {preset} {chapters} {date} {time} {creation-date} {creation-time} {quality} {bitrate}</property>
+ <property name="tooltip_text" translatable="yes">Available Options: {source-path} {source} {title} {preset} {chapters} {date} {time} {creation-date} {creation-time} {quality} {bitrate}</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>