From f85e4fd41b0e56e971c00d20237324d1a638043d Mon Sep 17 00:00:00 2001 From: cilix42 Date: Sun, 9 Aug 2009 16:43:57 +0000 Subject: [PATCH] Fix compile when NEW_EXPORT_DIALOG is defined (however, the dialog crashes when trying to export files, dunno why) --- src/file.cpp | 7 ++++--- src/file.h | 2 +- src/verbs.cpp | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/file.cpp b/src/file.cpp index 420eaec63..fd1438eb6 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -1130,7 +1130,7 @@ sp_file_import(Gtk::Window &parentWindow) * Display an Export dialog, export as the selected type if OK pressed */ bool -sp_file_export_dialog(void *widget) +sp_file_export_dialog(Gtk::Window &parentWindow) { //# temp hack for 'doc' until we can switch to this dialog SPDocument *doc = SP_ACTIVE_DOCUMENT; @@ -1192,6 +1192,7 @@ sp_file_export_dialog(void *widget) //# Show the Export dialog Inkscape::UI::Dialog::FileExportDialog *exportDialogInstance = Inkscape::UI::Dialog::FileExportDialog::create( + parentWindow, export_path, Inkscape::UI::Dialog::EXPORT_TYPES, (char const *) _("Select file to export to"), @@ -1220,7 +1221,7 @@ sp_file_export_dialog(void *widget) else g_warning( "Error converting save filename to UTF-8." ); - success = file_save(doc, fileName, selectionType, TRUE, FALSE); + success = file_save(parentWindow, doc, fileName, selectionType, TRUE, FALSE, Inkscape::Extension::FILE_SAVE_METHOD_EXPORT); if (success) { Glib::RefPtr recent = Gtk::RecentManager::get_default(); @@ -1243,7 +1244,7 @@ sp_file_export_dialog(void *widget) * */ bool -sp_file_export_dialog(void */*widget*/) +sp_file_export_dialog(Gtk::Window &/*parentWindow*/) { sp_export_dialog(); return true; diff --git a/src/file.h b/src/file.h index 9913fbe1a..770e519ab 100644 --- a/src/file.h +++ b/src/file.h @@ -141,7 +141,7 @@ void file_import(SPDocument *in_doc, const Glib::ustring &uri, * additional type selection, to allow the user to export * the a document as a given type. */ -bool sp_file_export_dialog (void *widget); +bool sp_file_export_dialog (Gtk::Window &parentWindow); /*###################### diff --git a/src/verbs.cpp b/src/verbs.cpp index 43ddc1459..b634e2a44 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -799,7 +799,7 @@ FileVerb::perform(SPAction *action, void *data, void */*pdata*/) sp_file_import(*parent); break; case SP_VERB_FILE_EXPORT: - sp_file_export_dialog(NULL); + sp_file_export_dialog(*parent); break; case SP_VERB_FILE_IMPORT_FROM_OCAL: sp_file_import_from_ocal(*parent); -- 2.30.2