}
void
-set_title_settings(signal_user_data_t *ud, GhbValue *settings)
+ghb_set_title_settings(signal_user_data_t *ud, GhbValue *settings)
{
int title_id, titleindex;
const hb_title_t * title;
g_free(dest);
ghb_dict_set_int(settings, "preview_frame", 2);
- ghb_update_summary_info(ud);
}
void
ghb_set_current_title_settings(signal_user_data_t *ud)
{
- set_title_settings(ud, ud->settings);
+ ghb_set_title_settings(ud, ud->settings);
ghb_update_summary_info(ud);
}
title = hb_list_item(list, ii);
ghb_dict_set_int(settings, "title", title ? title->index : -1);
- set_title_settings(ud, settings);
+ ghb_set_title_settings(ud, settings);
ghb_array_append(settings_array, settings);
}
if (titleindex < 0 || titleindex >= count)
count = ghb_array_len(ud->settings_array);
int idx = (titleindex >= 0 && titleindex < count) ? titleindex : 0;
+ if (ghb_dict_get_bool(ud->prefs, "SyncTitleSettings"))
+ {
+ GhbValue * preset = ghb_settings_to_preset(ud->settings);
+ GhbValue * settings = ghb_array_get(ud->settings_array, idx);
+ if (preset != NULL)
+ {
+ ghb_preset_to_settings(settings, preset);
+ ghb_set_title_settings(ud, settings);
+ }
+ ghb_value_free(&preset);
+ }
ud->settings = ghb_array_get(ud->settings_array, idx);
ghb_load_settings(ud);
ghb_reset_preview_image(ud);
}
-}
-
-G_MODULE_EXPORT void
-title_reset_clicked_cb(GtkWidget *widget, signal_user_data_t *ud)
-{
- int title_id, titleindex;
- const hb_title_t *title;
-
- title_id = ghb_dict_get_int(ud->settings, "title");
- title = ghb_lookup_title(title_id, &titleindex);
- (void)title; // Silence "unused variable" warning
- load_all_titles(ud, titleindex);
- ghb_load_settings(ud);
+ ghb_update_summary_info(ud);
}
G_MODULE_EXPORT void
double min, double max, double step, double page,
int digits, gboolean inverted);
void ghb_update_summary_info(signal_user_data_t *ud);
+void ghb_set_title_settings(signal_user_data_t *ud, GhbValue *settings);
#endif // _CALLBACKS_H_
<property name="position">2</property>
</packing>
</child>
- <child>
- <object class="GtkButton" id="title_reset">
- <property name="label" translatable="yes">Reset All Titles</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="tooltip_text" translatable="yes">Apply current settings to all titles</property>
- <property name="receives_default">True</property>
- <property name="halign">end</property>
- <signal name="clicked" handler="title_reset_clicked_cb" swapped="no"/>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
</object>
<packing>
<property name="top_attach">0</property>
<property name="height">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="SyncTitleSettings">
+ <property name="label" translatable="yes">Use the same settings for all titles in a batch</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">When checked, every title will use the same settings when adding a
+batch of titles to the queue.
+
+Uncheck this if you want to allow changing each title's settings independently.</property>
+ <property name="halign">start</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="pref_changed_cb" swapped="no"/>
+ </object>
+ <packing>
+ <property name="top_attach">8</property>
+ <property name="left_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
"DiskFreeCheck": true,
"DiskFreeLimit": 10000,
"RemoveFinishedJobs": false,
+ "SyncTitleSettings": true,
"HideAdvancedVideoSettings": true,
"AutoScan": false,
"AddCC": false,
gboolean autoscale, br, constant;
+ ghb_dict_remove(preset, "title");
ghb_dict_set_bool(preset, "Default", 0);
ghb_dict_set_int(preset, "Type", HB_PRESET_TYPE_CUSTOM);
if (!ghb_dict_get_bool(preset, "PictureWidthEnable"))
GtkWidget *row;
gint count, ii;
int max_title_len = 0;
+ GhbValue * preset = NULL;
list = GTK_LIST_BOX(GHB_WIDGET(ud->builder, "title_add_multiple_list"));
+ if (ghb_dict_get_bool(ud->prefs, "SyncTitleSettings"))
+ {
+ preset = ghb_settings_to_preset(ud->settings);
+ }
+
// Set up the list of titles
count = ghb_array_len(ud->settings_array);
for (ii = 0; ii < count; ii++)
chooser = GTK_FILE_CHOOSER(find_widget(row, "title_dir"));
settings = ghb_array_get(ud->settings_array, ii);
+ if (preset != NULL)
+ {
+ ghb_preset_to_settings(settings, preset);
+ ghb_set_title_settings(ud, settings);
+ }
title_id = ghb_dict_get_int(settings, "title");
title = ghb_lookup_title(title_id, &titleindex);
if (title != NULL)