]> granicus.if.org Git - handbrake/commitdiff
LinGui: accept {source-path} in addition to {source_path}
authorJohn Stebbins <jstebbins.hb@gmail.com>
Wed, 12 Dec 2018 19:59:56 +0000 (11:59 -0800)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Wed, 12 Dec 2018 20:01:05 +0000 (12:01 -0800)
Standardize on '-' but accept legacy '_'

gtk/src/callbacks.c
gtk/src/ghb.m4

index 28561445ca7372a52f29aa16e76cb9ecdbe32d3f..ee778de343b9fb667a5e32889e72ce1b723ca0b9 100644 (file)
@@ -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)
         {
index 2f2fb3cc92e5f6aac9c79da2cce2e2b7b9ed5c66..5aa339cb1a2e6d7e48f7cd880f5f616222a0e368 100644 (file)
@@ -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>