Code

OCAL. Fix for Bug #638844 (Errors printed to console if openclipart search fails).
[inkscape.git] / src / ui / dialog / filedialogimpl-gtkmm.h
index bd0477b302507f9aedadb37945900bda076b0762..af607c1244899f706d5ee832a21a5ca8f2e58504 100644 (file)
@@ -18,6 +18,7 @@
 #define __FILE_DIALOGIMPL_H__
 
 #include "filedialog.h"
+#include "extension/system.h"
 
 //General includes
 #include <unistd.h>
@@ -99,7 +100,7 @@ public:
 
     ~SVGPreview();
 
-    bool setDocument(Document *doc);
+    bool setDocument(SPDocument *doc);
 
     bool setFileName(Glib::ustring &fileName);
 
@@ -128,7 +129,7 @@ private:
     /**
      * The svg document we are currently showing
      */
-    Document *document;
+    SPDocument *document;
 
     /**
      * The sp_svg_view widget
@@ -281,11 +282,12 @@ class FileSaveDialogImplGtk : public FileSaveDialog, public FileDialogBaseGtk
 
 public:
     FileSaveDialogImplGtk(Gtk::Window &parentWindow,
-                          const Glib::ustring &dir,
-                       FileDialogType fileTypes,
-                       const Glib::ustring &title,
-                       const Glib::ustring &default_key,
-                       const gchar* docTitle);
+                          const Glib::ustring &dir,
+                          FileDialogType fileTypes,
+                          const Glib::ustring &title,
+                          const Glib::ustring &default_key,
+                          const gchar* docTitle,
+                          const Inkscape::Extension::FileSaveMethod save_method);
 
     virtual ~FileSaveDialogImplGtk();
 
@@ -301,6 +303,12 @@ private:
     void change_path(const Glib::ustring& path);
     void updateNameAndExtension();
 
+    /**
+     * The file save method (essentially whether the dialog was invoked by "Save as ..." or "Save a
+     * copy ..."), which is used to determine file extensions and save paths.
+     */
+    Inkscape::Extension::FileSaveMethod save_method;
+
     /**
      * Fix to allow the user to type the file name
      */
@@ -349,6 +357,8 @@ private:
 
 
 
+#ifdef NEW_EXPORT_DIALOG
+
 //########################################################################
 //# F I L E     E X P O R T
 //########################################################################
@@ -565,6 +575,7 @@ private:
     Glib::ustring myFilename;
 };
 
+#endif // NEW_EXPORT_DIALOG
 
 } // namespace Dialog
 } // namespace UI
@@ -581,4 +592,4 @@ private:
   fill-column:99
   End:
 */
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :