run through astyle
This commit is contained in:
parent
511f6c2a7b
commit
b39f072baf
@ -184,6 +184,7 @@ int main(int argc, char **argv)
|
|||||||
#if ECLIPSE_ARGS
|
#if ECLIPSE_ARGS
|
||||||
fname = fname.substr (1, fname.length() - 2);
|
fname = fname.substr (1, fname.length() - 2);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (options.rtSettings.verbose || ( !Glib::file_test (fname, Glib::FILE_TEST_EXISTS ) && !Glib::file_test (fname, Glib::FILE_TEST_IS_DIR))) {
|
if (options.rtSettings.verbose || ( !Glib::file_test (fname, Glib::FILE_TEST_EXISTS ) && !Glib::file_test (fname, Glib::FILE_TEST_IS_DIR))) {
|
||||||
bool stdoutRedirectedtoFile = (GetFileType (GetStdHandle (STD_OUTPUT_HANDLE)) == 0x0001);
|
bool stdoutRedirectedtoFile = (GetFileType (GetStdHandle (STD_OUTPUT_HANDLE)) == 0x0001);
|
||||||
bool stderrRedirectedtoFile = (GetFileType (GetStdHandle (STD_ERROR_HANDLE)) == 0x0001);
|
bool stderrRedirectedtoFile = (GetFileType (GetStdHandle (STD_ERROR_HANDLE)) == 0x0001);
|
||||||
@ -238,25 +239,28 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
// printing RT's version in all case, particularly useful for the 'verbose' mode, but also for the batch processing
|
// printing RT's version in all case, particularly useful for the 'verbose' mode, but also for the batch processing
|
||||||
std::cout << "RawTherapee, version " << RTVERSION << ", command line" << std::endl;
|
std::cout << "RawTherapee, version " << RTVERSION << ", command line" << std::endl;
|
||||||
|
|
||||||
if (argc > 1) {
|
if (argc > 1) {
|
||||||
ret = processLineParams (argc, argv);
|
ret = processLineParams (argc, argv);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
std::cout << "Terminating without anything to do." << std::endl;
|
std::cout << "Terminating without anything to do." << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|
||||||
if (consoleOpened) {
|
if (consoleOpened) {
|
||||||
printf ("Press any key to exit RawTherapee\n");
|
printf ("Press any key to exit RawTherapee\n");
|
||||||
FlushConsoleInputBuffer (GetStdHandle (STD_INPUT_HANDLE));
|
FlushConsoleInputBuffer (GetStdHandle (STD_INPUT_HANDLE));
|
||||||
getch();
|
getch();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@ -281,6 +285,7 @@ bool dontLoadCache( int argc, char **argv )
|
|||||||
#if ECLIPSE_ARGS
|
#if ECLIPSE_ARGS
|
||||||
currParam = currParam.substr (1, currParam.length() - 2);
|
currParam = currParam.substr (1, currParam.length() - 2);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ( currParam.at (0) == '-' && currParam.at (1) == 'q' ) {
|
if ( currParam.at (0) == '-' && currParam.at (1) == 'q' ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -315,6 +320,7 @@ int processLineParams( int argc, char **argv )
|
|||||||
#if ECLIPSE_ARGS
|
#if ECLIPSE_ARGS
|
||||||
currParam = currParam.substr (1, currParam.length() - 2);
|
currParam = currParam.substr (1, currParam.length() - 2);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ( currParam.at (0) == '-' ) {
|
if ( currParam.at (0) == '-' ) {
|
||||||
switch ( currParam.at (1) ) {
|
switch ( currParam.at (1) ) {
|
||||||
case 'O':
|
case 'O':
|
||||||
@ -327,6 +333,7 @@ int processLineParams( int argc, char **argv )
|
|||||||
#if ECLIPSE_ARGS
|
#if ECLIPSE_ARGS
|
||||||
outputPath = outputPath.substr (1, outputPath.length() - 2);
|
outputPath = outputPath.substr (1, outputPath.length() - 2);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (outputPath.substr (0, 9) == "/dev/null") {
|
if (outputPath.substr (0, 9) == "/dev/null") {
|
||||||
outputPath.assign ("/dev/null"); // removing any useless chars or filename
|
outputPath.assign ("/dev/null"); // removing any useless chars or filename
|
||||||
outputDirectory = false;
|
outputDirectory = false;
|
||||||
@ -460,16 +467,17 @@ int processLineParams( int argc, char **argv )
|
|||||||
if (Glib::file_test (argument, Glib::FILE_TEST_IS_REGULAR)) {
|
if (Glib::file_test (argument, Glib::FILE_TEST_IS_REGULAR)) {
|
||||||
bool notAll = allExtensions && !options.is_parse_extention (argument);
|
bool notAll = allExtensions && !options.is_parse_extention (argument);
|
||||||
bool notRetained = !allExtensions && !options.has_retained_extention (argument);
|
bool notRetained = !allExtensions && !options.has_retained_extention (argument);
|
||||||
|
|
||||||
if (notAll || notRetained) {
|
if (notAll || notRetained) {
|
||||||
if (notAll) {
|
if (notAll) {
|
||||||
std::cout << "\"" << argument << "\" is not one of the file format to process: skipped" << std::endl;
|
std::cout << "\"" << argument << "\" is not one of the file format to process: skipped" << std::endl;
|
||||||
} else if (notRetained) {
|
} else if (notRetained) {
|
||||||
std::cout << "\"" << argument << "\" is not one of the retained file format to process: skipped" << std::endl;
|
std::cout << "\"" << argument << "\" is not one of the retained file format to process: skipped" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
inputFiles.emplace_back (argument);
|
inputFiles.emplace_back (argument);
|
||||||
}
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -477,6 +485,7 @@ int processLineParams( int argc, char **argv )
|
|||||||
if (Glib::file_test (argument, Glib::FILE_TEST_IS_DIR)) {
|
if (Glib::file_test (argument, Glib::FILE_TEST_IS_DIR)) {
|
||||||
|
|
||||||
auto dir = Gio::File::create_for_path (argument);
|
auto dir = Gio::File::create_for_path (argument);
|
||||||
|
|
||||||
if (!dir || !dir->query_exists()) {
|
if (!dir || !dir->query_exists()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -500,6 +509,7 @@ int processLineParams( int argc, char **argv )
|
|||||||
} else if (notRetained) {
|
} else if (notRetained) {
|
||||||
std::cout << "\"" << fileName << "\" is not one of the retained file format to process: skipped" << std::endl;
|
std::cout << "\"" << fileName << "\" is not one of the retained file format to process: skipped" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -745,6 +755,7 @@ int processLineParams( int argc, char **argv )
|
|||||||
delete rawParams;
|
delete rawParams;
|
||||||
rawParams = ProfileStore::getInstance()->loadDynamicProfile (ii->getMetaData());
|
rawParams = ProfileStore::getInstance()->loadDynamicProfile (ii->getMetaData());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << " Merging default raw processing profile" << std::endl;
|
std::cout << " Merging default raw processing profile" << std::endl;
|
||||||
rawParams->applyTo (¤tParams);
|
rawParams->applyTo (¤tParams);
|
||||||
} else {
|
} else {
|
||||||
@ -753,6 +764,7 @@ int processLineParams( int argc, char **argv )
|
|||||||
delete imgParams;
|
delete imgParams;
|
||||||
imgParams = ProfileStore::getInstance()->loadDynamicProfile (ii->getMetaData());
|
imgParams = ProfileStore::getInstance()->loadDynamicProfile (ii->getMetaData());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << " Merging default non-raw processing profile" << std::endl;
|
std::cout << " Merging default non-raw processing profile" << std::endl;
|
||||||
imgParams->applyTo (¤tParams);
|
imgParams->applyTo (¤tParams);
|
||||||
}
|
}
|
||||||
|
@ -125,6 +125,7 @@ int processLineParams( int argc, char **argv )
|
|||||||
#if ECLIPSE_ARGS
|
#if ECLIPSE_ARGS
|
||||||
currParam = currParam.substr (1, currParam.length() - 2);
|
currParam = currParam.substr (1, currParam.length() - 2);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ( currParam.at (0) == '-' ) {
|
if ( currParam.at (0) == '-' ) {
|
||||||
switch ( currParam.at (1) ) {
|
switch ( currParam.at (1) ) {
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
@ -132,14 +133,17 @@ int processLineParams( int argc, char **argv )
|
|||||||
case 'w': // This case is handled outside this function
|
case 'w': // This case is handled outside this function
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
case 'v':
|
case 'v':
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
#ifndef __APPLE__ // TODO agriggio - there seems to be already some "single instance app" support for OSX in rtwindow. Disabling it here until I understand how to merge the two
|
#ifndef __APPLE__ // TODO agriggio - there seems to be already some "single instance app" support for OSX in rtwindow. Disabling it here until I understand how to merge the two
|
||||||
|
|
||||||
case 'R':
|
case 'R':
|
||||||
if (!gimpPlugin) {
|
if (!gimpPlugin) {
|
||||||
remote = true;
|
remote = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -150,6 +154,7 @@ int processLineParams( int argc, char **argv )
|
|||||||
remote = false;
|
remote = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// no break here on purpose
|
// no break here on purpose
|
||||||
|
|
||||||
case 'h':
|
case 'h':
|
||||||
@ -195,6 +200,7 @@ int processLineParams( int argc, char **argv )
|
|||||||
argv2 = Glib::ustring (fname_to_utf8 (argv[iArg]));
|
argv2 = Glib::ustring (fname_to_utf8 (argv[iArg]));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gimpPlugin) {
|
if (!gimpPlugin) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -259,16 +265,20 @@ RTWindow *create_rt_window()
|
|||||||
|
|
||||||
Glib::RefPtr<Glib::Regex> regex = Glib::Regex::create (THEMEREGEXSTR, Glib::RegexCompileFlags::REGEX_CASELESS);
|
Glib::RefPtr<Glib::Regex> regex = Glib::Regex::create (THEMEREGEXSTR, Glib::RegexCompileFlags::REGEX_CASELESS);
|
||||||
Glib::ustring filename = Glib::build_filename (argv0, "themes", options.theme + ".css");
|
Glib::ustring filename = Glib::build_filename (argv0, "themes", options.theme + ".css");
|
||||||
|
|
||||||
if (!regex->match (options.theme + ".css") || !Glib::file_test (filename, Glib::FILE_TEST_EXISTS)) {
|
if (!regex->match (options.theme + ".css") || !Glib::file_test (filename, Glib::FILE_TEST_EXISTS)) {
|
||||||
options.theme = "RawTherapee-GTK";
|
options.theme = "RawTherapee-GTK";
|
||||||
|
|
||||||
// We're not testing GTK_MAJOR_VERSION == 3 here, since this branch requires Gtk3 only
|
// We're not testing GTK_MAJOR_VERSION == 3 here, since this branch requires Gtk3 only
|
||||||
if (GTK_MINOR_VERSION < 20) {
|
if (GTK_MINOR_VERSION < 20) {
|
||||||
options.theme = options.theme + "3-_19";
|
options.theme = options.theme + "3-_19";
|
||||||
} else {
|
} else {
|
||||||
options.theme = options.theme + "3-20_";
|
options.theme = options.theme + "3-20_";
|
||||||
}
|
}
|
||||||
|
|
||||||
filename = Glib::build_filename (argv0, "themes", options.theme + ".css");
|
filename = Glib::build_filename (argv0, "themes", options.theme + ".css");
|
||||||
}
|
}
|
||||||
|
|
||||||
cssRT = Gtk::CssProvider::create();
|
cssRT = Gtk::CssProvider::create();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -327,7 +337,8 @@ RTWindow *create_rt_window()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class RTApplication: public Gtk::Application {
|
class RTApplication: public Gtk::Application
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
RTApplication():
|
RTApplication():
|
||||||
Gtk::Application ("com.rawtherapee.application",
|
Gtk::Application ("com.rawtherapee.application",
|
||||||
@ -341,6 +352,7 @@ public:
|
|||||||
if (rtWindow) {
|
if (rtWindow) {
|
||||||
delete rtWindow;
|
delete rtWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup_rt();
|
cleanup_rt();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -385,6 +397,7 @@ private:
|
|||||||
|
|
||||||
for (const auto &f : files) {
|
for (const auto &f : files) {
|
||||||
Thumbnail *thm = cacheMgr->getEntry (f->get_path());
|
Thumbnail *thm = cacheMgr->getEntry (f->get_path());
|
||||||
|
|
||||||
if (thm) {
|
if (thm) {
|
||||||
d->entries.push_back (thm);
|
d->entries.push_back (thm);
|
||||||
d->lastfilename = f->get_path();
|
d->lastfilename = f->get_path();
|
||||||
@ -393,8 +406,7 @@ private:
|
|||||||
|
|
||||||
if (!d->entries.empty()) {
|
if (!d->entries.empty()) {
|
||||||
const auto doit =
|
const auto doit =
|
||||||
[](gpointer data) -> gboolean
|
[] (gpointer data) -> gboolean {
|
||||||
{
|
|
||||||
Data *d = static_cast<Data *> (data);
|
Data *d = static_cast<Data *> (data);
|
||||||
d->filecatalog->openRequested (d->entries);
|
d->filecatalog->openRequested (d->entries);
|
||||||
d->filecatalog->selectImage (d->lastfilename, true);
|
d->filecatalog->selectImage (d->lastfilename, true);
|
||||||
@ -405,6 +417,7 @@ private:
|
|||||||
} else {
|
} else {
|
||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
rtWindow->present();
|
rtWindow->present();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -486,6 +499,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
if (argc > 1) {
|
if (argc > 1) {
|
||||||
int ret = processLineParams ( argc, argv);
|
int ret = processLineParams ( argc, argv);
|
||||||
|
|
||||||
if (options.rtSettings.verbose || (!remote && !Glib::file_test (argv1, Glib::FILE_TEST_EXISTS ) && !Glib::file_test (argv1, Glib::FILE_TEST_IS_DIR))) {
|
if (options.rtSettings.verbose || (!remote && !Glib::file_test (argv1, Glib::FILE_TEST_EXISTS ) && !Glib::file_test (argv1, Glib::FILE_TEST_IS_DIR))) {
|
||||||
bool stdoutRedirectedtoFile = (GetFileType (GetStdHandle (STD_OUTPUT_HANDLE)) == 0x0001);
|
bool stdoutRedirectedtoFile = (GetFileType (GetStdHandle (STD_OUTPUT_HANDLE)) == 0x0001);
|
||||||
bool stderrRedirectedtoFile = (GetFileType (GetStdHandle (STD_ERROR_HANDLE)) == 0x0001);
|
bool stderrRedirectedtoFile = (GetFileType (GetStdHandle (STD_ERROR_HANDLE)) == 0x0001);
|
||||||
@ -576,6 +590,7 @@ int main(int argc, char **argv)
|
|||||||
printf ("Error: argv1 doesn't exist\n");
|
printf ("Error: argv1 doesn't exist\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argv2.empty()) {
|
if (argv2.empty()) {
|
||||||
printf ("Error: -gimp requires two arguments\n");
|
printf ("Error: -gimp requires two arguments\n");
|
||||||
return 1;
|
return 1;
|
||||||
@ -585,13 +600,16 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (remote) {
|
if (remote) {
|
||||||
char *app_argv[2] = { const_cast<char *> (argv0.c_str()) };
|
char *app_argv[2] = { const_cast<char *> (argv0.c_str()) };
|
||||||
int app_argc = 1;
|
int app_argc = 1;
|
||||||
|
|
||||||
if (!argv1.empty()) {
|
if (!argv1.empty()) {
|
||||||
app_argc = 2;
|
app_argc = 2;
|
||||||
app_argv[1] = const_cast<char *> (argv1.c_str());
|
app_argv[1] = const_cast<char *> (argv1.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
RTApplication app;
|
RTApplication app;
|
||||||
ret = app.run (app_argc, app_argv);
|
ret = app.run (app_argc, app_argv);
|
||||||
} else {
|
} else {
|
||||||
@ -614,6 +632,7 @@ int main(int argc, char **argv)
|
|||||||
ret = -2;
|
ret = -2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup_rt();
|
cleanup_rt();
|
||||||
} else {
|
} else {
|
||||||
Gtk::Main m (&argc, &argv);
|
Gtk::Main m (&argc, &argv);
|
||||||
|
@ -1831,6 +1831,7 @@ void Options::readFromFile (Glib::ustring fname)
|
|||||||
if (keyFile.has_key ("Fast Export", "fastexport_resize_height" )) {
|
if (keyFile.has_key ("Fast Export", "fastexport_resize_height" )) {
|
||||||
fastexport_resize_height = keyFile.get_integer ("Fast Export", "fastexport_resize_height" );
|
fastexport_resize_height = keyFile.get_integer ("Fast Export", "fastexport_resize_height" );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (keyFile.has_key ("Fast Export", "fastexport_use_fast_pipeline" )) {
|
if (keyFile.has_key ("Fast Export", "fastexport_use_fast_pipeline" )) {
|
||||||
fastexport_use_fast_pipeline = keyFile.get_integer ("Fast Export", "fastexport_use_fast_pipeline" );
|
fastexport_use_fast_pipeline = keyFile.get_integer ("Fast Export", "fastexport_use_fast_pipeline" );
|
||||||
}
|
}
|
||||||
@ -1864,15 +1865,19 @@ void Options::readFromFile (Glib::ustring fname)
|
|||||||
}
|
}
|
||||||
} catch (Glib::Error &err) {
|
} catch (Glib::Error &err) {
|
||||||
Glib::ustring msg = Glib::ustring::compose ("Options::readFromFile / Error code %1 while reading values from \"%2\":\n%3", err.code(), fname, err.what());
|
Glib::ustring msg = Glib::ustring::compose ("Options::readFromFile / Error code %1 while reading values from \"%2\":\n%3", err.code(), fname, err.what());
|
||||||
|
|
||||||
if (options.rtSettings.verbose) {
|
if (options.rtSettings.verbose) {
|
||||||
printf ("%s\n", msg.c_str());
|
printf ("%s\n", msg.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
throw Error (msg);
|
throw Error (msg);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
Glib::ustring msg = Glib::ustring::compose ("Options::readFromFile / Unknown exception while trying to load \"%1\"!", fname);
|
Glib::ustring msg = Glib::ustring::compose ("Options::readFromFile / Unknown exception while trying to load \"%1\"!", fname);
|
||||||
|
|
||||||
if (options.rtSettings.verbose) {
|
if (options.rtSettings.verbose) {
|
||||||
printf ("%s\n", msg.c_str());
|
printf ("%s\n", msg.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
throw Error (msg);
|
throw Error (msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,8 +43,7 @@
|
|||||||
// Special name for the Dynamic profile
|
// Special name for the Dynamic profile
|
||||||
#define DEFPROFILE_DYNAMIC "Dynamic"
|
#define DEFPROFILE_DYNAMIC "Dynamic"
|
||||||
|
|
||||||
struct SaveFormat
|
struct SaveFormat {
|
||||||
{
|
|
||||||
SaveFormat() :
|
SaveFormat() :
|
||||||
format ("jpg"),
|
format ("jpg"),
|
||||||
pngBits (8),
|
pngBits (8),
|
||||||
@ -75,11 +74,18 @@ enum prevdemo_t {PD_Sidecar = 1, PD_Fast = 0};
|
|||||||
class Options
|
class Options
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
class Error: public std::exception {
|
class Error: public std::exception
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
Error (const Glib::ustring &msg): msg_ (msg) {}
|
Error (const Glib::ustring &msg): msg_ (msg) {}
|
||||||
const char *what() const throw() { return msg_.c_str(); }
|
const char *what() const throw()
|
||||||
const Glib::ustring &get_msg() const throw() { return msg_; }
|
{
|
||||||
|
return msg_.c_str();
|
||||||
|
}
|
||||||
|
const Glib::ustring &get_msg() const throw()
|
||||||
|
{
|
||||||
|
return msg_;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Glib::ustring msg_;
|
Glib::ustring msg_;
|
||||||
|
@ -125,6 +125,7 @@ int Preferences::getThemeRowNumber(Glib::ustring& longThemeFName)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -742,6 +743,7 @@ Gtk::Widget* Preferences::getColorManagementPanel ()
|
|||||||
monProfile->set_active (0);
|
monProfile->set_active (0);
|
||||||
|
|
||||||
const std::vector<Glib::ustring> profiles = rtengine::ICCStore::getInstance ()->getProfiles (rtengine::ICCStore::ProfileType::MONITOR);
|
const std::vector<Glib::ustring> profiles = rtengine::ICCStore::getInstance ()->getProfiles (rtengine::ICCStore::ProfileType::MONITOR);
|
||||||
|
|
||||||
for (const auto profile : profiles) {
|
for (const auto profile : profiles) {
|
||||||
if (profile.find ("file:") != 0) {
|
if (profile.find ("file:") != 0) {
|
||||||
monProfile->append (profile);
|
monProfile->append (profile);
|
||||||
@ -811,8 +813,10 @@ Gtk::Widget* Preferences::getColorManagementPanel ()
|
|||||||
prtProfile->set_active (0);
|
prtProfile->set_active (0);
|
||||||
|
|
||||||
const std::vector<Glib::ustring> prtprofiles = rtengine::ICCStore::getInstance ()->getProfiles (rtengine::ICCStore::ProfileType::PRINTER);
|
const std::vector<Glib::ustring> prtprofiles = rtengine::ICCStore::getInstance ()->getProfiles (rtengine::ICCStore::ProfileType::PRINTER);
|
||||||
for (const auto prtprofile : prtprofiles)
|
|
||||||
|
for (const auto prtprofile : prtprofiles) {
|
||||||
prtProfile->append (prtprofile);
|
prtProfile->append (prtprofile);
|
||||||
|
}
|
||||||
|
|
||||||
// same order as the enum
|
// same order as the enum
|
||||||
prtIntent->append (M ("PREFERENCES_INTENT_PERCEPTUAL"));
|
prtIntent->append (M ("PREFERENCES_INTENT_PERCEPTUAL"));
|
||||||
@ -1042,6 +1046,7 @@ Gtk::Widget* Preferences::getGeneralPanel ()
|
|||||||
fontButton = Gtk::manage ( new Gtk::FontButton ());
|
fontButton = Gtk::manage ( new Gtk::FontButton ());
|
||||||
setExpandAlignProperties (fontButton, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE);
|
setExpandAlignProperties (fontButton, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE);
|
||||||
fontButton->set_use_size (true);
|
fontButton->set_use_size (true);
|
||||||
|
|
||||||
if (options.fontFamily == "default") {
|
if (options.fontFamily == "default") {
|
||||||
fontButton->set_font_name (Glib::ustring::compose ("%1 %2", initialFontFamily, initialFontSize));
|
fontButton->set_font_name (Glib::ustring::compose ("%1 %2", initialFontFamily, initialFontSize));
|
||||||
} else {
|
} else {
|
||||||
@ -1056,6 +1061,7 @@ Gtk::Widget* Preferences::getGeneralPanel ()
|
|||||||
colorPickerFontButton = Gtk::manage ( new Gtk::FontButton ());
|
colorPickerFontButton = Gtk::manage ( new Gtk::FontButton ());
|
||||||
setExpandAlignProperties (fontButton, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE);
|
setExpandAlignProperties (fontButton, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE);
|
||||||
colorPickerFontButton->set_use_size (true);
|
colorPickerFontButton->set_use_size (true);
|
||||||
|
|
||||||
if (options.fontFamily == "default") {
|
if (options.fontFamily == "default") {
|
||||||
colorPickerFontButton->set_font_name (Glib::ustring::compose ("%1 %2", initialFontFamily, initialFontSize));
|
colorPickerFontButton->set_font_name (Glib::ustring::compose ("%1 %2", initialFontFamily, initialFontSize));
|
||||||
} else {
|
} else {
|
||||||
@ -1530,23 +1536,27 @@ void Preferences::parseThemeDir (Glib::ustring dirname)
|
|||||||
|
|
||||||
if (!minMinor.empty()) {
|
if (!minMinor.empty()) {
|
||||||
guint64 minMinorVal = g_ascii_strtoll (minMinor.c_str(), 0, 0);
|
guint64 minMinorVal = g_ascii_strtoll (minMinor.c_str(), 0, 0);
|
||||||
|
|
||||||
if ((guint64)GTK_MINOR_VERSION >= minMinorVal) {
|
if ((guint64)GTK_MINOR_VERSION >= minMinorVal) {
|
||||||
keepIt = true;
|
keepIt = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!maxMinor.empty()) {
|
if (!maxMinor.empty()) {
|
||||||
guint64 maxMinorVal = g_ascii_strtoll (maxMinor.c_str(), 0, 0);
|
guint64 maxMinorVal = g_ascii_strtoll (maxMinor.c_str(), 0, 0);
|
||||||
|
|
||||||
if ((guint64)GTK_MINOR_VERSION <= maxMinorVal) {
|
if ((guint64)GTK_MINOR_VERSION <= maxMinorVal) {
|
||||||
keepIt = true;
|
keepIt = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (keepIt) {
|
if (keepIt) {
|
||||||
themeFNames.push_back (ThemeFilename (matchInfo.fetch (1), sname.substr (0, sname.size() - 4)));
|
themeFNames.push_back (ThemeFilename (matchInfo.fetch (1), sname.substr (0, sname.size() - 4)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::sort(themeFNames.begin(), themeFNames.end(), [] (const ThemeFilename& firstDir, const ThemeFilename& secondDir)
|
|
||||||
{
|
std::sort (themeFNames.begin(), themeFNames.end(), [] (const ThemeFilename & firstDir, const ThemeFilename & secondDir) {
|
||||||
return firstDir.longFName < secondDir.longFName;
|
return firstDir.longFName < secondDir.longFName;
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1600,12 +1610,14 @@ void Preferences::storePreferences ()
|
|||||||
moptions.navGuideBrush[3] = butNavGuideCol->get_alpha() / 65535.0;
|
moptions.navGuideBrush[3] = butNavGuideCol->get_alpha() / 65535.0;
|
||||||
|
|
||||||
Pango::FontDescription fd (fontButton->get_font_name());
|
Pango::FontDescription fd (fontButton->get_font_name());
|
||||||
|
|
||||||
if (newFont) {
|
if (newFont) {
|
||||||
moptions.fontFamily = fd.get_family();
|
moptions.fontFamily = fd.get_family();
|
||||||
moptions.fontSize = fd.get_size() / Pango::SCALE;
|
moptions.fontSize = fd.get_size() / Pango::SCALE;
|
||||||
}
|
}
|
||||||
|
|
||||||
Pango::FontDescription cpfd (colorPickerFontButton->get_font_name());
|
Pango::FontDescription cpfd (colorPickerFontButton->get_font_name());
|
||||||
|
|
||||||
if (newCPFont) {
|
if (newCPFont) {
|
||||||
moptions.CPFontFamily = cpfd.get_family();
|
moptions.CPFontFamily = cpfd.get_family();
|
||||||
moptions.CPFontSize = cpfd.get_size() / Pango::SCALE;
|
moptions.CPFontSize = cpfd.get_size() / Pango::SCALE;
|
||||||
@ -1646,38 +1658,47 @@ void Preferences::storePreferences ()
|
|||||||
} else {
|
} else {
|
||||||
moptions.rtSettings.printerProfile = prtProfile->get_active_text ();
|
moptions.rtSettings.printerProfile = prtProfile->get_active_text ();
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (prtIntent->get_active_row_number ()) {
|
switch (prtIntent->get_active_row_number ()) {
|
||||||
default:
|
default:
|
||||||
case 0:
|
case 0:
|
||||||
moptions.rtSettings.printerIntent = rtengine::RI_PERCEPTUAL;
|
moptions.rtSettings.printerIntent = rtengine::RI_PERCEPTUAL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
moptions.rtSettings.printerIntent = rtengine::RI_RELATIVE;
|
moptions.rtSettings.printerIntent = rtengine::RI_RELATIVE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
moptions.rtSettings.printerIntent = rtengine::RI_ABSOLUTE;
|
moptions.rtSettings.printerIntent = rtengine::RI_ABSOLUTE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
moptions.rtSettings.printerBPC = prtBPC->get_active ();
|
moptions.rtSettings.printerBPC = prtBPC->get_active ();
|
||||||
|
|
||||||
#if !defined(__APPLE__) // monitor profile not supported on apple
|
#if !defined(__APPLE__) // monitor profile not supported on apple
|
||||||
|
|
||||||
if (!monProfile->get_active_row_number()) {
|
if (!monProfile->get_active_row_number()) {
|
||||||
moptions.rtSettings.monitorProfile = "";
|
moptions.rtSettings.monitorProfile = "";
|
||||||
} else {
|
} else {
|
||||||
moptions.rtSettings.monitorProfile = monProfile->get_active_text ();
|
moptions.rtSettings.monitorProfile = monProfile->get_active_text ();
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (monIntent->get_active_row_number ()) {
|
switch (monIntent->get_active_row_number ()) {
|
||||||
default:
|
default:
|
||||||
case 0:
|
case 0:
|
||||||
moptions.rtSettings.monitorIntent = rtengine::RI_PERCEPTUAL;
|
moptions.rtSettings.monitorIntent = rtengine::RI_PERCEPTUAL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
moptions.rtSettings.monitorIntent = rtengine::RI_RELATIVE;
|
moptions.rtSettings.monitorIntent = rtengine::RI_RELATIVE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
moptions.rtSettings.monitorIntent = rtengine::RI_ABSOLUTE;
|
moptions.rtSettings.monitorIntent = rtengine::RI_ABSOLUTE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
moptions.rtSettings.monitorBPC = monBPC->get_active ();
|
moptions.rtSettings.monitorBPC = monBPC->get_active ();
|
||||||
//#if defined(WIN32)
|
//#if defined(WIN32)
|
||||||
moptions.rtSettings.autoMonitorProfile = cbAutoMonProfile->get_active ();
|
moptions.rtSettings.autoMonitorProfile = cbAutoMonProfile->get_active ();
|
||||||
@ -1799,34 +1820,42 @@ void Preferences::fillPreferences ()
|
|||||||
ctiffserialize->set_active (moptions.serializeTiffRead);
|
ctiffserialize->set_active (moptions.serializeTiffRead);
|
||||||
|
|
||||||
setActiveTextOrIndex (*prtProfile, moptions.rtSettings.printerProfile, 0);
|
setActiveTextOrIndex (*prtProfile, moptions.rtSettings.printerProfile, 0);
|
||||||
|
|
||||||
switch (moptions.rtSettings.printerIntent) {
|
switch (moptions.rtSettings.printerIntent) {
|
||||||
default:
|
default:
|
||||||
case rtengine::RI_PERCEPTUAL:
|
case rtengine::RI_PERCEPTUAL:
|
||||||
prtIntent->set_active (0);
|
prtIntent->set_active (0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case rtengine::RI_RELATIVE:
|
case rtengine::RI_RELATIVE:
|
||||||
prtIntent->set_active (1);
|
prtIntent->set_active (1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case rtengine::RI_ABSOLUTE:
|
case rtengine::RI_ABSOLUTE:
|
||||||
prtIntent->set_active (2);
|
prtIntent->set_active (2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
prtBPC->set_active (moptions.rtSettings.printerBPC);
|
prtBPC->set_active (moptions.rtSettings.printerBPC);
|
||||||
|
|
||||||
#if !defined(__APPLE__) // monitor profile not supported on apple
|
#if !defined(__APPLE__) // monitor profile not supported on apple
|
||||||
setActiveTextOrIndex (*monProfile, moptions.rtSettings.monitorProfile, 0);
|
setActiveTextOrIndex (*monProfile, moptions.rtSettings.monitorProfile, 0);
|
||||||
|
|
||||||
switch (moptions.rtSettings.monitorIntent) {
|
switch (moptions.rtSettings.monitorIntent) {
|
||||||
default:
|
default:
|
||||||
case rtengine::RI_PERCEPTUAL:
|
case rtengine::RI_PERCEPTUAL:
|
||||||
monIntent->set_active (0);
|
monIntent->set_active (0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case rtengine::RI_RELATIVE:
|
case rtengine::RI_RELATIVE:
|
||||||
monIntent->set_active (1);
|
monIntent->set_active (1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case rtengine::RI_ABSOLUTE:
|
case rtengine::RI_ABSOLUTE:
|
||||||
monIntent->set_active (2);
|
monIntent->set_active (2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
monBPC->set_active (moptions.rtSettings.monitorBPC);
|
monBPC->set_active (moptions.rtSettings.monitorBPC);
|
||||||
//#if defined(WIN32)
|
//#if defined(WIN32)
|
||||||
cbAutoMonProfile->set_active (moptions.rtSettings.autoMonitorProfile);
|
cbAutoMonProfile->set_active (moptions.rtSettings.autoMonitorProfile);
|
||||||
@ -2066,12 +2095,14 @@ void Preferences::okPressed ()
|
|||||||
workflowUpdate();
|
workflowUpdate();
|
||||||
options.copyFrom (&moptions);
|
options.copyFrom (&moptions);
|
||||||
options.filterOutParsedExtensions();
|
options.filterOutParsedExtensions();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Options::save ();
|
Options::save ();
|
||||||
} catch (Options::Error &e) {
|
} catch (Options::Error &e) {
|
||||||
Gtk::MessageDialog msgd (getToplevelWindow (this), e.get_msg(), true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true);
|
Gtk::MessageDialog msgd (getToplevelWindow (this), e.get_msg(), true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true);
|
||||||
msgd.run();
|
msgd.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
dynProfilePanel->save();
|
dynProfilePanel->save();
|
||||||
hide ();
|
hide ();
|
||||||
}
|
}
|
||||||
@ -2087,6 +2118,7 @@ void Preferences::cancelPressed ()
|
|||||||
|
|
||||||
// set the initial font back
|
// set the initial font back
|
||||||
Pango::FontDescription fd (fontButton->get_font_name());
|
Pango::FontDescription fd (fontButton->get_font_name());
|
||||||
|
|
||||||
if (fd.get_family() != options.fontFamily && (fd.get_size() / Pango::SCALE) != options.fontSize) {
|
if (fd.get_family() != options.fontFamily && (fd.get_size() / Pango::SCALE) != options.fontSize) {
|
||||||
if (options.fontFamily == "default") {
|
if (options.fontFamily == "default") {
|
||||||
switchFontTo (initialFontFamily, initialFontSize);
|
switchFontTo (initialFontFamily, initialFontSize);
|
||||||
@ -2221,8 +2253,9 @@ void Preferences::iccDirChanged ()
|
|||||||
|
|
||||||
monProfile->append (M ("PREFERENCES_PROFILE_NONE"));
|
monProfile->append (M ("PREFERENCES_PROFILE_NONE"));
|
||||||
|
|
||||||
for (const auto& profile : profiles)
|
for (const auto& profile : profiles) {
|
||||||
monProfile->append (profile);
|
monProfile->append (profile);
|
||||||
|
}
|
||||||
|
|
||||||
setActiveTextOrIndex (*monProfile, currentSelection, 0);
|
setActiveTextOrIndex (*monProfile, currentSelection, 0);
|
||||||
}
|
}
|
||||||
@ -2324,8 +2357,7 @@ void Preferences::switchFontTo(const Glib::ustring &newFontFamily, const int new
|
|||||||
} catch (...) {
|
} catch (...) {
|
||||||
printf ("Error: Can't find the font named \"%s\"\n", newFontFamily.c_str());
|
printf ("Error: Can't find the font named \"%s\"\n", newFontFamily.c_str());
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
if (fontcss) {
|
if (fontcss) {
|
||||||
fontcss = Gtk::CssProvider::create();
|
fontcss = Gtk::CssProvider::create();
|
||||||
Glib::RefPtr<Gdk::Screen> screen = Gdk::Screen::get_default();
|
Glib::RefPtr<Gdk::Screen> screen = Gdk::Screen::get_default();
|
||||||
@ -2368,8 +2400,7 @@ void Preferences::workflowUpdate ()
|
|||||||
|
|
||||||
if ( moptions.rtSettings.printerProfile != options.rtSettings.printerProfile
|
if ( moptions.rtSettings.printerProfile != options.rtSettings.printerProfile
|
||||||
|| moptions.rtSettings.printerBPC != options.rtSettings.printerBPC
|
|| moptions.rtSettings.printerBPC != options.rtSettings.printerBPC
|
||||||
||moptions.rtSettings.printerIntent != options.rtSettings.printerIntent)
|
|| moptions.rtSettings.printerIntent != options.rtSettings.printerIntent) {
|
||||||
{
|
|
||||||
// Update the position of the Histogram
|
// Update the position of the Histogram
|
||||||
parent->updateProfiles (moptions.rtSettings.printerProfile, moptions.rtSettings.printerIntent, moptions.rtSettings.printerBPC);
|
parent->updateProfiles (moptions.rtSettings.printerProfile, moptions.rtSettings.printerIntent, moptions.rtSettings.printerBPC);
|
||||||
}
|
}
|
||||||
@ -2401,12 +2432,16 @@ void Preferences::delExtPressed ()
|
|||||||
void Preferences::moveExtUpPressed ()
|
void Preferences::moveExtUpPressed ()
|
||||||
{
|
{
|
||||||
const Glib::RefPtr<Gtk::TreeSelection> selection = extensions->get_selection ();
|
const Glib::RefPtr<Gtk::TreeSelection> selection = extensions->get_selection ();
|
||||||
if (!selection)
|
|
||||||
|
if (!selection) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const Gtk::TreeModel::iterator selected = selection->get_selected ();
|
const Gtk::TreeModel::iterator selected = selection->get_selected ();
|
||||||
if (!selected || selected == extensionModel->children ().begin ())
|
|
||||||
|
if (!selected || selected == extensionModel->children ().begin ()) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Gtk::TreeModel::iterator previous = selected;
|
Gtk::TreeModel::iterator previous = selected;
|
||||||
--previous;
|
--previous;
|
||||||
@ -2416,17 +2451,23 @@ void Preferences::moveExtUpPressed ()
|
|||||||
void Preferences::moveExtDownPressed ()
|
void Preferences::moveExtDownPressed ()
|
||||||
{
|
{
|
||||||
const Glib::RefPtr<Gtk::TreeSelection> selection = extensions->get_selection ();
|
const Glib::RefPtr<Gtk::TreeSelection> selection = extensions->get_selection ();
|
||||||
if (!selection)
|
|
||||||
|
if (!selection) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const Gtk::TreeModel::iterator selected = selection->get_selected ();
|
const Gtk::TreeModel::iterator selected = selection->get_selected ();
|
||||||
if (!selected)
|
|
||||||
|
if (!selected) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Gtk::TreeModel::iterator next = selected;
|
Gtk::TreeModel::iterator next = selected;
|
||||||
if (++next)
|
|
||||||
|
if (++next) {
|
||||||
extensionModel->iter_swap (selected, next);
|
extensionModel->iter_swap (selected, next);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Preferences::clearProfilesPressed ()
|
void Preferences::clearProfilesPressed ()
|
||||||
{
|
{
|
||||||
|
@ -130,12 +130,14 @@ RTWindow::RTWindow ()
|
|||||||
|
|
||||||
Gdk::Rectangle lMonitorRect;
|
Gdk::Rectangle lMonitorRect;
|
||||||
get_screen()->get_monitor_geometry (std::min (options.windowMonitor, Gdk::Screen::get_default()->get_n_monitors() - 1), lMonitorRect);
|
get_screen()->get_monitor_geometry (std::min (options.windowMonitor, Gdk::Screen::get_default()->get_n_monitors() - 1), lMonitorRect);
|
||||||
|
|
||||||
if (options.windowMaximized) {
|
if (options.windowMaximized) {
|
||||||
move (lMonitorRect.get_x(), lMonitorRect.get_y());
|
move (lMonitorRect.get_x(), lMonitorRect.get_y());
|
||||||
maximize();
|
maximize();
|
||||||
} else {
|
} else {
|
||||||
unmaximize();
|
unmaximize();
|
||||||
resize (options.windowWidth, options.windowHeight);
|
resize (options.windowWidth, options.windowHeight);
|
||||||
|
|
||||||
if (options.windowX <= lMonitorRect.get_x() + lMonitorRect.get_width() && options.windowY <= lMonitorRect.get_y() + lMonitorRect.get_height()) {
|
if (options.windowX <= lMonitorRect.get_x() + lMonitorRect.get_width() && options.windowY <= lMonitorRect.get_y() + lMonitorRect.get_height()) {
|
||||||
move (options.windowX, options.windowY);
|
move (options.windowX, options.windowY);
|
||||||
} else {
|
} else {
|
||||||
@ -273,6 +275,7 @@ RTWindow::RTWindow ()
|
|||||||
|
|
||||||
if (!argv1.empty() && !remote) {
|
if (!argv1.empty() && !remote) {
|
||||||
Thumbnail* thm = cacheMgr->getEntry (argv1);
|
Thumbnail* thm = cacheMgr->getEntry (argv1);
|
||||||
|
|
||||||
if (thm) {
|
if (thm) {
|
||||||
fpanel->fileCatalog->openRequested ({thm});
|
fpanel->fileCatalog->openRequested ({thm});
|
||||||
}
|
}
|
||||||
@ -316,6 +319,7 @@ void RTWindow::on_realize ()
|
|||||||
std::regex pat ("(^[0-9.]+).*");
|
std::regex pat ("(^[0-9.]+).*");
|
||||||
std::smatch sm;
|
std::smatch sm;
|
||||||
std::vector<std::string> vMajor;
|
std::vector<std::string> vMajor;
|
||||||
|
|
||||||
for (const auto &v : vs) {
|
for (const auto &v : vs) {
|
||||||
if (std::regex_match (v, sm, pat)) {
|
if (std::regex_match (v, sm, pat)) {
|
||||||
if (sm.size() == 2) {
|
if (sm.size() == 2) {
|
||||||
@ -361,6 +365,7 @@ bool RTWindow::on_window_state_event(GdkEventWindowState* event)
|
|||||||
if (event->changed_mask & GDK_WINDOW_STATE_MAXIMIZED) {
|
if (event->changed_mask & GDK_WINDOW_STATE_MAXIMIZED) {
|
||||||
options.windowMaximized = event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED;
|
options.windowMaximized = event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Gtk::Widget::on_window_state_event (event);
|
return Gtk::Widget::on_window_state_event (event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -679,6 +684,7 @@ bool RTWindow::on_delete_event(GdkEventAny* event)
|
|||||||
Gtk::MessageDialog msgd (getToplevelWindow (this), e.get_msg(), true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true);
|
Gtk::MessageDialog msgd (getToplevelWindow (this), e.get_msg(), true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true);
|
||||||
msgd.run();
|
msgd.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
hide();
|
hide();
|
||||||
|
|
||||||
on_delete_has_run = true;
|
on_delete_has_run = true;
|
||||||
@ -692,9 +698,11 @@ void RTWindow::showPreferences ()
|
|||||||
delete pref;
|
delete pref;
|
||||||
|
|
||||||
fpanel->optionsChanged ();
|
fpanel->optionsChanged ();
|
||||||
|
|
||||||
if (epanel) {
|
if (epanel) {
|
||||||
epanel->defaultMonitorProfileChanged (options.rtSettings.monitorProfile, options.rtSettings.autoMonitorProfile);
|
epanel->defaultMonitorProfileChanged (options.rtSettings.monitorProfile, options.rtSettings.autoMonitorProfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto &p : epanels) {
|
for (const auto &p : epanels) {
|
||||||
p.second->defaultMonitorProfileChanged (options.rtSettings.monitorProfile, options.rtSettings.autoMonitorProfile);
|
p.second->defaultMonitorProfileChanged (options.rtSettings.monitorProfile, options.rtSettings.autoMonitorProfile);
|
||||||
}
|
}
|
||||||
@ -800,6 +808,7 @@ void RTWindow::updateProfiles(const Glib::ustring &printerProfile, rtengine::Ren
|
|||||||
void RTWindow::updateTPVScrollbar (bool hide)
|
void RTWindow::updateTPVScrollbar (bool hide)
|
||||||
{
|
{
|
||||||
fpanel->updateTPVScrollbar (hide);
|
fpanel->updateTPVScrollbar (hide);
|
||||||
|
|
||||||
if (epanel) {
|
if (epanel) {
|
||||||
epanel->updateTPVScrollbar (hide);
|
epanel->updateTPVScrollbar (hide);
|
||||||
}
|
}
|
||||||
@ -812,6 +821,7 @@ void RTWindow::updateTPVScrollbar (bool hide)
|
|||||||
void RTWindow::updateTabsUsesIcons (bool useIcons)
|
void RTWindow::updateTabsUsesIcons (bool useIcons)
|
||||||
{
|
{
|
||||||
fpanel->updateTabsUsesIcons (useIcons);
|
fpanel->updateTabsUsesIcons (useIcons);
|
||||||
|
|
||||||
if (epanel) {
|
if (epanel) {
|
||||||
epanel->updateTabsUsesIcons (useIcons);
|
epanel->updateTabsUsesIcons (useIcons);
|
||||||
}
|
}
|
||||||
@ -836,6 +846,7 @@ void RTWindow::updateHistogramPosition (int oldPosition, int newPosition)
|
|||||||
if (epanel) {
|
if (epanel) {
|
||||||
epanel->updateHistogramPosition (oldPosition, newPosition);
|
epanel->updateHistogramPosition (oldPosition, newPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto panel : epanels) {
|
for (auto panel : epanels) {
|
||||||
panel.second->updateHistogramPosition (oldPosition, newPosition);
|
panel.second->updateHistogramPosition (oldPosition, newPosition);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user