From 2a78b8ce4181656245b443f5ea957a8c4415be0d Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Wed, 7 Dec 2011 12:04:02 -0500 Subject: [PATCH] Added a startup warning message about wrong locale (causing surrogate-type-thing crashes on Linux). --- qt/base/app.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qt/base/app.py b/qt/base/app.py index 4f20aa15..d33d531a 100644 --- a/qt/base/app.py +++ b/qt/base/app.py @@ -185,6 +185,12 @@ class DupeGuru(QObject): #--- Events def finishedLaunching(self): self.model.initial_registration_setup() + if sys.getfilesystemencoding() == 'ascii': + # No need to localize this, it's a debugging message. + msg = "Something is wrong with the way your system locale is set. If the files you're "\ + "scanning have accented letters, you'll probably get a crash. It is advised that "\ + "you set your system locale properly." + QMessageBox.warning(self.directories_dialog, "Wrong Locale", msg) def application_will_terminate(self): self.willSavePrefs.emit()