Merge dev into multi-external-editor
This commit is contained in:
@@ -637,6 +637,8 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
|
||||
vboxright = new Gtk::Paned (Gtk::ORIENTATION_VERTICAL);
|
||||
|
||||
vsubboxright = new Gtk::Box (Gtk::ORIENTATION_VERTICAL, 0);
|
||||
// int rightsize = options.fontSize * 44;
|
||||
// vsubboxright->set_size_request (rightsize, rightsize - 50);
|
||||
vsubboxright->set_size_request (300, 250);
|
||||
|
||||
vsubboxright->pack_start (*ppframe, Gtk::PACK_SHRINK, 2);
|
||||
@@ -1759,7 +1761,7 @@ void EditorPanel::procParamsChanged (Thumbnail* thm, int whoChangedIt)
|
||||
PartialProfile pp (true);
|
||||
pp.set (true);
|
||||
* (pp.pparams) = openThm->getProcParams();
|
||||
pp.pedited->locallab.spots.resize(pp.pparams->locallab.spots.size(), new LocallabParamsEdited::LocallabSpotEdited(true));
|
||||
pp.pedited->locallab.spots.resize(pp.pparams->locallab.spots.size(), LocallabParamsEdited::LocallabSpotEdited(true));
|
||||
tpc->profileChange (&pp, rtengine::EvProfileChangeNotification, M ("PROGRESSDLG_PROFILECHANGEDINBROWSER"));
|
||||
pp.deleteInstance();
|
||||
}
|
||||
@@ -1974,6 +1976,9 @@ void EditorPanel::sendToExternal()
|
||||
// develop image
|
||||
rtengine::procparams::ProcParams pparams;
|
||||
ipc->getParams (&pparams);
|
||||
if (options.editor_bypass_output_profile) {
|
||||
pparams.icm.outputProfile = rtengine::procparams::ColorManagementParams::NoProfileString;
|
||||
}
|
||||
|
||||
if (!cached_exported_filename.empty() && pparams == cached_exported_pparams && Glib::file_test(cached_exported_filename, Glib::FILE_TEST_IS_REGULAR)) {
|
||||
idle_sentToGimp(nullptr, nullptr, cached_exported_filename);
|
||||
@@ -2077,24 +2082,40 @@ bool EditorPanel::idle_sendToGimp ( ProgressConnector<rtengine::IImagefloat*> *p
|
||||
|
||||
if (img) {
|
||||
// get file name base
|
||||
const Glib::ustring shortname = removeExtension (Glib::path_get_basename (fname));
|
||||
const Glib::ustring dirname = Glib::get_tmp_dir ();
|
||||
const Glib::ustring lfname = Glib::build_filename (dirname, shortname);
|
||||
Glib::ustring shortname = removeExtension(Glib::path_get_basename(fname));
|
||||
Glib::ustring dirname;
|
||||
switch (options.editor_out_dir) {
|
||||
case Options::EDITOR_OUT_DIR_CURRENT:
|
||||
dirname = Glib::path_get_dirname(fname);
|
||||
break;
|
||||
case Options::EDITOR_OUT_DIR_CUSTOM:
|
||||
dirname = options.editor_custom_out_dir;
|
||||
break;
|
||||
default: // Options::EDITOR_OUT_DIR_TEMP
|
||||
dirname = Glib::get_tmp_dir();
|
||||
break;
|
||||
}
|
||||
Glib::ustring fullFileName = Glib::build_filename(dirname, shortname);
|
||||
|
||||
SaveFormat sf;
|
||||
sf.format = "tif";
|
||||
sf.tiffBits = 16;
|
||||
sf.tiffFloat = false;
|
||||
if (options.editor_float32) {
|
||||
sf.tiffBits = 32;
|
||||
sf.tiffFloat = true;
|
||||
} else {
|
||||
sf.tiffBits = 16;
|
||||
sf.tiffFloat = false;
|
||||
}
|
||||
|
||||
sf.tiffUncompressed = true;
|
||||
sf.saveParams = true;
|
||||
|
||||
Glib::ustring fileName = Glib::ustring::compose ("%1.%2", lfname, sf.format);
|
||||
Glib::ustring fileName = Glib::ustring::compose ("%1.%2", fullFileName, sf.format);
|
||||
|
||||
// TODO: Just list all file with a suitable name instead of brute force...
|
||||
int tries = 1;
|
||||
|
||||
while (Glib::file_test (fileName, Glib::FILE_TEST_EXISTS) && tries < 1000) {
|
||||
fileName = Glib::ustring::compose ("%1-%2.%3", lfname, tries, sf.format);
|
||||
fileName = Glib::ustring::compose ("%1-%2.%3", fullFileName, tries, sf.format);
|
||||
tries++;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user