From c5b0b577134ed7c2df538ed019a6c07cb75bf38e Mon Sep 17 00:00:00 2001 From: Maximilian Albert Date: Fri, 7 Aug 2009 09:31:39 +0000 Subject: Store last used paths separately for the 'Save as ...' and 'Save a copy ...' dialogs and remember the last used file types in each case (closes LP #184655 and perhaps others; LP #386292 was fixed by the previous commit). (bzr r8432) --- src/ui/dialog/filedialog.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/ui/dialog/filedialog.cpp') diff --git a/src/ui/dialog/filedialog.cpp b/src/ui/dialog/filedialog.cpp index 172edf8a5..b1385195f 100644 --- a/src/ui/dialog/filedialog.cpp +++ b/src/ui/dialog/filedialog.cpp @@ -105,16 +105,17 @@ Glib::ustring FileOpenDialog::getFilename() * Public factory method. Used in file.cpp */ FileSaveDialog *FileSaveDialog::create(Gtk::Window& parentWindow, - const Glib::ustring &path, + const Glib::ustring &path, FileDialogType fileTypes, const char *title, const Glib::ustring &default_key, - const gchar *docTitle) + const gchar *docTitle, + const bool save_copy) { #ifdef WIN32 - FileSaveDialog *dialog = new FileSaveDialogImplWin32(parentWindow, path, fileTypes, title, default_key, docTitle); + FileSaveDialog *dialog = new FileSaveDialogImplWin32(parentWindow, path, fileTypes, title, default_key, docTitle, save_copy); #else - FileSaveDialog *dialog = new FileSaveDialogImplGtk(parentWindow, path, fileTypes, title, default_key, docTitle); + FileSaveDialog *dialog = new FileSaveDialogImplGtk(parentWindow, path, fileTypes, title, default_key, docTitle, save_copy); #endif return dialog; } @@ -168,8 +169,8 @@ void FileSaveDialog::appendExtension(Glib::ustring& path, Inkscape::Extension::O /** * Public factory method. Used in file.cpp */ - FileExportDialog *FileExportDialog::create(Gtk::Window& parentWindow, - const Glib::ustring &path, +FileExportDialog *FileExportDialog::create(Gtk::Window& parentWindow, + const Glib::ustring &path, FileDialogType fileTypes, const char *title, const Glib::ustring &default_key) -- cgit v1.2.3 From 606ebb35498c3d750bb2906954195baaa0fbcad6 Mon Sep 17 00:00:00 2001 From: Maximilian Albert Date: Sun, 9 Aug 2009 14:23:52 +0000 Subject: Fix remaining glitches in the behaviour of the Save dialogs (w.r.t. remembering the last file type and folder). As part of the cleanup inkscape:output_extension was removed, too. (bzr r8454) --- src/ui/dialog/filedialog.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ui/dialog/filedialog.cpp') diff --git a/src/ui/dialog/filedialog.cpp b/src/ui/dialog/filedialog.cpp index b1385195f..8e372c394 100644 --- a/src/ui/dialog/filedialog.cpp +++ b/src/ui/dialog/filedialog.cpp @@ -110,12 +110,12 @@ FileSaveDialog *FileSaveDialog::create(Gtk::Window& parentWindow, const char *title, const Glib::ustring &default_key, const gchar *docTitle, - const bool save_copy) + const Inkscape::Extension::FileSaveMethod save_method) { #ifdef WIN32 - FileSaveDialog *dialog = new FileSaveDialogImplWin32(parentWindow, path, fileTypes, title, default_key, docTitle, save_copy); + FileSaveDialog *dialog = new FileSaveDialogImplWin32(parentWindow, path, fileTypes, title, default_key, docTitle, save_method); #else - FileSaveDialog *dialog = new FileSaveDialogImplGtk(parentWindow, path, fileTypes, title, default_key, docTitle, save_copy); + FileSaveDialog *dialog = new FileSaveDialogImplGtk(parentWindow, path, fileTypes, title, default_key, docTitle, save_method); #endif return dialog; } -- cgit v1.2.3 From 9289c1726bbd97cb2befcfa19f21a79dd6a45d78 Mon Sep 17 00:00:00 2001 From: Maximilian Albert Date: Sun, 9 Aug 2009 16:43:39 +0000 Subject: Put #ifdefs around all code related to the so-called "new" ExportDialog (whatever that is) (bzr r8456) --- src/ui/dialog/filedialog.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ui/dialog/filedialog.cpp') diff --git a/src/ui/dialog/filedialog.cpp b/src/ui/dialog/filedialog.cpp index 8e372c394..68c0926aa 100644 --- a/src/ui/dialog/filedialog.cpp +++ b/src/ui/dialog/filedialog.cpp @@ -166,6 +166,8 @@ 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 */ @@ -179,6 +181,8 @@ FileExportDialog *FileExportDialog::create(Gtk::Window& parentWindow, return dialog; } +#endif // NEW_EXPORT_DIALOG + } //namespace Dialog } //namespace UI -- cgit v1.2.3