Solving issue 1690: "ver 4.09.50 unable to save processing profiles". There is now 2 new shortcut places when loading/saving a profile, and 1 new place when "saving as.." an image in the dialog box.

This commit is contained in:
natureh 510
2013-02-04 00:36:56 +01:00
parent 3e04306a93
commit 0c7475c4df
6 changed files with 28 additions and 5 deletions

View File

@@ -40,7 +40,7 @@ void ProfilePanel::cleanup () {
delete partialProfileDlg;
}
ProfilePanel::ProfilePanel (bool readOnly) : lastFilename("") {
ProfilePanel::ProfilePanel (bool readOnly) : lastFilename(""), imagePath("") {
tpc = NULL;
@@ -128,6 +128,11 @@ void ProfilePanel::save_clicked (GdkEventButton* event) {
FileChooserLastFolderPersister persister( &dialog, options.loadSaveProfilePath );
dialog.set_current_name (lastFilename);
//Add the user's default (or global if multiuser=false) profile path to the Shortcut list
dialog.add_shortcut_folder(options.getPreferredProfilePath());
//Add the image's path to the Shortcut list
dialog.add_shortcut_folder(imagePath);
//Add response buttons the the dialog:
dialog.add_button(Gtk::StockID("gtk-cancel"), Gtk::RESPONSE_CANCEL);
dialog.add_button(Gtk::StockID("gtk-save"), Gtk::RESPONSE_OK);
@@ -245,6 +250,11 @@ void ProfilePanel::load_clicked (GdkEventButton* event) {
Gtk::FileChooserDialog dialog(M("PROFILEPANEL_LOADDLGLABEL"), Gtk::FILE_CHOOSER_ACTION_OPEN);
FileChooserLastFolderPersister persister( &dialog, options.loadSaveProfilePath );
//Add the user's default (or global if multiuser=false) profile path to the Shortcut list
dialog.add_shortcut_folder(options.getPreferredProfilePath());
//Add the image's path to the Shortcut list
dialog.add_shortcut_folder(imagePath);
//Add response buttons the the dialog:
dialog.add_button(Gtk::StockID("gtk-cancel"), Gtk::RESPONSE_CANCEL);
dialog.add_button(Gtk::StockID("gtk-open"), Gtk::RESPONSE_OK);
@@ -480,5 +490,8 @@ void ProfilePanel::initProfile (const Glib::ustring& profname, ProcParams* lastS
}
}
void ProfilePanel::setInitialFileName (const Glib::ustring& filename) {
lastFilename = Glib::path_get_basename(filename) + paramFileExtension;
imagePath = Glib::path_get_dirname(filename);
}