From c3a8a52543a96da703a7052b3eb946edbc020f89 Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Mon, 14 Mar 2016 22:44:44 +0200 Subject: [PATCH] Fix SelectGameDialog in the menubar. More of the fact the imports were lost and are 'tk' or 'tile'-specific. --- pysollib/tile/menubar.py | 4 +++- pysollib/tk/menubar.py | 3 +++ pysollib/ui/tktile/menubar.py | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pysollib/tile/menubar.py b/pysollib/tile/menubar.py index 59ba2d18..cbe60e06 100644 --- a/pysollib/tile/menubar.py +++ b/pysollib/tile/menubar.py @@ -42,7 +42,6 @@ from pysollib.ui.tktile.tkutil import bind, after_idle from tkwidget import MfxMessageDialog from selectgame import SelectGameDialog, SelectGameDialogWithPreview from soundoptionsdialog import SoundOptionsDialog -from selectcardset import SelectCardsetDialogWithPreview from selecttile import SelectTileDialogWithPreview from findcarddialog import connect_game_find_card_dialog, destroy_find_card_dialog from solverdialog import connect_game_solver_dialog @@ -78,6 +77,9 @@ class PysolMenubarTk(PysolMenubarTkCommon): from wizarddialog import WizardDialog return WizardDialog + def _calcSelectGameDialog(self): + return SelectGameDialog + def _calcSoundOptionsDialog(self): return SoundOptionsDialog diff --git a/pysollib/tk/menubar.py b/pysollib/tk/menubar.py index dcafd0ac..304d4e02 100644 --- a/pysollib/tk/menubar.py +++ b/pysollib/tk/menubar.py @@ -68,6 +68,9 @@ class PysolMenubarTk(PysolMenubarTkCommon): from wizarddialog import WizardDialog return WizardDialog + def _calcSelectGameDialog(self): + return SelectGameDialog + def _calcSoundOptionsDialog(self): return SoundOptionsDialog diff --git a/pysollib/ui/tktile/menubar.py b/pysollib/ui/tktile/menubar.py index c334bcfd..17bf9206 100644 --- a/pysollib/ui/tktile/menubar.py +++ b/pysollib/ui/tktile/menubar.py @@ -794,7 +794,7 @@ class PysolMenubarTkCommon: if self._cancelDrag(break_pause=False): return self.game.setCursor(cursor=CURSOR_WATCH) after_idle(self.top, self.__restoreCursor) - d = SelectGameDialog(self.top, title=_("Select game"), + d = self._calcSelectGameDialog()(self.top, title=_("Select game"), app=self.app, gameid=self.game.id) return self._mSelectGameDialog(d)