Skip to content

Commit

Permalink
tooledit: throw exeption when locale not set
Browse files Browse the repository at this point in the history
  • Loading branch information
hansu committed Jul 28, 2024
1 parent 5e2284b commit fae0e67
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,5 @@ docs/help/hu/*
docs/help/nb/*
docs/help/vi/*
docs/help/zh_CN/*
configs/**/*.tbl.bak
configs/**/halshow.preferences
4 changes: 4 additions & 0 deletions lib/python/gladevcp/tooledit_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,10 @@ def save(self,widget):
self.warning_dialog(line_number)
return

if(locale.getlocale(locale.LC_NUMERIC)[0] is None):
raise ExceptionMessage("\n\n"+_("Something wrong with the locale settings. Will not save the tool table."))
return

shutil.copy(self.toolfile, self.toolfile + ".bak")
file = open(self.toolfile, "w")
#print self.toolfile
Expand Down

0 comments on commit fae0e67

Please sign in to comment.