| 441 | } |
| 442 | |
| 443 | G_MODULE_EXPORT void |
| 444 | chapters_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 | |
| 472 | G_MODULE_EXPORT void |
| 473 | chapters_import_action_cb (GSimpleAction *action, GVariant *param, |
nothing calls this directly
no test coverage detected