diff --git a/pyfpdb/GuiPlayerStats.py b/pyfpdb/GuiPlayerStats.py index 08207454..73cb981f 100644 --- a/pyfpdb/GuiPlayerStats.py +++ b/pyfpdb/GuiPlayerStats.py @@ -27,9 +27,10 @@ import Filters import FpdbSQLQueries class GuiPlayerStats (threading.Thread): - def __init__(self, config, querylist, debug=True): + def __init__(self, config, querylist, mainwin, debug=True): self.debug=debug self.conf=config + self.main_window=mainwin self.MYSQL_INNODB = 2 self.PGSQL = 3 self.SQLITE = 4 diff --git a/pyfpdb/fpdb.py b/pyfpdb/fpdb.py index 7fcf75ee..f310e255 100755 --- a/pyfpdb/fpdb.py +++ b/pyfpdb/fpdb.py @@ -331,7 +331,7 @@ class fpdb: #end def tab_bulk_import def tab_player_stats(self, widget, data): - new_ps_thread=GuiPlayerStats.GuiPlayerStats(self.config, self.querydict) + new_ps_thread=GuiPlayerStats.GuiPlayerStats(self.config, self.querydict, self.window) self.threads.append(new_ps_thread) ps_tab=new_ps_thread.get_vbox() self.add_and_display_tab(ps_tab, "Player Stats") @@ -401,8 +401,8 @@ This program is licensed under the AGPL3, see docs"""+os.sep+"agpl-3.0.txt") ("/Viewers/_Graphs", "G", self.tabGraphViewer, 0, None ), ("/Viewers/Hand _Replayer (todo)", None, self.not_implemented, 0, None ), ("/Viewers/Player _Details (todo)", None, self.not_implemented, 0, None ), - ("/Viewers/_Player Stats (tabulated view)", None, self.tab_player_stats, 0, None ), - ("/Viewers/Positional Stats (tabulated view)", None, self.tab_positional_stats, 0, None ), + ("/Viewers/_Player Stats (tabulated view)", "P", self.tab_player_stats, 0, None ), + ("/Viewers/P_ositional Stats (tabulated view)", "O", self.tab_positional_stats, 0, None ), ("/Viewers/Starting _Hands (todo)", None, self.not_implemented, 0, None ), ("/Viewers/_Session Replayer (todo)", None, self.not_implemented, 0, None ), ("/Viewers/Poker_table Viewer (mostly obselete)", "T", self.tab_table_viewer, 0, None ),