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

Function ghb_subtitle_set_actions_enabled

gtk/src/subtitlehandler.c:510–536  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

508}
509
510void
511ghb_subtitle_set_actions_enabled (signal_user_data_t *ud, gboolean enabled)
512{
513 GSimpleAction *action;
514 int title_id;
515
516 action = G_SIMPLE_ACTION(GHB_ACTION("subtitle-add"));
517 g_simple_action_set_enabled(action, enabled);
518 action = G_SIMPLE_ACTION(GHB_ACTION("subtitle-add-all"));
519 g_simple_action_set_enabled(action, enabled);
520 action = G_SIMPLE_ACTION(GHB_ACTION("subtitle-add-fas"));
521 g_simple_action_set_enabled(action, enabled);
522 action = G_SIMPLE_ACTION(GHB_ACTION("subtitle-reset"));
523 g_simple_action_set_enabled(action, enabled);
524 action = G_SIMPLE_ACTION(GHB_ACTION("subtitle-remove"));
525 g_simple_action_set_enabled(action, enabled);
526 action = G_SIMPLE_ACTION(GHB_ACTION("subtitle-clear"));
527 g_simple_action_set_enabled(action, enabled);
528
529 title_id = ghb_dict_get_int(ud->settings, "title");
530 const hb_title_t *title = ghb_lookup_title(title_id, NULL);
531 if (title != NULL)
532 {
533 GtkWidget *w = ghb_builder_widget("SubtitleImportDisable");
534 gtk_widget_set_sensitive(w, !!hb_list_count(title->list_subtitle));
535 }
536}
537
538static void
539set_pref_subtitle(signal_user_data_t *ud)

Callers 1

title_changed_cbFunction · 0.85

Calls 4

ghb_dict_get_intFunction · 0.85
ghb_lookup_titleFunction · 0.85
ghb_builder_widgetFunction · 0.85
hb_list_countFunction · 0.85

Tested by

no test coverage detected