| 2877 | static gboolean update_preview = FALSE; |
| 2878 | |
| 2879 | G_MODULE_EXPORT void |
| 2880 | title_changed_cb (GtkWidget *widget, gpointer data) |
| 2881 | { |
| 2882 | gint title_id, titleindex, count; |
| 2883 | const hb_title_t * title; |
| 2884 | signal_user_data_t *ud = ghb_ud(); |
| 2885 | |
| 2886 | title_id = ghb_widget_int(widget); |
| 2887 | title = ghb_lookup_title(title_id, &titleindex); |
| 2888 | |
| 2889 | count = ghb_array_len(ud->settings_array); |
| 2890 | int idx = (titleindex >= 0 && titleindex < count) ? titleindex : 0; |
| 2891 | if (ghb_dict_get_bool(ud->prefs, "SyncTitleSettings")) |
| 2892 | { |
| 2893 | GhbValue * preset = ghb_settings_to_preset(ud->settings); |
| 2894 | GhbValue * settings = ghb_array_get(ud->settings_array, idx); |
| 2895 | if (preset != NULL) |
| 2896 | { |
| 2897 | ghb_preset_to_settings(settings, preset); |
| 2898 | ghb_set_title_settings(ud, settings); |
| 2899 | } |
| 2900 | ghb_value_free(&preset); |
| 2901 | } |
| 2902 | ud->settings = ghb_array_get(ud->settings_array, idx); |
| 2903 | ghb_load_settings(ud); |
| 2904 | |
| 2905 | ghb_audio_set_actions_enabled(ud, title != NULL); |
| 2906 | ghb_subtitle_set_actions_enabled(ud, title != NULL); |
| 2907 | ghb_grey_combo_options(ud); |
| 2908 | |
| 2909 | if (title != NULL) |
| 2910 | { |
| 2911 | gint preview_count; |
| 2912 | preview_count = title->preview_count; |
| 2913 | if (preview_count < 1) |
| 2914 | { |
| 2915 | preview_count = 1; |
| 2916 | } |
| 2917 | widget = ghb_builder_widget("preview_frame"); |
| 2918 | gtk_range_set_range(GTK_RANGE(widget), 1, preview_count); |
| 2919 | |
| 2920 | ghb_reset_preview_image(ud); |
| 2921 | } |
| 2922 | ghb_update_summary_info(ud); |
| 2923 | } |
| 2924 | |
| 2925 | G_MODULE_EXPORT void |
| 2926 | ptop_widget_changed_cb (GtkWidget *widget, gpointer data) |
nothing calls this directly
no test coverage detected