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

Function chapter_list_export

gtk/src/chapters.c:231–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229}
230
231static void
232chapter_list_export (GtkFileChooser *chooser,
233 GtkResponseType response, signal_user_data_t *ud)
234{
235 gchar *filename, *dir;
236 const gchar *exportDir;
237 GhbValue *chapter_list;
238
239 if (response == GTK_RESPONSE_ACCEPT)
240 {
241
242 chapter_list = ghb_get_job_chapter_list(ud->settings);
243
244 if (chapter_list == NULL)
245 {
246 ghb_file_chooser_destroy(chooser);
247 return;
248 }
249
250 filename = ghb_file_chooser_get_filename(chooser);
251
252 chapter_list_export_xml(filename, chapter_list);
253 exportDir = ghb_dict_get_string(ud->prefs, "ExportDirectory");
254 dir = g_path_get_dirname(filename);
255 if (strcmp(dir, exportDir) != 0)
256 {
257 ghb_dict_set_string(ud->prefs, "ExportDirectory", dir);
258 ghb_pref_save(ud->prefs, "ExportDirectory");
259 }
260 g_free(dir);
261 g_free(filename);
262 }
263 ghb_file_chooser_destroy(chooser);
264}
265
266static xmlNodePtr
267xml_get_node (xmlNodePtr node, const char *child_name)

Callers

nothing calls this directly

Calls 7

ghb_get_job_chapter_listFunction · 0.85
ghb_file_chooser_destroyFunction · 0.85
chapter_list_export_xmlFunction · 0.85
ghb_dict_get_stringFunction · 0.85
ghb_dict_set_stringFunction · 0.85
ghb_pref_saveFunction · 0.85

Tested by

no test coverage detected