Fix lgtm issues
This commit is contained in:
parent
f02f5c4a69
commit
afeca7f5f9
@ -1108,7 +1108,7 @@ Glib::ustring EditorPanel::getShortName ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Glib::ustring EditorPanel::getFileName ()
|
Glib::ustring EditorPanel::getFileName () const
|
||||||
{
|
{
|
||||||
if (openThm) {
|
if (openThm) {
|
||||||
return openThm->getFileName ();
|
return openThm->getFileName ();
|
||||||
@ -2012,9 +2012,9 @@ bool EditorPanel::idle_sendToGimp ( ProgressConnector<rtengine::IImagefloat*> *p
|
|||||||
|
|
||||||
if (img) {
|
if (img) {
|
||||||
// get file name base
|
// get file name base
|
||||||
Glib::ustring shortname = removeExtension (Glib::path_get_basename (fname));
|
const Glib::ustring shortname = removeExtension (Glib::path_get_basename (fname));
|
||||||
Glib::ustring dirname = Glib::get_tmp_dir ();
|
const Glib::ustring dirname = Glib::get_tmp_dir ();
|
||||||
Glib::ustring fname = Glib::build_filename (dirname, shortname);
|
const Glib::ustring lfname = Glib::build_filename (dirname, shortname);
|
||||||
|
|
||||||
SaveFormat sf;
|
SaveFormat sf;
|
||||||
sf.format = "tif";
|
sf.format = "tif";
|
||||||
@ -2023,13 +2023,13 @@ bool EditorPanel::idle_sendToGimp ( ProgressConnector<rtengine::IImagefloat*> *p
|
|||||||
sf.tiffUncompressed = true;
|
sf.tiffUncompressed = true;
|
||||||
sf.saveParams = true;
|
sf.saveParams = true;
|
||||||
|
|
||||||
Glib::ustring fileName = Glib::ustring::compose ("%1.%2", fname, sf.format);
|
Glib::ustring fileName = Glib::ustring::compose ("%1.%2", lfname, sf.format);
|
||||||
|
|
||||||
// TODO: Just list all file with a suitable name instead of brute force...
|
// TODO: Just list all file with a suitable name instead of brute force...
|
||||||
int tries = 1;
|
int tries = 1;
|
||||||
|
|
||||||
while (Glib::file_test (fileName, Glib::FILE_TEST_EXISTS) && tries < 1000) {
|
while (Glib::file_test (fileName, Glib::FILE_TEST_EXISTS) && tries < 1000) {
|
||||||
fileName = Glib::ustring::compose ("%1-%2.%3", fname, tries, sf.format);
|
fileName = Glib::ustring::compose ("%1-%2.%3", lfname, tries, sf.format);
|
||||||
tries++;
|
tries++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ public:
|
|||||||
|
|
||||||
void saveProfile ();
|
void saveProfile ();
|
||||||
Glib::ustring getShortName ();
|
Glib::ustring getShortName ();
|
||||||
Glib::ustring getFileName ();
|
Glib::ustring getFileName () const;
|
||||||
bool handleShortcutKey (GdkEventKey* event);
|
bool handleShortcutKey (GdkEventKey* event);
|
||||||
|
|
||||||
bool getIsProcessing() const
|
bool getIsProcessing() const
|
||||||
|
@ -653,8 +653,8 @@ void RTWindow::remEditorPanel (EditorPanel* ep)
|
|||||||
|
|
||||||
set_title_decorated ("");
|
set_title_decorated ("");
|
||||||
} else {
|
} else {
|
||||||
EditorPanel* ep = static_cast<EditorPanel*> (mainNB->get_nth_page (mainNB->get_current_page()));
|
const EditorPanel* lep = static_cast<EditorPanel*> (mainNB->get_nth_page (mainNB->get_current_page()));
|
||||||
set_title_decorated (ep->getFileName());
|
set_title_decorated (lep->getFileName());
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: ask what to do: close & apply, close & apply selection, close & revert, cancel
|
// TODO: ask what to do: close & apply, close & apply selection, close & revert, cancel
|
||||||
|
Loading…
x
Reference in New Issue
Block a user