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

Function queue_play_file_action_cb

gtk/src/queuehandler.c:2259–2284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2257}
2258
2259G_MODULE_EXPORT void
2260queue_play_file_action_cb (GSimpleAction *action, GVariant *param,
2261 signal_user_data_t *ud)
2262{
2263 GtkListBox * lb;
2264 GtkListBoxRow * row;
2265 gint index;
2266 GhbValue * queueDict, * uiDict;
2267 const char * path;
2268
2269 lb = GTK_LIST_BOX(ghb_builder_widget("queue_list"));
2270 row = gtk_list_box_get_selected_row(lb);
2271 if (row != NULL)
2272 {
2273 index = gtk_list_box_row_get_index(row);
2274 if (index < 0 || index >= ghb_array_len(ud->queue))
2275 {
2276 return;
2277 }
2278 queueDict = ghb_array_get(ud->queue, index);
2279 uiDict = ghb_dict_get(queueDict, "uiSettings");
2280 path = ghb_dict_get_string(uiDict, "destination");
2281 g_autoptr(GFile) file = g_file_new_for_path(path);
2282 ghb_file_open(file);
2283 }
2284}
2285
2286G_MODULE_EXPORT void
2287queue_list_selection_changed_cb (GtkListBox *box, GtkListBoxRow *row,

Callers

nothing calls this directly

Calls 3

ghb_builder_widgetFunction · 0.85
ghb_dict_get_stringFunction · 0.85
ghb_file_openFunction · 0.85

Tested by

no test coverage detected