Special character handling patch from Oduis backported from Defloat
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include <addsetids.h>
|
||||
#include <dfmanager.h>
|
||||
#include <sstream>
|
||||
#include <safegtk.h>
|
||||
|
||||
extern Options options;
|
||||
extern Glib::ustring argv0;
|
||||
@@ -719,7 +720,7 @@ void Preferences::parseDir (Glib::ustring dirname, std::vector<Glib::ustring>& i
|
||||
Glib::ustring fname = dirname + *i;
|
||||
Glib::ustring sname = *i;
|
||||
// ignore directories
|
||||
if (!Glib::file_test (fname, Glib::FILE_TEST_IS_DIR) && sname.size() >= ext.size() && sname.substr (sname.size()-ext.size(), ext.size()).casefold() == ext)
|
||||
if (!safe_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()));
|
||||
}
|
||||
delete dir;
|
||||
@@ -827,7 +828,7 @@ void Preferences::fillPreferences () {
|
||||
rprofiles->set_active_text (moptions.defProfRaw);
|
||||
iprofiles->set_active_text (moptions.defProfImg);
|
||||
dateformat->set_text (moptions.dateFormat);
|
||||
if (Glib::file_test (moptions.rtSettings.monitorProfile, Glib::FILE_TEST_EXISTS))
|
||||
if (safe_file_test (moptions.rtSettings.monitorProfile, Glib::FILE_TEST_EXISTS))
|
||||
monProfile->set_filename (moptions.rtSettings.monitorProfile);
|
||||
if (moptions.rtSettings.monitorProfile.empty())
|
||||
monProfile->set_current_folder (moptions.rtSettings.iccDirectory);
|
||||
@@ -855,13 +856,13 @@ void Preferences::fillPreferences () {
|
||||
edOther->set_active (moptions.editorToSendTo==3);
|
||||
#ifdef _WIN32
|
||||
edPS->set_active (moptions.editorToSendTo==2);
|
||||
if (Glib::file_test (moptions.gimpDir, Glib::FILE_TEST_IS_DIR))
|
||||
if (safe_file_test (moptions.gimpDir, Glib::FILE_TEST_IS_DIR))
|
||||
gimpDir->set_filename (moptions.gimpDir);
|
||||
if (Glib::file_test (moptions.psDir, Glib::FILE_TEST_IS_DIR))
|
||||
if (safe_file_test (moptions.psDir, Glib::FILE_TEST_IS_DIR))
|
||||
psDir->set_filename (moptions.psDir);
|
||||
#elif defined __APPLE__
|
||||
edPS->set_active (moptions.editorToSendTo==2);
|
||||
if (Glib::file_test (moptions.psDir, Glib::FILE_TEST_IS_DIR))
|
||||
if (safe_file_test (moptions.psDir, Glib::FILE_TEST_IS_DIR))
|
||||
psDir->set_filename (moptions.psDir);
|
||||
#endif
|
||||
editorToSendTo->set_text (moptions.customEditorProg);
|
||||
|
Reference in New Issue
Block a user