Merge branch 'master' into 'gtk3' to fix modal dialogs without a parent

This commit is contained in:
Adam Reichold
2016-03-28 13:49:56 +02:00
12 changed files with 446 additions and 243 deletions

View File

@@ -266,7 +266,7 @@ void ProfilePanel::save_clicked (GdkEventButton* event)
return;
}
Gtk::FileChooserDialog dialog(M("PROFILEPANEL_SAVEDLGLABEL"), Gtk::FILE_CHOOSER_ACTION_SAVE);
Gtk::FileChooserDialog dialog (getToplevelWindow (this), M("PROFILEPANEL_SAVEDLGLABEL"), Gtk::FILE_CHOOSER_ACTION_SAVE);
bindCurrentFolder (dialog, options.loadSaveProfilePath);
dialog.set_current_name (lastFilename);
@@ -432,7 +432,7 @@ void ProfilePanel::load_clicked (GdkEventButton* event)
return;
}
Gtk::FileChooserDialog dialog(M("PROFILEPANEL_LOADDLGLABEL"), Gtk::FILE_CHOOSER_ACTION_OPEN);
Gtk::FileChooserDialog dialog (getToplevelWindow (this), M("PROFILEPANEL_LOADDLGLABEL"), Gtk::FILE_CHOOSER_ACTION_OPEN);
bindCurrentFolder (dialog, options.loadSaveProfilePath);
//Add the user's default (or global if multiuser=false) profile path to the Shortcut list
@@ -575,6 +575,17 @@ void ProfilePanel::paste_clicked (GdkEventButton* event)
} else {
if (fillMode->get_active()) {
custom->pparams->setDefaults();
} else if (!isCustomSelected ()) {
if (isLastSavedSelected()) {
*custom->pparams = *lastsaved->pparams;
} else {
const ProfileStoreEntry* entry = profiles->getSelectedEntry();
if (entry) {
const PartialProfile* partProfile = profileStore.getProfile (entry);
*custom->pparams = *partProfile->pparams;
}
}
}
profiles->set_active(getCustomRow());