Fixes issues following merge with 'dev'
- External Editor: App icon not correctly managed in RTImage - Favorite preferences: Fixes widget sizes - Other fix: With some versions of Glib/Glibmm library on MacOS, Glib::KeyFile "load_from_file" function does not raise a Glib::Error but another exception. This causes crash opening preferences panel due to missing dynamic profiles configuration
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include <glibmm/regex.h>
|
||||
#include <glibmm/miscutils.h>
|
||||
#include <glibmm/keyfile.h>
|
||||
#include <glibmm/fileutils.h>
|
||||
|
||||
#include "rtengine.h"
|
||||
#include "../rtgui/options.h"
|
||||
@@ -173,9 +174,12 @@ bool DynamicProfileRules::loadRules()
|
||||
{
|
||||
dynamicRules.clear();
|
||||
Glib::KeyFile kf;
|
||||
const Glib::ustring fileName = Glib::build_filename (Options::rtdir, "dynamicprofile.cfg");
|
||||
|
||||
try {
|
||||
if (!kf.load_from_file (Glib::build_filename (Options::rtdir, "dynamicprofile.cfg"))) {
|
||||
if (Glib::file_test(fileName, Glib::FILE_TEST_EXISTS)) {
|
||||
kf.load_from_file (fileName);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} catch (Glib::Error &e) {
|
||||
|
Reference in New Issue
Block a user