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

Function title_destination_is_unique

gtk/src/title-add.c:260–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260static gboolean
261title_destination_is_unique (GhbValue *settings_array, gint index)
262{
263 gint count, ii;
264 GhbValue *settings, *gdest;
265 const char *dest;
266
267 settings = ghb_array_get(settings_array, index);
268 gdest = ghb_dict_get_value(settings, "destination");
269 dest = ghb_value_get_string(gdest);
270 if (dest == NULL)
271 return FALSE;
272
273 count = ghb_array_len(settings_array);
274 count = count < index ? count : index;
275 for (ii = 0; ii < count; ii++)
276 {
277 const char *tmp;
278
279 settings = ghb_array_get(settings_array, ii);
280 gdest = ghb_dict_get_value(settings, "destination");
281 tmp = ghb_value_get_string(gdest);
282 if (tmp != NULL && !strncmp(dest, tmp, PATH_MAX))
283 return FALSE;
284 }
285 return TRUE;
286}
287
288static PangoAttrList *default_title_attrs;
289

Callers 7

title_add_are_conflictsFunction · 0.85
title_add_select_all_cbFunction · 0.85
title_selected_cbFunction · 0.85
title_dest_file_cbFunction · 0.85
title_dest_dir_cbFunction · 0.85
title_add_all_action_cbFunction · 0.85

Calls 1

ghb_dict_get_valueFunction · 0.85

Tested by

no test coverage detected