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

Function set_pref_subtitle

gtk/src/subtitlehandler.c:538–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

536}
537
538static void
539set_pref_subtitle(signal_user_data_t *ud)
540{
541 int sub_count, title_id;
542 GtkWidget *widget;
543 const hb_title_t *title;
544
545 title_id = ghb_dict_get_int(ud->settings, "title");
546 title = ghb_lookup_title(title_id, NULL);
547
548 clear_subtitle_list_ui();
549 if (title == NULL)
550 {
551 // Clear the subtitle list
552 clear_subtitle_list_settings(ud->settings);
553 return;
554 }
555 sub_count = hb_list_count(title->list_subtitle);
556 if (sub_count == 0)
557 {
558 // No source subtitles
559 widget = ghb_builder_widget("SubtitleSrtEnable");
560 gtk_widget_set_sensitive(widget, TRUE);
561 }
562 else
563 {
564 widget = ghb_builder_widget("SubtitleImportDisable");
565 gtk_widget_set_sensitive(widget, TRUE);
566 }
567 GhbValue *job = ghb_get_job_settings(ud->settings);
568 ghb_dict_remove(job, "Subtitle");
569 hb_preset_job_add_subtitles(ghb_scan_handle(), title_id, ud->settings, job);
570 subtitle_refresh_list_ui(ud);
571}
572
573static GhbValue*
574subtitle_get_selected_settings(signal_user_data_t *ud, int *index)

Callers 1

subtitle_reset_cbFunction · 0.85

Calls 10

ghb_dict_get_intFunction · 0.85
ghb_lookup_titleFunction · 0.85
clear_subtitle_list_uiFunction · 0.85
hb_list_countFunction · 0.85
ghb_builder_widgetFunction · 0.85
ghb_get_job_settingsFunction · 0.85
ghb_scan_handleFunction · 0.85
subtitle_refresh_list_uiFunction · 0.85

Tested by

no test coverage detected