From ff2a9fcc5a5c1cefab10b75457da4d427919af92 Mon Sep 17 00:00:00 2001 From: steffen123 Date: Sat, 28 Aug 2010 22:49:59 +0200 Subject: [PATCH] move gettext import to the right place in GuiGraphViewer --- pyfpdb/GuiGraphViewer.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/pyfpdb/GuiGraphViewer.py b/pyfpdb/GuiGraphViewer.py index fe82aa44..09acb483 100644 --- a/pyfpdb/GuiGraphViewer.py +++ b/pyfpdb/GuiGraphViewer.py @@ -26,22 +26,6 @@ from time import * from datetime import datetime #import pokereval -try: - import matplotlib - matplotlib.use('GTKCairo') - from matplotlib.figure import Figure - from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas - from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar - from matplotlib.font_manager import FontProperties - from numpy import arange, cumsum - from pylab import * -except ImportError, inst: - print _("""Failed to load libs for graphing, graphing will not function. Please - install numpy and matplotlib if you want to use graphs.""") - print _("""This is of no consequence for other parts of the program, e.g. import - and HUD are NOT affected by this problem.""") - print "ImportError: %s" % inst.args - import locale lang=locale.getdefaultlocale()[0][0:2] if lang=="en": @@ -59,6 +43,22 @@ import Database import Filters import Charset +try: + import matplotlib + matplotlib.use('GTKCairo') + from matplotlib.figure import Figure + from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas + from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar + from matplotlib.font_manager import FontProperties + from numpy import arange, cumsum + from pylab import * +except ImportError, inst: + print _("""Failed to load libs for graphing, graphing will not function. Please + install numpy and matplotlib if you want to use graphs.""") + print _("""This is of no consequence for other parts of the program, e.g. import + and HUD are NOT affected by this problem.""") + print "ImportError: %s" % inst.args + class GuiGraphViewer (threading.Thread): def __init__(self, querylist, config, parent, debug=True):