Merge pull request #3976 from Beep6581/verbose-options
Always show console warning and popup when saving options file fails, #3975
This commit is contained in:
@@ -229,7 +229,7 @@ if((WIN32) AND NOT(UPPER_CMAKE_BUILD_TYPE STREQUAL "DEBUG"))
|
|||||||
set_target_properties(rth PROPERTIES LINK_FLAGS "-mwindows")
|
set_target_properties(rth PROPERTIES LINK_FLAGS "-mwindows")
|
||||||
endif()
|
endif()
|
||||||
set_target_properties(rth PROPERTIES COMPILE_FLAGS "${CMAKE_CXX_FLAGS}" OUTPUT_NAME rawtherapee)
|
set_target_properties(rth PROPERTIES COMPILE_FLAGS "${CMAKE_CXX_FLAGS}" OUTPUT_NAME rawtherapee)
|
||||||
set_target_properties(rth-cli PROPERTIES COMPILE_FLAGS "${CMAKE_CXX_FLAGS}" OUTPUT_NAME rawtherapee-cli)
|
set_target_properties(rth-cli PROPERTIES COMPILE_FLAGS "${CMAKE_CXX_FLAGS} -DRAWTHERAPEE_CLI" OUTPUT_NAME rawtherapee-cli)
|
||||||
|
|
||||||
# Add linked libraries dependencies to executables targets
|
# Add linked libraries dependencies to executables targets
|
||||||
target_link_libraries(rth rtengine
|
target_link_libraries(rth rtengine
|
||||||
|
@@ -2229,10 +2229,13 @@ int Options::saveToFile (Glib::ustring fname)
|
|||||||
FILE *f = g_fopen (fname.c_str (), "wt");
|
FILE *f = g_fopen (fname.c_str (), "wt");
|
||||||
|
|
||||||
if (f == nullptr) {
|
if (f == nullptr) {
|
||||||
if (options.rtSettings.verbose) {
|
std::cout << "Warning! Unable to save your preferences to: " << fname << std::endl;
|
||||||
printf ("Options::saveToFile / Error: unable to open file \"%s\" with write access!\n", fname.c_str());
|
#ifndef RAWTHERAPEE_CLI
|
||||||
}
|
Glib::ustring msg_ = Glib::ustring::compose(M("MAIN_MSG_WRITEFAILED"), fname.c_str());
|
||||||
|
//writeFailed (getToplevelWindow (this), msg_);
|
||||||
|
Gtk::MessageDialog msgd (msg_, true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true);
|
||||||
|
msgd.run ();
|
||||||
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
fprintf (f, "%s", keyData.c_str ());
|
fprintf (f, "%s", keyData.c_str ());
|
||||||
|
Reference in New Issue
Block a user