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

Function chapters_export_action_cb

gtk/src/chapters.c:443–470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

441}
442
443G_MODULE_EXPORT void
444chapters_export_action_cb (GSimpleAction *action, GVariant *param,
445 signal_user_data_t *ud)
446{
447 GtkWindow *hb_window;
448 GtkFileChooser *dialog;
449 const gchar *exportDir;
450 GtkFileFilter *filter;
451
452 hb_window = GTK_WINDOW(ghb_builder_widget("hb_window"));
453 dialog = ghb_file_chooser_new("Export Chapters", hb_window,
454 GTK_FILE_CHOOSER_ACTION_SAVE,
455 _("_Save"),
456 _("_Cancel"));
457
458 ghb_add_file_filter(dialog, _("All Files"), "FilterAll");
459 filter = ghb_add_file_filter(dialog, _("Chapters (*.xml)"), "FilterXML");
460 gtk_file_chooser_set_filter(dialog, filter);
461 gtk_file_chooser_set_current_name(dialog, "chapters.xml");
462
463 exportDir = ghb_dict_get_string(ud->prefs, "ExportDirectory");
464 if (exportDir && exportDir[0] != '\0')
465 ghb_file_chooser_set_initial_file(dialog, exportDir);
466
467 ghb_file_chooser_set_modal(dialog, TRUE);
468 g_signal_connect(dialog, "response", G_CALLBACK(chapter_list_export), ud);
469 ghb_file_chooser_show(dialog);
470}
471
472G_MODULE_EXPORT void
473chapters_import_action_cb (GSimpleAction *action, GVariant *param,

Callers

nothing calls this directly

Calls 7

ghb_builder_widgetFunction · 0.85
ghb_file_chooser_newFunction · 0.85
ghb_add_file_filterFunction · 0.85
ghb_dict_get_stringFunction · 0.85
ghb_file_chooser_showFunction · 0.85

Tested by

no test coverage detected