MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / title_changed_cb

Function title_changed_cb

gtk/src/callbacks.c:2879–2923  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2877static gboolean update_preview = FALSE;
2878
2879G_MODULE_EXPORT void
2880title_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
2925G_MODULE_EXPORT void
2926ptop_widget_changed_cb (GtkWidget *widget, gpointer data)

Callers

nothing calls this directly

Calls 14

ghb_udFunction · 0.85
ghb_widget_intFunction · 0.85
ghb_lookup_titleFunction · 0.85
ghb_dict_get_boolFunction · 0.85
ghb_settings_to_presetFunction · 0.85
ghb_preset_to_settingsFunction · 0.85
ghb_set_title_settingsFunction · 0.85
ghb_load_settingsFunction · 0.85
ghb_grey_combo_optionsFunction · 0.85
ghb_builder_widgetFunction · 0.85

Tested by

no test coverage detected