Added a startup warning message about wrong locale (causing surrogate-type-thing crashes on Linux).

This commit is contained in:
Virgil Dupras 2011-12-07 12:04:02 -05:00
parent 2301082307
commit 2a78b8ce41
1 changed files with 6 additions and 0 deletions

View File

@ -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()