diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/file.cpp | 130 | ||||
| -rw-r--r-- | src/ui/dialog/filedialog.cpp | 21 | ||||
| -rw-r--r-- | src/ui/dialog/filedialog.h | 143 | ||||
| -rw-r--r-- | src/ui/dialog/filedialogimpl-gtkmm.cpp | 343 | ||||
| -rw-r--r-- | src/ui/dialog/filedialogimpl-gtkmm.h | 231 |
5 files changed, 2 insertions, 866 deletions
diff --git a/src/file.cpp b/src/file.cpp index f492017f8..a0c53a6ee 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -1268,136 +1268,6 @@ sp_file_import(Gtk::Window &parentWindow) } - -/*###################### -## E X P O R T -######################*/ - - -#ifdef NEW_EXPORT_DIALOG - -/** - * Display an Export dialog, export as the selected type if OK pressed - */ -bool -sp_file_export_dialog(Gtk::Window &parentWindow) -{ - //# temp hack for 'doc' until we can switch to this dialog - SPDocument *doc = SP_ACTIVE_DOCUMENT; - - Glib::ustring export_path; - Glib::ustring export_loc; - - Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - Inkscape::Extension::Output *extension; - - //# Get the default extension name - Glib::ustring default_extension = prefs->getString("/dialogs/save_export/default"); - if(default_extension.empty()) { - // FIXME: Is this a good default? Should there be a macro for the string? - default_extension = "org.inkscape.output.png.cairo"; - } - //g_message("%s: extension name: '%s'", __FUNCTION__, default_extension); - - if (doc->uri == NULL) - { - Glib::ustring filename_extension = ".svg"; - extension = dynamic_cast<Inkscape::Extension::Output *> - (Inkscape::Extension::db.get(default_extension.c_str())); - //g_warning("%s: extension ptr: 0x%x", __FUNCTION__, (unsigned int)extension); - if (extension) - filename_extension = extension->get_extension(); - - Glib::ustring attr3 = prefs->getString("/dialogs/save_export/path"); - if (!attr3.empty()) - export_path = attr3; - - if (!Inkscape::IO::file_test(export_path.c_str(), - (GFileTest)(G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))) - export_path = Glib::ustring(""); - - if (export_path.empty()) - export_path = g_get_home_dir(); - - export_loc = export_path + G_DIR_SEPARATOR_S + _("drawing") + filename_extension; - - } - else - { - export_path = Glib::path_get_dirname(doc->uri); - } - - // convert save_loc from utf-8 to locale - // is this needed any more, now that everything is handled in - // Inkscape::IO? - Glib::ustring export_path_local = Glib::filename_from_utf8(export_path); - if (!export_path_local.empty()) - export_path = export_path_local; - - //# 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"), - default_extension - ); - - bool success = exportDialogInstance->show(); - if (!success) { - delete exportDialogInstance; - return success; - } - - Glib::ustring fileName = exportDialogInstance->getFilename(); - - Inkscape::Extension::Extension *selectionType = - exportDialogInstance->getSelectionType(); - - delete exportDialogInstance; - exportDialogInstance = NULL; - - if (fileName.size() > 0) { - Glib::ustring newFileName = Glib::filename_to_utf8(fileName); - - if ( newFileName.size()>0 ) - fileName = newFileName; - else - g_warning( "Error converting save filename to UTF-8." ); - - success = file_save(parentWindow, doc, fileName, selectionType, TRUE, FALSE, Inkscape::Extension::FILE_SAVE_METHOD_EXPORT); - - if (success) { - Glib::RefPtr<Gtk::RecentManager> recent = Gtk::RecentManager::get_default(); - recent->add_item( doc->getDocumentURI() ); - } - - export_path = fileName; - prefs->setString("/dialogs/save_export/path", export_path); - - return success; - } - - - return false; -} - -#else - -/** - * TODO Delete - * This is now a dialog called from dialog manager - * -bool -sp_file_export_dialog(Gtk::Window &parentWindow) -{ - // sp_export_dialog(); - return true; -} -*/ -#endif - /*###################### ## E X P O R T T O O C A L ######################*/ diff --git a/src/ui/dialog/filedialog.cpp b/src/ui/dialog/filedialog.cpp index f98e129eb..fdce498d9 100644 --- a/src/ui/dialog/filedialog.cpp +++ b/src/ui/dialog/filedialog.cpp @@ -182,27 +182,6 @@ void FileSaveDialog::appendExtension(Glib::ustring& path, Inkscape::Extension::O } } -//######################################################################## -//# F I L E E X P O R T -//######################################################################## - -#ifdef NEW_EXPORT_DIALOG - -/** - * Public factory method. Used in file.cpp - */ -FileExportDialog *FileExportDialog::create(Gtk::Window& parentWindow, - const Glib::ustring &path, - FileDialogType fileTypes, - const char *title, - const Glib::ustring &default_key) -{ - FileExportDialog *dialog = new FileExportDialogImpl(parentWindow, path, fileTypes, title, default_key); - return dialog; -} - -#endif // NEW_EXPORT_DIALOG - } //namespace Dialog } //namespace UI diff --git a/src/ui/dialog/filedialog.h b/src/ui/dialog/filedialog.h index db50fbdc9..898917147 100644 --- a/src/ui/dialog/filedialog.h +++ b/src/ui/dialog/filedialog.h @@ -236,149 +236,6 @@ protected: }; //FileSaveDialog -//#define NEW_EXPORT_DIALOG - -#ifdef NEW_EXPORT_DIALOG - -/** - * This class provides an implementation-independent API for - * file "Export" dialogs. Saving as these types will not affect - * the original file. - */ -class FileExportDialog -{ -public: - - enum ScopeType - { - SCOPE_DOCUMENT, - SCOPE_PAGE, - SCOPE_SELECTION, - SCOPE_CUSTOM - }; - - /** - * Constructor. Do not call directly . Use the factory. - * @param path the directory where to start searching - * @param fileTypes one of FileDialogTypes - * @param title the title of the dialog - * @param key a list of file types from which the user can select - */ - FileExportDialog() - {} - - /** - * Factory. - * @param path the directory where to start searching - * @param fileTypes one of FileDialogTypes - * @param title the title of the dialog - * @param key a list of file types from which the user can select - */ - static FileExportDialog *create(Gtk::Window& parentWindow, - const Glib::ustring &path, - FileDialogType fileTypes, - const char *title, - const Glib::ustring &default_key); - - - /** - * Destructor. - * Perform any necessary cleanups. - */ - virtual ~FileExportDialog () {}; - - - /** - * Show an SaveAs file selector. - * @return the selected path if user selected one, else NULL - */ - virtual bool show() =0; - - /** - * Return the 'key' (filetype) of the selection, if any - * @return a pointer to a string if successful (which must - * be later freed with g_free(), else NULL. - */ - virtual Inkscape::Extension::Extension * getSelectionType() = 0; - - /** - * Return the selected filename, if any. If not, return "" - */ - virtual Glib::ustring getFilename () =0; - - /** - * Return the scope of the export. One of the enumerated types - * in ScopeType - */ - virtual ScopeType getScope() = 0; - - /** - * Return left side of the exported region - */ - virtual double getSourceX() = 0; - - /** - * Return the top of the exported region - */ - virtual double getSourceY() = 0; - - /** - * Return the width of the exported region - */ - virtual double getSourceWidth() = 0; - - /** - * Return the height of the exported region - */ - virtual double getSourceHeight() = 0; - - /** - * Return the units of the coordinates of exported region - */ - virtual Glib::ustring getSourceUnits() = 0; - - /** - * Return the width of the destination document - */ - virtual double getDestinationWidth() = 0; - - /** - * Return the height of the destination document - */ - virtual double getDestinationHeight() = 0; - - /** - * Return the height of the exported region - */ - virtual Glib::ustring getDestinationUnits() = 0; - - /** - * Return the destination DPI image resolution, if bitmap - */ - virtual double getDestinationDPI() = 0; - - /** - * Return whether we should use Cairo for rendering - */ - virtual bool getUseCairo() = 0; - - /** - * Return whether we should use antialiasing - */ - virtual bool getUseAntialias() = 0; - - /** - * Return the background color for exporting - */ - virtual unsigned long getBackground() = 0; - - - -}; //FileExportDialog - -#endif // NEW_EXPORT_DIALOG - - } //namespace Dialog } //namespace UI } //namespace Inkscape diff --git a/src/ui/dialog/filedialogimpl-gtkmm.cpp b/src/ui/dialog/filedialogimpl-gtkmm.cpp index 688b286b4..de6b18489 100644 --- a/src/ui/dialog/filedialogimpl-gtkmm.cpp +++ b/src/ui/dialog/filedialogimpl-gtkmm.cpp @@ -851,349 +851,6 @@ void FileSaveDialogImplGtk::updateNameAndExtension() } -#ifdef NEW_EXPORT_DIALOG - -//######################################################################## -//# F I L E E X P O R T -//######################################################################## - -/** - * Callback for fileNameEntry widget - */ -void FileExportDialogImpl::fileNameEntryChangedCallback() -{ - if (!fileNameEntry) - return; - - Glib::ustring fileName = fileNameEntry->get_text(); - if (!Glib::get_charset()) // If we are not utf8 - fileName = Glib::filename_to_utf8(fileName); - - // g_message("User hit return. Text is '%s'\n", fileName.c_str()); - - if (!Glib::path_is_absolute(fileName)) { - // try appending to the current path - // not this way: fileName = get_current_folder() + "/" + fileName; - std::vector<Glib::ustring> pathSegments; - pathSegments.push_back(get_current_folder()); - pathSegments.push_back(fileName); - fileName = Glib::build_filename(pathSegments); - } - - // g_message("path:'%s'\n", fileName.c_str()); - - if (Glib::file_test(fileName, Glib::FILE_TEST_IS_DIR)) { - set_current_folder(fileName); - } else if (/*Glib::file_test(fileName, Glib::FILE_TEST_IS_REGULAR)*/ 1) { - // dialog with either (1) select a regular file or (2) cd to dir - // simulate an 'OK' - set_filename(fileName); - response(Gtk::RESPONSE_OK); - } -} - - - -/** - * Callback for fileNameEntry widget - */ -void FileExportDialogImpl::fileTypeChangedCallback() -{ - int sel = fileTypeComboBox.get_active_row_number(); - if ((sel < 0) || (sel >= (int)fileTypes.size())) - return; - - FileType type = fileTypes[sel]; - // g_message("selected: %s\n", type.name.c_str()); - Gtk::FileFilter filter; - filter.add_pattern(type.pattern); - set_filter(filter); -} - - - -void FileExportDialogImpl::createFileTypeMenu() -{ - Inkscape::Extension::DB::OutputList extension_list; - Inkscape::Extension::db.get_output_list(extension_list); - - for (Inkscape::Extension::DB::OutputList::iterator current_item = extension_list.begin(); - current_item != extension_list.end(); ++current_item) { - Inkscape::Extension::Output *omod = *current_item; - - // FIXME: would be nice to grey them out instead of not listing them - if (omod->deactivated()) - continue; - - FileType type; - type.name = (_(omod->get_filetypename())); - type.pattern = "*"; - Glib::ustring extension = omod->get_extension(); - fileDialogExtensionToPattern(type.pattern, extension); - type.extension = omod; - fileTypeComboBox.append_text(type.name); - fileTypes.push_back(type); - } - - //#Let user choose - FileType guessType; - guessType.name = _("Guess from extension"); - guessType.pattern = "*"; - guessType.extension = NULL; - fileTypeComboBox.append_text(guessType.name); - fileTypes.push_back(guessType); - - - fileTypeComboBox.set_active(0); - fileTypeChangedCallback(); // call at least once to set the filter -} - - -/** - * Constructor - */ -FileExportDialogImpl::FileExportDialogImpl(Gtk::Window &parentWindow, const Glib::ustring &dir, - FileDialogType fileTypes, const Glib::ustring &title, - const Glib::ustring & /*default_key*/) - : FileDialogBaseGtk(parentWindow, title, Gtk::FILE_CHOOSER_ACTION_SAVE, fileTypes, "/dialogs/export") - , sourceX0Spinner("X0", _("Left edge of source")) - , sourceY0Spinner("Y0", _("Top edge of source")) - , sourceX1Spinner("X1", _("Right edge of source")) - , sourceY1Spinner("Y1", _("Bottom edge of source")) - , sourceWidthSpinner("Width", _("Source width")) - , sourceHeightSpinner("Height", _("Source height")) - , destWidthSpinner("Width", _("Destination width")) - , destHeightSpinner("Height", _("Destination height")) - , destDPISpinner("DPI", _("Resolution (dots per inch)")) -{ - Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - append_extension = prefs->getBool("/dialogs/save_export/append_extension", true); - - /* One file at a time */ - set_select_multiple(false); - - set_local_only(false); - - /* Initialize to Autodetect */ - extension = NULL; - /* No filename to start out with */ - myFilename = ""; - - /* Set our dialog type (save, export, etc...)*/ - _dialogType = fileTypes; - - /* Set the pwd and/or the filename */ - if (dir.size() > 0) { - Glib::ustring udir(dir); - Glib::ustring::size_type len = udir.length(); - // leaving a trailing backslash on the directory name leads to the infamous - // double-directory bug on win32 - if ((len != 0) && (udir[len - 1] == '\\')) - udir.erase(len - 1); - set_current_folder(udir.c_str()); - } - - //######################################### - //## EXTRA WIDGET -- SOURCE SIDE - //######################################### - - //##### Export options buttons/spinners, etc - documentButton.set_label(_("Document")); - scopeBox.pack_start(documentButton); - scopeGroup = documentButton.get_group(); - - pageButton.set_label(_("Page")); - pageButton.set_group(scopeGroup); - scopeBox.pack_start(pageButton); - - selectionButton.set_label(_("Selection")); - selectionButton.set_group(scopeGroup); - scopeBox.pack_start(selectionButton); - - customButton.set_label(C_("Export dialog", "Custom")); - customButton.set_group(scopeGroup); - scopeBox.pack_start(customButton); - - sourceBox.pack_start(scopeBox); - - - - // dimension buttons - sourceTable.resize(3, 3); - sourceTable.attach(sourceX0Spinner, 0, 1, 0, 1); - sourceTable.attach(sourceY0Spinner, 1, 2, 0, 1); - sourceUnitsSpinner.setUnitType(UNIT_TYPE_LINEAR); - sourceTable.attach(sourceUnitsSpinner, 2, 3, 0, 1); - sourceTable.attach(sourceX1Spinner, 0, 1, 1, 2); - sourceTable.attach(sourceY1Spinner, 1, 2, 1, 2); - sourceTable.attach(sourceWidthSpinner, 0, 1, 2, 3); - sourceTable.attach(sourceHeightSpinner, 1, 2, 2, 3); - - sourceBox.pack_start(sourceTable); - sourceFrame.set_label(_("Source")); - sourceFrame.add(sourceBox); - exportOptionsBox.pack_start(sourceFrame); - - - //######################################### - //## EXTRA WIDGET -- SOURCE SIDE - //######################################### - - - destTable.resize(3, 3); - destTable.attach(destWidthSpinner, 0, 1, 0, 1); - destTable.attach(destHeightSpinner, 1, 2, 0, 1); - destUnitsSpinner.setUnitType(UNIT_TYPE_LINEAR); - destTable.attach(destUnitsSpinner, 2, 3, 0, 1); - destTable.attach(destDPISpinner, 0, 1, 1, 2); - - destBox.pack_start(destTable); - - - cairoButton.set_label(_("Cairo")); - otherOptionBox.pack_start(cairoButton); - - antiAliasButton.set_label(_("Antialias")); - otherOptionBox.pack_start(antiAliasButton); - - backgroundButton.set_label(_("Background")); - otherOptionBox.pack_start(backgroundButton); - - destBox.pack_start(otherOptionBox); - - - - //###### File options - //###### Do we want the .xxx extension automatically added? - fileTypeCheckbox.set_label(Glib::ustring(_("Append filename extension automatically"))); - fileTypeCheckbox.set_active(append_extension); - destBox.pack_start(fileTypeCheckbox); - - //###### File type menu - createFileTypeMenu(); - fileTypeComboBox.set_size_request(200, 40); - fileTypeComboBox.signal_changed().connect(sigc::mem_fun(*this, &FileExportDialogImpl::fileTypeChangedCallback)); - - destBox.pack_start(fileTypeComboBox); - - destFrame.set_label(_("Destination")); - destFrame.add(destBox); - exportOptionsBox.pack_start(destFrame); - - //##### Put the two boxes and their parent onto the dialog - exportOptionsBox.pack_start(sourceFrame); - exportOptionsBox.pack_start(destFrame); - - set_extra_widget(exportOptionsBox); - - - - // Let's do some customization - fileNameEntry = NULL; - Gtk::Container *cont = get_toplevel(); - std::vector<Gtk::Entry *> entries; - findEntryWidgets(cont, entries); - // g_message("Found %d entry widgets\n", entries.size()); - if (!entries.empty()) { - // Catch when user hits [return] on the text field - fileNameEntry = entries[0]; - fileNameEntry->signal_activate().connect( - sigc::mem_fun(*this, &FileExportDialogImpl::fileNameEntryChangedCallback)); - } - - // Let's do more customization - std::vector<Gtk::Expander *> expanders; - findExpanderWidgets(cont, expanders); - // g_message("Found %d expander widgets\n", expanders.size()); - if (!expanders.empty()) { - // Always show the file list - Gtk::Expander *expander = expanders[0]; - expander->set_expanded(true); - } - - - // if (extension == NULL) - // checkbox.set_sensitive(FALSE); - - add_button(_("_Cancel"), Gtk::RESPONSE_CANCEL); - set_default(*add_button(_("_Save"), Gtk::RESPONSE_OK)); - - show_all_children(); -} - -/** - * Destructor - */ -FileExportDialogImpl::~FileExportDialogImpl() -{ -} - - - -/** - * Show this dialog modally. Return true if user hits [OK] - */ -bool FileExportDialogImpl::show() -{ - Glib::ustring s = Glib::filename_to_utf8(get_current_folder()); - if (s.length() == 0) { - s = getcwd(NULL, 0); - } - set_current_folder(Glib::filename_from_utf8(s)); // hack to force initial dir listing - set_modal(TRUE); // Window - sp_transientize(GTK_WIDGET(gobj())); // Make transient - gint b = run(); // Dialog - svgPreview.showNoPreview(); - hide(); - - if (b == Gtk::RESPONSE_OK) { - int sel = fileTypeComboBox.get_active_row_number(); - if (sel >= 0 && sel < (int)fileTypes.size()) { - FileType &type = fileTypes[sel]; - extension = type.extension; - } - myFilename = get_filename(); - - if (myFilename.empty()) { - myFilename = get_uri(); - } - - /* - - // FIXME: Why do we have more code - - append_extension = checkbox.get_active(); - Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - prefs->setBool("/dialogs/save_export/append_extension", append_extension); - prefs->setBool("/dialogs/save_export/default", ( extension != NULL ? extension->get_id() : "" )); - */ - return true; - } else { - return false; - } -} - - -/** - * Get the file extension type that was selected by the user. Valid after an [OK] - */ -Inkscape::Extension::Extension *FileExportDialogImpl::getSelectionType() -{ - return extension; -} - - -/** - * Get the file name chosen by the user. Valid after an [OK] - */ -Glib::ustring FileExportDialogImpl::getFilename() -{ - return myFilename; -} - -#endif // NEW_EXPORT_DIALOG - - } // namespace Dialog } // namespace UI } // namespace Inkscape diff --git a/src/ui/dialog/filedialogimpl-gtkmm.h b/src/ui/dialog/filedialogimpl-gtkmm.h index 7a1061bb8..430f6b6eb 100644 --- a/src/ui/dialog/filedialogimpl-gtkmm.h +++ b/src/ui/dialog/filedialogimpl-gtkmm.h @@ -21,18 +21,13 @@ //Gtk includes #include <gtkmm/filechooserdialog.h> #include <glib/gstdio.h> -#include <gtkmm/comboboxtext.h> -#include <gtkmm/checkbutton.h> - -//General includes -#include <unistd.h> -#include <sys/stat.h> -#include <cerrno> #include "filedialog.h" #include "svg-preview.h" namespace Gtk { +class CheckButton; +class ComboBoxText; class Expander; } @@ -300,228 +295,6 @@ private: }; - - -#ifdef NEW_EXPORT_DIALOG - -//######################################################################## -//# F I L E E X P O R T -//######################################################################## - -/** - * Our implementation of the FileExportDialog interface. - */ -class FileExportDialogImpl : public FileExportDialog, public FileDialogBaseGtk -{ - -public: - FileExportDialogImpl(Gtk::Window& parentWindow, - const Glib::ustring &dir, - FileDialogType fileTypes, - const Glib::ustring &title, - const Glib::ustring &default_key); - - virtual ~FileExportDialogImpl(); - - bool show(); - - Inkscape::Extension::Extension *getSelectionType(); - - Glib::ustring getFilename(); - - - /** - * Return the scope of the export. One of the enumerated types - * in ScopeType - */ - ScopeType getScope() - { - if (pageButton.get_active()) - return SCOPE_PAGE; - else if (selectionButton.get_active()) - return SCOPE_SELECTION; - else if (customButton.get_active()) - return SCOPE_CUSTOM; - else - return SCOPE_DOCUMENT; - - } - - /** - * Return left side of the exported region - */ - double getSourceX() - { return sourceX0Spinner.getValue(); } - - /** - * Return the top of the exported region - */ - double getSourceY() - { return sourceY1Spinner.getValue(); } - - /** - * Return the width of the exported region - */ - double getSourceWidth() - { return sourceWidthSpinner.getValue(); } - - /** - * Return the height of the exported region - */ - double getSourceHeight() - { return sourceHeightSpinner.getValue(); } - - /** - * Return the units of the coordinates of exported region - */ - Glib::ustring getSourceUnits() - { return sourceUnitsSpinner.getUnitAbbr(); } - - /** - * Return the width of the destination document - */ - double getDestinationWidth() - { return destWidthSpinner.getValue(); } - - /** - * Return the height of the destination document - */ - double getDestinationHeight() - { return destHeightSpinner.getValue(); } - - /** - * Return the height of the exported region - */ - Glib::ustring getDestinationUnits() - { return destUnitsSpinner.getUnitAbbr(); } - - /** - * Return the destination DPI image resolution, if bitmap - */ - double getDestinationDPI() - { return destDPISpinner.getValue(); } - - /** - * Return whether we should use Cairo for rendering - */ - bool getUseCairo() - { return cairoButton.get_active(); } - - /** - * Return whether we should use antialiasing - */ - bool getUseAntialias() - { return antiAliasButton.get_active(); } - - /** - * Return the background color for exporting - */ - unsigned long getBackground() - { return backgroundButton.get_color().get_pixel(); } - -private: - - /** - * Fix to allow the user to type the file name - */ - Gtk::Entry *fileNameEntry; - - //########################################## - //# EXTRA WIDGET -- SOURCE SIDE - //########################################## - - Gtk::Frame sourceFrame; - Gtk::VBox sourceBox; - - Gtk::HBox scopeBox; - Gtk::RadioButtonGroup scopeGroup; - Gtk::RadioButton documentButton; - Gtk::RadioButton pageButton; - Gtk::RadioButton selectionButton; - Gtk::RadioButton customButton; - - Gtk::Table sourceTable; - Inkscape::UI::Widget::Scalar sourceX0Spinner; - Inkscape::UI::Widget::Scalar sourceY0Spinner; - Inkscape::UI::Widget::Scalar sourceX1Spinner; - Inkscape::UI::Widget::Scalar sourceY1Spinner; - Inkscape::UI::Widget::Scalar sourceWidthSpinner; - Inkscape::UI::Widget::Scalar sourceHeightSpinner; - Inkscape::UI::Widget::UnitMenu sourceUnitsSpinner; - - - //########################################## - //# EXTRA WIDGET -- DESTINATION SIDE - //########################################## - - Gtk::Frame destFrame; - Gtk::VBox destBox; - - Gtk::Table destTable; - Inkscape::UI::Widget::Scalar destWidthSpinner; - Inkscape::UI::Widget::Scalar destHeightSpinner; - Inkscape::UI::Widget::Scalar destDPISpinner; - Inkscape::UI::Widget::UnitMenu destUnitsSpinner; - - Gtk::HBox otherOptionBox; - Gtk::CheckButton cairoButton; - Gtk::CheckButton antiAliasButton; - Gtk::ColorButton backgroundButton; - - - /** - * 'Extra' widget that holds two boxes above - */ - Gtk::HBox exportOptionsBox; - - - //# Child widgets - Gtk::CheckButton fileTypeCheckbox; - - /** - * Allow the specification of the output file type - */ - Gtk::ComboBoxText fileTypeComboBox; - - - /** - * Data mirror of the combo box - */ - std::vector<FileType> fileTypes; - - - - /** - * Callback for user input into fileNameEntry - */ - void fileTypeChangedCallback(); - - /** - * Create a filter menu for this type of dialog - */ - void createFileTypeMenu(); - - - bool append_extension; - - /** - * The extension to use to write this file - */ - Inkscape::Extension::Extension *extension; - - /** - * Callback for user input into fileNameEntry - */ - void fileNameEntryChangedCallback(); - - /** - * Filename that was given - */ - Glib::ustring myFilename; -}; - -#endif // NEW_EXPORT_DIALOG - } // namespace Dialog } // namespace UI } // namespace Inkscape |
