Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/gui/lessonplanwidget.py
diff options
context:
space:
mode:
authorAntoine van Gelder <antoine@g7.org.za>2007-10-29 09:21:06 (GMT)
committer Antoine van Gelder <antoine@g7.org.za>2007-10-29 09:21:06 (GMT)
commit420f73b64979f4a695c780f080c8873229260f27 (patch)
tree82aca565218aaf445ffb0f556c5f5c91024d119c /gui/lessonplanwidget.py
parent05d7e0283b978bb4836a1ddf8833b039ae55f130 (diff)
JokeMachine-3.xo
* Feature: Put alerts up when joke submitted and approved over mesh * Feature: Put alert up advising patience when joining a shared jokebook * Feature: Made Lesson Plans button work * Feature: Safe fallback for builds without sugar.alert * Feature: Hooked LanguageCombo up * i18n: Created (a rough!) Afrikaans translation * Fixed: Prepended Cover on preview * Fixed: Don't hardcode JokeEditor delete button position * Fixed: On read jokebook & empty -> "Edit My Jokes" -> Go to edit my jokes tab * Updated :Mesh code for dbus tubes changes
Diffstat (limited to 'gui/lessonplanwidget.py')
-rw-r--r--gui/lessonplanwidget.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/gui/lessonplanwidget.py b/gui/lessonplanwidget.py
index b9a1a62..5b6e021 100644
--- a/gui/lessonplanwidget.py
+++ b/gui/lessonplanwidget.py
@@ -13,8 +13,10 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
+import os
import locale
import gtk
+import logging
from abiword import Canvas as AbiCanvas
@@ -42,6 +44,10 @@ class LessonPlanWidget(gtk.Notebook):
lesson -- string, name of lesson
"""
code, encoding = locale.getdefaultlocale()
+ logging.debug('Locale code: %r' % code)
+ if code is None or encoding is None:
+ locale.setlocale(locale.LC_ALL, 'en_US')
+ code, encoding = locale.getlocale()
canvas = AbiCanvas()
canvas.show()
files = map(lambda x: os.path.join(path, '%s.abw' % x),
@@ -57,3 +63,5 @@ class LessonPlanWidget(gtk.Notebook):
canvas.zoom_width()
canvas.set_show_margin(False)
self.append_page(canvas, gtk.Label(name))
+
+