| 864 | } |
| 865 | |
| 866 | void |
| 867 | ghb_audio_list_refresh_selected(signal_user_data_t *ud) |
| 868 | { |
| 869 | GtkTreeView *tv; |
| 870 | GtkTreePath *tp; |
| 871 | GtkTreeSelection *ts; |
| 872 | GtkTreeModel *tm; |
| 873 | GtkTreeIter ti; |
| 874 | gint *indices; |
| 875 | gint row; |
| 876 | GhbValue *asettings = NULL; |
| 877 | const GhbValue *audio_list; |
| 878 | |
| 879 | ghb_log_func(); |
| 880 | tv = GTK_TREE_VIEW(ghb_builder_widget("audio_list_view")); |
| 881 | ts = gtk_tree_view_get_selection (tv); |
| 882 | if (gtk_tree_selection_get_selected(ts, &tm, &ti)) |
| 883 | { |
| 884 | // Get the row number |
| 885 | tp = gtk_tree_model_get_path (tm, &ti); |
| 886 | indices = gtk_tree_path_get_indices (tp); |
| 887 | row = indices[0]; |
| 888 | gtk_tree_path_free(tp); |
| 889 | if (row < 0) return; |
| 890 | |
| 891 | audio_list = ghb_get_job_audio_list(ud->settings); |
| 892 | if (row >= ghb_array_len(audio_list)) |
| 893 | return; |
| 894 | |
| 895 | asettings = ghb_array_get(audio_list, row); |
| 896 | audio_refresh_list_row_ui(tm, &ti, ud, asettings); |
| 897 | } |
| 898 | } |
| 899 | |
| 900 | static void |
| 901 | audio_refresh_list_ui(signal_user_data_t *ud) |
no test coverage detected