Signed-off-by: tribumarchal <boitemail25@aol.com>

This commit is contained in:
tribumarchal 2011-02-22 21:41:30 +01:00
parent 4b658b2e4e
commit 91a312d34c
5 changed files with 7848 additions and 3913 deletions

View File

@ -824,7 +824,7 @@ class Filters(threading.Thread):
def fillGraphOpsFrame(self, vbox):
top_hbox = gtk.HBox(False, 0)
vbox.pack_start(top_hbox, False, False, 0)
title = gtk.Label("Graphing Options:")
title = gtk.Label(_("Graphing Options:"))
title.set_alignment(xalign=0.0, yalign=0.5)
top_hbox.pack_start(title, expand=True, padding=3)
showb = gtk.Button(label="hide", stock=None, use_underline=True)
@ -836,7 +836,7 @@ class Filters(threading.Thread):
vbox.pack_start(hbox1, False, False, 0)
hbox1.show()
label = gtk.Label("Show Graph In:")
label = gtk.Label(_("Show Graph In:"))
label.set_alignment(xalign=0.0, yalign=0.5)
hbox1.pack_start(label, True, True, 0)
label.show()
@ -856,7 +856,7 @@ class Filters(threading.Thread):
vbox.pack_start(vbox1, False, False, 0)
vbox1.show()
button = gtk.CheckButton("Showdown Winnings", False)
button = gtk.CheckButton(_("Showdown Winnings"), False)
vbox1.pack_start(button, True, True, 0)
# wouldn't it be awesome if there was a way to remember the state of things like
# this and be able to set it to what it was last time?
@ -864,7 +864,7 @@ class Filters(threading.Thread):
button.connect("toggled", self.__set_graphopscheck_select, "showdown")
button.show()
button = gtk.CheckButton("Non-Showdown Winnings", False)
button = gtk.CheckButton(_("Non-Showdown Winnings"), False)
vbox1.pack_start(button, True, True, 0)
# ditto as 8 lines up :)
#button.set_active(True)

View File

@ -77,14 +77,14 @@ class GuiGraphViewer (threading.Thread):
"Dates" : True,
"GraphOps" : True,
"Groups" : False,
"Button1" : True,
"Button1" : True,
"Button2" : True
}
self.filters = Filters.Filters(self.db, self.conf, self.sql, display = filters_display)
self.filters.registerButton1Name(_("Refresh _Graph"))
self.filters.registerButton1Name(_("Refresh"))
self.filters.registerButton1Callback(self.generateGraph)
self.filters.registerButton2Name(_("_Export to File"))
self.filters.registerButton2Name(_("Export to File"))
self.filters.registerButton2Callback(self.exportGraph)
self.mainHBox = gtk.HBox(False, 0)
@ -218,9 +218,9 @@ class GuiGraphViewer (threading.Thread):
0., 500., 1000., 900., 800., 700., 600., 500.,
400., 300., 200., 100., 0., 500., 1000., 1000.])
self.ax.plot(green, color='green', label=_('Hands: %d\nProfit: $%.2f') %(len(green), green[-1]))
self.ax.plot(blue, color='blue', label=_('Showdown: $%.2f') %(blue[-1]))
self.ax.plot(red, color='red', label=_('Non-showdown: $%.2f') %(red[-1]))
self.ax.plot(green, color='green', label=(_("Hands")+(': %d\nProfit: $%.2f')) %(len(green), green[-1]))
self.ax.plot(blue, color='blue', label=(_("Showdown:")+('$%.2f')) %(blue[-1]))
self.ax.plot(red, color='red', label=(_("Non-showdown:")+(' $%.2f')) %(red[-1]))
self.graphBox.add(self.canvas)
self.canvas.show()
self.canvas.draw()
@ -228,14 +228,14 @@ class GuiGraphViewer (threading.Thread):
#TODO: Do something useful like alert user
#print "No hands returned by graph query"
else:
self.ax.set_title(_("Profit graph for ring games"+names),fontsize=12)
self.ax.set_title((_("Profit graph for ring games")+names),fontsize=12)
#Draw plot
self.ax.plot(green, color='green', label=_('Hands: %d\nProfit (%s): %.2f') %(len(green),graphops['dspin'], green[-1]))
self.ax.plot(green, color='green', label=(_("Hands")+(': %d\nProfit (%s): %.2f')) %(len(green),graphops['dspin'], green[-1]))
if graphops['showdown'] == 'ON':
self.ax.plot(blue, color='blue', label=_('Showdown (%s): %.2f') %(graphops['dspin'], blue[-1]))
self.ax.plot(blue, color='blue', label=(_("Showdown:")+(' (%s) %.2f')) %(graphops['dspin'], blue[-1]))
if graphops['nonshowdown'] == 'ON':
self.ax.plot(red, color='red', label=_('Non-showdown (%s): %.2f') %(graphops['dspin'], red[-1]))
self.ax.plot(red, color='red', label=(_("Non-showdown:")+(' (%s) %.2f')) %(graphops['dspin'], red[-1]))
if sys.version[0:3] == '2.5':
self.ax.legend(loc='upper left', shadow=True, prop=FontProperties(size='smaller'))

View File

@ -81,9 +81,9 @@ class GuiTourneyGraphViewer (threading.Thread):
}
self.filters = Filters.Filters(self.db, self.conf, self.sql, display = filters_display)
self.filters.registerButton1Name(_("Refresh _Graph"))
self.filters.registerButton1Name(_("Refresh"))
self.filters.registerButton1Callback(self.generateGraph)
self.filters.registerButton2Name(_("_Export to File"))
self.filters.registerButton2Name(_("Export to File"))
self.filters.registerButton2Callback(self.exportGraph)
self.mainHBox = gtk.HBox(False, 0)

File diff suppressed because it is too large Load Diff

Binary file not shown.