Try to fix #3132 by making sure every file chooser dialog is given an appropriate parent window.
This commit is contained in:
@@ -324,7 +324,7 @@ void BatchQueuePanel::saveOptions ()
|
||||
void BatchQueuePanel::pathFolderButtonPressed ()
|
||||
{
|
||||
|
||||
Gtk::FileChooserDialog fc(M("PREFERENCES_OUTDIRFOLDER"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER );
|
||||
Gtk::FileChooserDialog fc (getToplevelWindow (this), M("PREFERENCES_OUTDIRFOLDER"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER );
|
||||
fc.add_button( Gtk::StockID("gtk-cancel"), Gtk::RESPONSE_CANCEL);
|
||||
fc.add_button( Gtk::StockID("gtk-ok"), Gtk::RESPONSE_OK);
|
||||
fc.set_filename(options.savePathFolder);
|
||||
|
||||
@@ -421,7 +421,7 @@ void CurveEditorSubGroup::updateEditButton(CurveEditor* curve, Gtk::ToggleButton
|
||||
Glib::ustring CurveEditorSubGroup::outputFile ()
|
||||
{
|
||||
|
||||
Gtk::FileChooserDialog dialog(M("CURVEEDITOR_SAVEDLGLABEL"), Gtk::FILE_CHOOSER_ACTION_SAVE);
|
||||
Gtk::FileChooserDialog dialog (getToplevelWindow (parent), M("CURVEEDITOR_SAVEDLGLABEL"), Gtk::FILE_CHOOSER_ACTION_SAVE);
|
||||
bindCurrentFolder (dialog, curveDir);
|
||||
dialog.set_current_name (lastFilename);
|
||||
|
||||
@@ -466,7 +466,7 @@ Glib::ustring CurveEditorSubGroup::outputFile ()
|
||||
Glib::ustring CurveEditorSubGroup::inputFile ()
|
||||
{
|
||||
|
||||
Gtk::FileChooserDialog dialog(M("CURVEEDITOR_LOADDLGLABEL"), Gtk::FILE_CHOOSER_ACTION_OPEN);
|
||||
Gtk::FileChooserDialog dialog (getToplevelWindow (parent), M("CURVEEDITOR_LOADDLGLABEL"), Gtk::FILE_CHOOSER_ACTION_OPEN);
|
||||
bindCurrentFolder (dialog, curveDir);
|
||||
|
||||
dialog.add_button(Gtk::StockID("gtk-cancel"), Gtk::RESPONSE_CANCEL);
|
||||
|
||||
@@ -833,7 +833,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m)
|
||||
} else if (m == selectDF) {
|
||||
if( !mselected.empty() ) {
|
||||
rtengine::procparams::ProcParams pp = mselected[0]->thumbnail->getProcParams();
|
||||
Gtk::FileChooserDialog fc("Dark Frame", Gtk::FILE_CHOOSER_ACTION_OPEN );
|
||||
Gtk::FileChooserDialog fc (getToplevelWindow (this), "Dark Frame", Gtk::FILE_CHOOSER_ACTION_OPEN );
|
||||
bindCurrentFolder (fc, options.lastDarkframeDir);
|
||||
fc.add_button( Gtk::StockID("gtk-cancel"), Gtk::RESPONSE_CANCEL);
|
||||
fc.add_button( Gtk::StockID("gtk-apply"), Gtk::RESPONSE_APPLY);
|
||||
@@ -909,7 +909,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m)
|
||||
} else if (m == selectFF) {
|
||||
if( !mselected.empty() ) {
|
||||
rtengine::procparams::ProcParams pp = mselected[0]->thumbnail->getProcParams();
|
||||
Gtk::FileChooserDialog fc("Flat Field", Gtk::FILE_CHOOSER_ACTION_OPEN );
|
||||
Gtk::FileChooserDialog fc (getToplevelWindow (this), "Flat Field", Gtk::FILE_CHOOSER_ACTION_OPEN );
|
||||
bindCurrentFolder (fc, options.lastFlatfieldDir);
|
||||
fc.add_button( Gtk::StockID("gtk-cancel"), Gtk::RESPONSE_CANCEL);
|
||||
fc.add_button( Gtk::StockID("gtk-apply"), Gtk::RESPONSE_APPLY);
|
||||
|
||||
@@ -982,7 +982,7 @@ void FileCatalog::copyMoveRequested (std::vector<FileBrowserEntry*> tbe, bool m
|
||||
fc_title = M("FILEBROWSER_POPUPCOPYTO");
|
||||
}
|
||||
|
||||
Gtk::FileChooserDialog fc(fc_title, Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER );
|
||||
Gtk::FileChooserDialog fc (getToplevelWindow (this), fc_title, Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER );
|
||||
fc.add_button( Gtk::StockID("gtk-cancel"), Gtk::RESPONSE_CANCEL);
|
||||
fc.add_button( Gtk::StockID("gtk-ok"), Gtk::RESPONSE_OK);
|
||||
// open dialog at the 1-st file's path
|
||||
|
||||
@@ -490,4 +490,9 @@ inline void setActiveTextOrIndex (Gtk::ComboBoxText& comboBox, const Glib::ustri
|
||||
comboBox.set_active (index);
|
||||
}
|
||||
|
||||
inline Gtk::Window& getToplevelWindow (Gtk::Widget* widget)
|
||||
{
|
||||
return *static_cast<Gtk::Window*> (widget->get_toplevel ());
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -943,7 +943,7 @@ void ICMPanel::saveReferencePressed ()
|
||||
return;
|
||||
}
|
||||
|
||||
Gtk::FileChooserDialog dialog(M("TP_ICM_SAVEREFERENCE"), Gtk::FILE_CHOOSER_ACTION_SAVE);
|
||||
Gtk::FileChooserDialog dialog (getToplevelWindow (this), M("TP_ICM_SAVEREFERENCE"), Gtk::FILE_CHOOSER_ACTION_SAVE);
|
||||
bindCurrentFolder (dialog, options.lastProfilingReferenceDir);
|
||||
dialog.set_current_name (lastRefFilename);
|
||||
|
||||
|
||||
@@ -1845,7 +1845,7 @@ void Preferences::cancelPressed ()
|
||||
void Preferences::selectStartupDir ()
|
||||
{
|
||||
|
||||
Gtk::FileChooserDialog dialog(M("PREFERENCES_DIRSELECTDLG"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER);
|
||||
Gtk::FileChooserDialog dialog (getToplevelWindow (this), M("PREFERENCES_DIRSELECTDLG"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER);
|
||||
// dialog.set_transient_for(*this);
|
||||
|
||||
//Add response buttons the the dialog:
|
||||
|
||||
@@ -287,7 +287,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);
|
||||
|
||||
@@ -453,7 +453,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
|
||||
|
||||
Reference in New Issue
Block a user