]> granicus.if.org Git - handbrake/commitdiff
LinGui: fix behaviour of queue add multiple
authorJohn Stebbins <jstebbins.hb@gmail.com>
Fri, 18 May 2018 14:39:05 +0000 (07:39 -0700)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Fri, 18 May 2018 14:39:05 +0000 (07:39 -0700)
It was adding titles that were not selected.

Fixes https://github.com/HandBrake/HandBrake/issues/1347

gtk/src/queuehandler.c

index df9816502bcff48cde6e461272bffaf39a80b9af..63598f9cad6c81c3f17d2625276110656ae623d2 100644 (file)
@@ -1725,9 +1725,13 @@ title_dest_file_cb(GtkWidget *widget, signal_user_data_t *ud)
     // Check if changing the destination file name resolves
     // a file name conflict.  Enable selection if so.
     // Disable selection if it creates a conflict!!!
-    gboolean can_select;
+    gboolean selected, can_select;
+
+    widget     = find_widget(GTK_WIDGET(row), "title_selected");
+    selected   = ghb_widget_boolean(widget);
     can_select = title_multiple_can_select(ud->settings_array, index);
-    ghb_dict_set_bool(settings, "title_selected", can_select);
+
+    ghb_dict_set_bool(settings, "title_selected", selected && can_select);
     title_add_multiple_set_sensitive(GTK_WIDGET(row), can_select);
 
     g_free(dest_file);
@@ -1761,9 +1765,13 @@ title_dest_dir_cb(GtkWidget *widget, signal_user_data_t *ud)
     // Check if changing the destination file name resolves
     // a file name conflict.  Enable selection if so.
     // Disable selection if it creates a conflict!!!
-    gboolean can_select;
+    gboolean selected, can_select;
+
+    widget     = find_widget(GTK_WIDGET(row), "title_selected");
+    selected   = ghb_widget_boolean(widget);
     can_select = title_multiple_can_select(ud->settings_array, index);
-    ghb_dict_set_bool(settings, "title_selected", can_select);
+
+    ghb_dict_set_bool(settings, "title_selected", selected && can_select);
     title_add_multiple_set_sensitive(GTK_WIDGET(row), can_select);
 
     g_free(dest_dir);