| 793 | } |
| 794 | |
| 795 | G_MODULE_EXPORT void |
| 796 | title_add_all_action_cb (GSimpleAction *action, GVariant *param, |
| 797 | signal_user_data_t *ud) |
| 798 | { |
| 799 | gint count, ii; |
| 800 | GhbValue * preset = NULL; |
| 801 | |
| 802 | if (ghb_dict_get_bool(ud->prefs, "SyncTitleSettings")) |
| 803 | { |
| 804 | preset = ghb_settings_to_preset(ud->settings); |
| 805 | } |
| 806 | |
| 807 | // Set up the list of titles |
| 808 | count = ghb_array_len(ud->settings_array); |
| 809 | for (ii = 0; ii < count; ii++) |
| 810 | { |
| 811 | GhbValue *settings; |
| 812 | |
| 813 | settings = ghb_array_get(ud->settings_array, ii); |
| 814 | if (preset != NULL) |
| 815 | { |
| 816 | ghb_preset_to_settings(settings, preset); |
| 817 | ghb_set_title_settings(ud, settings); |
| 818 | } |
| 819 | ghb_dict_set_bool(settings, "title_selected", TRUE); |
| 820 | } |
| 821 | |
| 822 | if (preset != NULL) |
| 823 | { |
| 824 | ghb_value_free(&preset); |
| 825 | } |
| 826 | |
| 827 | for (ii = 0; ii < count; ii++) |
| 828 | { |
| 829 | if (!title_destination_is_unique(ud->settings_array, ii)) |
| 830 | { |
| 831 | ghb_question_dialog_run(GTK_WINDOW(ghb_builder_widget("hb_window")), |
| 832 | GHB_ACTION_NORMAL, _("OK"), NULL, _("Cannot Add Titles"), |
| 833 | _("The filenames are not unique. Please choose\n" |
| 834 | "a unique destination filename for each title.")); |
| 835 | title_add_multiple_action_cb(action, param, ud); |
| 836 | return; |
| 837 | } |
| 838 | } |
| 839 | add_multiple_titles(ud); |
| 840 | } |
nothing calls this directly
no test coverage detected