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

Function subtitle_add_fas_cb

gtk/src/subtitlehandler.c:1261–1300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1259}
1260
1261G_MODULE_EXPORT void
1262subtitle_add_fas_cb (GSimpleAction *action, GVariant *param, gpointer data)
1263{
1264 GhbValue *subtitle_search, *backup;
1265 signal_user_data_t *ud = ghb_ud();
1266
1267 subtitle_search = ghb_get_job_subtitle_search(ud->settings);
1268 if (ghb_dict_get_bool(subtitle_search, "Enable"))
1269 {
1270 // Foreign audio search is already enabled
1271 return;
1272 }
1273
1274 backup = ghb_value_dup(ghb_get_job_subtitle_settings(ud->settings));
1275
1276 ghb_dict_set_bool(subtitle_search, "Enable", 1);
1277 ghb_dict_set_bool(subtitle_search, "Forced", 1);
1278 ghb_dict_set_bool(subtitle_search, "Default", 1);
1279 ghb_dict_set_bool(subtitle_search, "Burn", 0);
1280
1281 GtkTreeView *tv;
1282 GtkTreeIter ti;
1283 GtkTreeModel *tm;
1284 GtkTreeSelection *ts;
1285
1286 tv = GTK_TREE_VIEW(ghb_builder_widget("subtitle_list_view"));
1287 ts = gtk_tree_view_get_selection(tv);
1288 tm = gtk_tree_view_get_model(tv);
1289
1290 gtk_tree_store_prepend(GTK_TREE_STORE(tm), &ti, NULL);
1291 subtitle_refresh_list_row_ui(tm, &ti, ud->settings, subtitle_search);
1292
1293 gtk_tree_selection_select_iter(ts, &ti);
1294 ghb_live_reset(ud);
1295
1296 GtkWidget *dialog = ghb_builder_widget("subtitle_dialog");
1297 gtk_window_set_title(GTK_WINDOW(dialog), _("Foreign Audio Scan"));
1298 g_signal_connect(dialog, "response", G_CALLBACK(subtitle_add_fas_response), backup);
1299 gtk_widget_set_visible(dialog, TRUE);
1300}
1301
1302static void
1303subtitle_add_fas_response (GtkWidget *dialog, int response, GhbValue *backup)

Callers

nothing calls this directly

Calls 8

ghb_udFunction · 0.85
ghb_dict_get_boolFunction · 0.85
ghb_dict_set_boolFunction · 0.85
ghb_builder_widgetFunction · 0.85
ghb_live_resetFunction · 0.85

Tested by

no test coverage detected