Merge branch 'master' into 'gtk3'

This commit is contained in:
Adam Reichold
2016-03-05 09:21:34 +01:00
119 changed files with 3006 additions and 3007 deletions

View File

@@ -25,7 +25,6 @@
#include "../rtengine/dfmanager.h"
#include "../rtengine/ffmanager.h"
#include <sstream>
#include "../rtengine/safegtk.h"
#include "rtimage.h"
#ifdef _OPENMP
#include <omp.h>
@@ -1352,7 +1351,7 @@ void Preferences::parseDir (Glib::ustring dirname, std::vector<Glib::ustring>& i
Glib::ustring sname = *i;
// ignore directories
if (!safe_file_test (fname, Glib::FILE_TEST_IS_DIR) && sname.size() >= ext.size() && sname.substr (sname.size() - ext.size(), ext.size()).casefold() == ext) {
if (!Glib::file_test (fname, Glib::FILE_TEST_IS_DIR) && sname.size() >= ext.size() && sname.substr (sname.size() - ext.size(), ext.size()).casefold() == ext) {
items.push_back (sname.substr(0, sname.size() - ext.size()));
}
}
@@ -1640,18 +1639,18 @@ void Preferences::fillPreferences ()
#ifdef WIN32
edPS->set_active (moptions.editorToSendTo == 2);
if (safe_file_test (moptions.gimpDir, Glib::FILE_TEST_IS_DIR)) {
if (Glib::file_test (moptions.gimpDir, Glib::FILE_TEST_IS_DIR)) {
gimpDir->set_current_folder (moptions.gimpDir);
}
if (safe_file_test (moptions.psDir, Glib::FILE_TEST_IS_DIR)) {
if (Glib::file_test (moptions.psDir, Glib::FILE_TEST_IS_DIR)) {
psDir->set_current_folder (moptions.psDir);
}
#elif defined __APPLE__
edPS->set_active (moptions.editorToSendTo == 2);
if (safe_file_test (moptions.psDir, Glib::FILE_TEST_IS_DIR)) {
if (Glib::file_test (moptions.psDir, Glib::FILE_TEST_IS_DIR)) {
psDir->set_current_folder (moptions.psDir);
}
@@ -1940,18 +1939,17 @@ void Preferences::bundledProfilesChanged ()
void Preferences::iccDirChanged ()
{
const Glib::ustring currentSelection = monProfile->get_active_text ();
const auto currentSelection = monProfile->get_active_text ();
const auto profiles = rtengine::ICCStore::getInstance ()->getProfilesFromDir (iccDir->get_filename ());
monProfile->clear();
monProfile->remove_all();
monProfile->append (M("PREFERENCES_PROFILE_NONE"));
monProfile->set_active (0);
const std::vector<Glib::ustring> profiles = rtengine::ICCStore::getInstance ()->getProfilesFromDir (iccDir->get_filename ());
for (std::vector<Glib::ustring>::const_iterator profile = profiles.begin (); profile != profiles.end (); ++profile)
monProfile->append (*profile);
for (const auto& profile : profiles)
monProfile->append (profile);
monProfile->set_active_text (currentSelection);
setActiveTextOrIndex(*monProfile, currentSelection, 0);
}
void Preferences::storeCurrentValue()