Skip to content

Commit fae0e67

Browse files
committed
tooledit: throw exeption when locale not set
1 parent 5e2284b commit fae0e67

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,5 @@ docs/help/hu/*
5959
docs/help/nb/*
6060
docs/help/vi/*
6161
docs/help/zh_CN/*
62+
configs/**/*.tbl.bak
63+
configs/**/halshow.preferences

lib/python/gladevcp/tooledit_widget.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,10 @@ def save(self,widget):
331331
self.warning_dialog(line_number)
332332
return
333333

334+
if(locale.getlocale(locale.LC_NUMERIC)[0] is None):
335+
raise ExceptionMessage("\n\n"+_("Something wrong with the locale settings. Will not save the tool table."))
336+
return
337+
334338
shutil.copy(self.toolfile, self.toolfile + ".bak")
335339
file = open(self.toolfile, "w")
336340
#print self.toolfile

0 commit comments

Comments
 (0)