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

Function subtitle_update_dialog_widgets

gtk/src/subtitlehandler.c:621–762  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

619}
620
621static void
622subtitle_update_dialog_widgets(signal_user_data_t *ud, GhbValue *subsettings)
623{
624 GtkWidget *widget;
625
626 if (subsettings != NULL)
627 {
628 // Update widgets with subsettings
629 GhbValue *val, *import;
630 gboolean burn, force, def;
631 int source;
632
633 const char *mux_id;
634 const hb_container_t *mux;
635
636 mux_id = ghb_dict_get_string(ud->settings, "FileFormat");
637 mux = ghb_lookup_container_by_name(mux_id);
638
639 import = ghb_dict_get(subsettings, "Import");
640 source = get_sub_source(ud->settings, subsettings);
641
642 val = ghb_dict_get_value(subsettings, "Name");
643 if (val != NULL)
644 {
645 ghb_ui_update("SubtitleTrackName", val);
646 }
647 else
648 {
649 ghb_ui_update("SubtitleTrackName", ghb_string_value(""));
650 }
651
652 val = ghb_dict_get(subsettings, "Track");
653 if (val != NULL)
654 {
655 ghb_ui_update("SubtitleTrack", val);
656
657 // Hide regular subtitle widgets
658 widget = ghb_builder_widget("subtitle_track_label");
659 gtk_widget_set_visible(widget, import == NULL);
660 widget = ghb_builder_widget("SubtitleTrack");
661 gtk_widget_set_visible(widget, import == NULL);
662
663 // Show import subtitle widgets
664 widget = ghb_builder_widget("subtitle_import_grid");
665 gtk_widget_set_visible(widget, source == IMPORTSRT ||
666 source == IMPORTSSA);
667 widget = ghb_builder_widget("srt_code_label");
668 gtk_widget_set_visible(widget, source == IMPORTSRT);
669 widget = ghb_builder_widget("SrtCodeset");
670 gtk_widget_set_visible(widget, source == IMPORTSRT);
671
672 widget = ghb_builder_widget("subtitle_import_switch_box");
673 gtk_widget_set_visible(widget, TRUE);
674 }
675 else
676 {
677 // Hide widgets not needed for "Foreign audio search"
678 widget = ghb_builder_widget("subtitle_track_label");

Callers 5

ghb_subtitle_pruneFunction · 0.85
subtitle_edit_responseFunction · 0.85

Calls 13

ghb_dict_get_stringFunction · 0.85
get_sub_sourceFunction · 0.85
ghb_dict_get_valueFunction · 0.85
ghb_ui_updateFunction · 0.85
ghb_string_valueFunction · 0.85
ghb_builder_widgetFunction · 0.85
ghb_boolean_valueFunction · 0.85
hb_subtitle_can_burnFunction · 0.85
hb_subtitle_can_passFunction · 0.85
hb_subtitle_can_forceFunction · 0.85
ghb_dict_get_boolFunction · 0.85

Tested by

no test coverage detected