Fix issue 171 and 210, and change the name format of the pp3 files : now keep the output image extension in it, to avoid overwriting the pp3 file of an image with the same name, but with a different extension.

For consistency, the filename of the pp3 saved next to the output image in batch mode is modified in the same manner.
This commit is contained in:
Hombre
2010-09-08 00:37:24 +02:00
parent 1c409649c3
commit ee1443ab51
10 changed files with 121 additions and 49 deletions

View File

@@ -22,6 +22,8 @@
extern Options options;
SaveAsDialog::SaveAsDialog (Glib::ustring initialDir) {
set_title(M("GENERAL_SAVE"));
Gtk::VBox* vbox = get_vbox ();
fchooser = new Gtk::FileChooserWidget (Gtk::FILE_CHOOSER_ACTION_SAVE);
@@ -41,6 +43,16 @@ SaveAsDialog::SaveAsDialog (Glib::ustring initialDir) {
Gtk::HSeparator* hsep1 = new Gtk::HSeparator ();
vbox->pack_start (*hsep1, Gtk::PACK_SHRINK, 2);
// Unique filename option
// ~~~~~~~~~~~~~~~~~~~~~~
autoSuffix = new Gtk::CheckButton (M("SAVEDLG_AUTOSUFFIX"));
autoSuffix->set_active(options.autoSuffix);
vbox->pack_start (*autoSuffix, Gtk::PACK_SHRINK, 4);
Gtk::HSeparator* hsep2 = new Gtk::HSeparator ();
vbox->pack_start (*hsep2, Gtk::PACK_SHRINK, 2);
// Output Options
// ~~~~~~~~~~~~~~
formatOpts = new SaveFormatPanel ();
@@ -49,8 +61,8 @@ SaveAsDialog::SaveAsDialog (Glib::ustring initialDir) {
vbox->pack_start (*formatOpts, Gtk::PACK_SHRINK, 4);
Gtk::HSeparator* hsep2 = new Gtk::HSeparator ();
vbox->pack_start (*hsep2, Gtk::PACK_SHRINK, 2);
Gtk::HSeparator* hsep3 = new Gtk::HSeparator ();
vbox->pack_start (*hsep3, Gtk::PACK_SHRINK, 2);
// queue/immediate
// ~~~~~~~~~~~~~
@@ -83,6 +95,11 @@ SaveAsDialog::SaveAsDialog (Glib::ustring initialDir) {
show_all_children ();
}
bool SaveAsDialog::getAutoSuffix () {
return autoSuffix->get_active();
}
bool SaveAsDialog::getImmediately () {
return immediately->get_active ();