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

Function audio_list_selection_changed_cb

gtk/src/audiohandler.c:1342–1386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1340}
1341
1342G_MODULE_EXPORT void
1343audio_list_selection_changed_cb (GtkTreeSelection *ts, gpointer data)
1344{
1345 GtkTreeModel *tm;
1346 GtkTreeIter ti;
1347 GhbValue *asettings = NULL;
1348 gint row;
1349 signal_user_data_t *ud = ghb_ud();
1350
1351 ghb_log_func();
1352 if (gtk_tree_selection_get_selected(ts, &tm, &ti))
1353 {
1354 GtkTreeIter pti;
1355
1356 if (gtk_tree_model_iter_parent(tm, &pti, &ti))
1357 {
1358 GtkTreePath *path;
1359 GtkTreeView *tv;
1360
1361 gtk_tree_selection_select_iter(ts, &pti);
1362 path = gtk_tree_model_get_path(tm, &pti);
1363 tv = gtk_tree_selection_get_tree_view(ts);
1364 // Make the parent visible in scroll window if it is not.
1365 gtk_tree_view_scroll_to_cell(tv, path, NULL, FALSE, 0, 0);
1366 gtk_tree_path_free(path);
1367 return;
1368 }
1369
1370 GtkTreePath *tp;
1371 gint *indices;
1372 GhbValue *audio_list;
1373
1374 // Get the row number
1375 tp = gtk_tree_model_get_path (tm, &ti);
1376 indices = gtk_tree_path_get_indices (tp);
1377 row = indices[0];
1378 gtk_tree_path_free(tp);
1379
1380 if (row < 0) return;
1381 audio_list = ghb_get_job_audio_list(ud->settings);
1382 if (row >= 0 && row < ghb_array_len(audio_list))
1383 asettings = ghb_array_get(audio_list, row);
1384 }
1385 audio_update_dialog_widgets(ud, asettings);
1386}
1387
1388static void
1389audio_add_to_settings(GhbValue *settings, GhbValue *asettings)

Callers

nothing calls this directly

Calls 3

ghb_udFunction · 0.85
ghb_get_job_audio_listFunction · 0.85

Tested by

no test coverage detected