diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais
index a0447f92f..72495ea7e 100644
--- a/rtdata/languages/Francais
+++ b/rtdata/languages/Francais
@@ -109,7 +109,7 @@ FILEBROWSER_EXIFFILTERSETTINGS;Réglages
FILEBROWSER_EXTPROGMENU;Ouvrir avec
FILEBROWSER_FLATFIELD;Champ Uniforme
FILEBROWSER_MOVETODARKFDIR;Déplacer dans le dossier d'images de Trame Noire
-FILEBROWSER_MOVETOFLATFIELDDIR;Déplacer vers le dossier de Trame Noire
+FILEBROWSER_MOVETOFLATFIELDDIR;Déplacer vers le dossier de Champ Uniforme
FILEBROWSER_NEW_NAME;Nouveau nom:
FILEBROWSER_OPENDEFAULTVIEWER;Visualiseur par défaut de Windows (image déjà traitée)
FILEBROWSER_PARTIALPASTEPROFILE;Coller partiellement
@@ -524,8 +524,11 @@ MAIN_MSG_EXITJOBSINQUEUEQUEST;Êtes-vous sûr de vouloir quitter? Il reste dans
MAIN_MSG_IMAGEUNPROCESSED;Cette commande nécessite que toutes les images sélectionnées aient été préalablement traité.
MAIN_MSG_JOBSINQUEUE;travail(aux) en file d'attente
MAIN_MSG_NAVIGATOR;Navigateur
+MAIN_MSG_OPERATIONCANCELLED;Opération annulée
MAIN_MSG_PLACES;Emplacement
+MAIN_MSG_PATHDOESNTEXIST;Le chemin \n\n%1\n\nn'existe pas. S.V.P indiquez un chemin correct dans la fenêtre Préférences.
MAIN_MSG_QOVERWRITE;Voulez-vous l'écraser?
+MAIN_MSG_SETPATHFIRST;Vous devez d'abord choisir un dossier cible dans Préférences\npour pouvoir utiliser cette fonction!
MAIN_MSG_WRITEFAILED;Échec de l'enregistrement du fichier\n\n"%1"\n\nAssurez-vous que le dossier existe et qu'il est permis d'y écrire.
MAIN_TAB_BASIC;Basique
MAIN_TAB_COLOR;Couleur
diff --git a/rtdata/languages/default b/rtdata/languages/default
index b80fdea18..47cbfd49a 100644
--- a/rtdata/languages/default
+++ b/rtdata/languages/default
@@ -524,8 +524,11 @@ MAIN_MSG_EXITJOBSINQUEUEQUEST;Are you sure you want to exit? There are unprocess
MAIN_MSG_IMAGEUNPROCESSED;This command requires all selected images to be queue processed first.
MAIN_MSG_JOBSINQUEUE;job(s) in the queue
MAIN_MSG_NAVIGATOR;Navigator
+MAIN_MSG_OPERATIONCANCELLED;Operation cancelled
MAIN_MSG_PLACES;Places
+MAIN_MSG_PATHDOESNTEXIST;The path\n\n%1\n\ndoesn't exist. Please set a correct path in the Preference window.
MAIN_MSG_QOVERWRITE;Do you want to overwrite it?
+MAIN_MSG_SETPATHFIRST;You have to set a target path first in Preferences\nin order to use this function!
MAIN_MSG_WRITEFAILED;Failed to write\n\n"%1"\n\nMake sure that the folder exists and that you have write permission to it.
MAIN_TAB_BASIC;Basic
MAIN_TAB_COLOR;Color
diff --git a/rtgui/filebrowser.cc b/rtgui/filebrowser.cc
index 733a0c88e..f975c74bd 100644
--- a/rtgui/filebrowser.cc
+++ b/rtgui/filebrowser.cc
@@ -613,16 +613,33 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) {
}
}
}else if( m==thisIsDF){
- if( !options.rtSettings.darkFramesPath.empty() && Gio::File::create_for_path(options.rtSettings.darkFramesPath)->query_exists() ){
- for (size_t i=0; i file = Gio::File::create_for_path ( mselected[i]->filename );
- if( !file )continue;
- Glib::ustring destName = options.rtSettings.darkFramesPath+ "/" + file->get_basename();
- Glib::RefPtr dest = Gio::File::create_for_path ( destName );
- file->move( dest );
+ if( !options.rtSettings.darkFramesPath.empty()) {
+ if (Gio::File::create_for_path(options.rtSettings.darkFramesPath)->query_exists() ){
+ for (size_t i=0; i file = Gio::File::create_for_path ( mselected[i]->filename );
+ if( !file )continue;
+ Glib::ustring destName = options.rtSettings.darkFramesPath+ "/" + file->get_basename();
+ Glib::RefPtr dest = Gio::File::create_for_path ( destName );
+ file->move( dest );
+ }
+ // Reinit cache
+ rtengine::dfm.init( options.rtSettings.darkFramesPath );
}
- // Reinit cache
- rtengine::dfm.init( options.rtSettings.darkFramesPath );
+ else {
+ // Target directory creation failed, we clear the darkFramesPath setting
+ options.rtSettings.darkFramesPath.clear();
+ Glib::ustring msg_ = Glib::ustring::compose (M("MAIN_MSG_PATHDOESNTEXIST"), options.rtSettings.darkFramesPath)
+ +"\n\n"+M("MAIN_MSG_OPERATIONCANCELLED");
+ Gtk::MessageDialog msgd (msg_, true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true);
+ msgd.set_title(M("TP_DARKFRAME_LABEL"));
+ msgd.run ();
+ }
+ }
+ else {
+ Glib::ustring msg_ = M("MAIN_MSG_SETPATHFIRST")+"\n\n"+M("MAIN_MSG_OPERATIONCANCELLED");
+ Gtk::MessageDialog msgd (msg_, true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true);
+ msgd.set_title(M("TP_DARKFRAME_LABEL"));
+ msgd.run ();
}
}
else if (m==autoFF){
@@ -653,16 +670,33 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) {
}
}
else if( m==thisIsFF){
- if( !options.rtSettings.flatFieldsPath.empty() && Gio::File::create_for_path(options.rtSettings.flatFieldsPath)->query_exists() ){
- for (size_t i=0; i file = Gio::File::create_for_path ( mselected[i]->filename );
- if( !file )continue;
- Glib::ustring destName = options.rtSettings.flatFieldsPath+ "/" + file->get_basename();
- Glib::RefPtr dest = Gio::File::create_for_path ( destName );
- file->move( dest );
+ if( !options.rtSettings.flatFieldsPath.empty()) {
+ if (Gio::File::create_for_path(options.rtSettings.flatFieldsPath)->query_exists() ){
+ for (size_t i=0; i file = Gio::File::create_for_path ( mselected[i]->filename );
+ if( !file )continue;
+ Glib::ustring destName = options.rtSettings.flatFieldsPath+ "/" + file->get_basename();
+ Glib::RefPtr dest = Gio::File::create_for_path ( destName );
+ file->move( dest );
+ }
+ // Reinit cache
+ rtengine::ffm.init( options.rtSettings.flatFieldsPath );
}
- // Reinit cache
- rtengine::ffm.init( options.rtSettings.flatFieldsPath );
+ else {
+ // Target directory creation failed, we clear the flatFieldsPath setting
+ options.rtSettings.flatFieldsPath.clear();
+ Glib::ustring msg_ = Glib::ustring::compose (M("MAIN_MSG_PATHDOESNTEXIST"), options.rtSettings.flatFieldsPath)
+ +"\n\n"+M("MAIN_MSG_OPERATIONCANCELLED");
+ Gtk::MessageDialog msgd (msg_, true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true);
+ msgd.set_title(M("TP_FLATFIELD_LABEL"));
+ msgd.run ();
+ }
+ }
+ else {
+ Glib::ustring msg_ = M("MAIN_MSG_SETPATHFIRST")+"\n\n"+M("MAIN_MSG_OPERATIONCANCELLED");
+ Gtk::MessageDialog msgd (msg_, true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true);
+ msgd.set_title(M("TP_FLATFIELD_LABEL"));
+ msgd.run ();
}
}
else if (m==copyprof)