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

Function chapter_refresh_list_ui

gtk/src/chapters.c:114–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114static void
115chapter_refresh_list_ui(signal_user_data_t *ud)
116{
117 GhbValue * chapter_list;
118 GtkListBox * lb;
119 GtkWidget * row;
120 gint ii, count;
121 gint64 start = 0, duration;
122
123 lb = GTK_LIST_BOX(ghb_builder_widget("chapters_list"));
124
125 chapter_list = ghb_get_job_chapter_list(ud->settings);
126 count = ghb_array_len(chapter_list);
127 for (ii = 0; ii < count; ii++)
128 {
129 GhbValue * chapter_dict;
130 GhbValue * duration_dict;
131 const char * name;
132
133 chapter_dict = ghb_array_get(chapter_list, ii);
134 name = ghb_dict_get_string(chapter_dict, "Name");
135 duration_dict = ghb_dict_get(chapter_dict, "Duration");
136 duration = ghb_dict_get_int(duration_dict, "Ticks") / 90000;
137 row = create_chapter_row(ii + 1, start, duration, name, ud);
138 start += duration;
139
140 gtk_list_box_insert(lb, row, -1);
141 }
142}
143
144void
145ghb_chapter_list_refresh_all(signal_user_data_t *ud)

Callers 1

Calls 5

ghb_builder_widgetFunction · 0.85
ghb_get_job_chapter_listFunction · 0.85
ghb_dict_get_stringFunction · 0.85
ghb_dict_get_intFunction · 0.85
create_chapter_rowFunction · 0.85

Tested by

no test coverage detected