mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
menubar.py : move more code to base class.
This commit is contained in:
parent
cde9bc5fb5
commit
d9ab7b2e4f
3 changed files with 20 additions and 34 deletions
|
@ -98,23 +98,6 @@ class PysolMenubarTk(PysolMenubarTkCommon):
|
|||
self.game.endGame(bookmark=1)
|
||||
self.game.quitGame(bookmark=1)
|
||||
|
||||
def toolbarConfig(self, w, v):
|
||||
if self._cancelDrag(break_pause=False): return
|
||||
self.app.opt.toolbar_vars[w] = v
|
||||
self.app.toolbar.config(w, v)
|
||||
self.top.update_idletasks()
|
||||
|
||||
#
|
||||
# stacks descriptions
|
||||
#
|
||||
|
||||
def mStackDesk(self, *event):
|
||||
if self.game.stackdesc_list:
|
||||
self.game.deleteStackDesc()
|
||||
else:
|
||||
if self._cancelDrag(break_pause=True): return
|
||||
self.game.showStackDesc()
|
||||
|
||||
#
|
||||
# Tile (ttk)
|
||||
#
|
||||
|
|
|
@ -73,6 +73,10 @@ class PysolMenubarTk(PysolMenubarTkCommon):
|
|||
def _connect_game_solver_dialog(self, game):
|
||||
return connect_game_solver_dialog(game)
|
||||
|
||||
def _calcWizardDialog(self):
|
||||
from wizarddialog import WizardDialog
|
||||
return WizardDialog
|
||||
|
||||
#
|
||||
# create the menubar
|
||||
#
|
||||
|
@ -127,21 +131,4 @@ class PysolMenubarTk(PysolMenubarTkCommon):
|
|||
self.app.toolbar.setRelief(relief)
|
||||
self.top.update_idletasks()
|
||||
|
||||
def toolbarConfig(self, w, v):
|
||||
if self._cancelDrag(break_pause=False): return
|
||||
self.app.opt.toolbar_vars[w] = v
|
||||
self.app.toolbar.config(w, v)
|
||||
self.top.update_idletasks()
|
||||
|
||||
#
|
||||
# stacks descriptions
|
||||
#
|
||||
|
||||
def mStackDesk(self, *event):
|
||||
if self.game.stackdesc_list:
|
||||
self.game.deleteStackDesc()
|
||||
else:
|
||||
if self._cancelDrag(break_pause=True): return
|
||||
self.game.showStackDesc()
|
||||
|
||||
|
||||
|
|
|
@ -1383,3 +1383,19 @@ Error while saving game.
|
|||
if self._cancelDrag(break_pause=False): return
|
||||
self.wizardDialog(edit=True)
|
||||
|
||||
def toolbarConfig(self, w, v):
|
||||
if self._cancelDrag(break_pause=False): return
|
||||
self.app.opt.toolbar_vars[w] = v
|
||||
self.app.toolbar.config(w, v)
|
||||
self.top.update_idletasks()
|
||||
|
||||
#
|
||||
# stacks descriptions
|
||||
#
|
||||
|
||||
def mStackDesk(self, *event):
|
||||
if self.game.stackdesc_list:
|
||||
self.game.deleteStackDesc()
|
||||
else:
|
||||
if self._cancelDrag(break_pause=True): return
|
||||
self.game.showStackDesc()
|
||||
|
|
Loading…
Add table
Reference in a new issue