# Path: toolbox.py
# def _(txt=None):
# 	global translations
# 	if not translations:
# 		return unicode(txt)
# 	if translations.has_key(txt):
# 		return translations[txt]
# 	return unicode(txt)


from Tkinter import *
from ttk import Notebook
from Tkconstants import *
from ScrolledText import *
from functools import partial
from toolbox import *
from toolbox import _
from tabbed import *
from goban import *
from copy import deepcopy as copy
import tkFont
import sys,time
import os
import threading, Queue
		import goban
				
				for popup in self.popups:
					if isinstance(popup,OpenChart):
						log("Updating chart")
						popup.nb_moves=self.nb_moves
						popup.data=self.data_for_chart
						popup.initialize()
						popup.display()
				log("Updating data for table")
				try:
					self.table_widget.gameroot=self.gameroot
				except:
					pass
				
		except:
			pass
		
		self.after(period*1000,self.update_from_file)
	
	def stone_sound(self):
		play_stone_sound()
		
	def click_game_goban(self,event):
		goban=event.widget
		dim=self.dim
		i,j=goban.xy2ij(event.x,event.y)
		if 0 <= i <= dim-1 and 0 <= j <= dim-1:
			if (goban.grid[i][j] not in (1,2)) or (type(goban.markup[i][j])==type(123)):
				
				if guess_color_to_play(self.gameroot,self.current_move+goban.left_variation_index)=="b":

# Path: toolbox.py
# def _(txt=None):
# 	global translations
# 	if not translations:
# 		return unicode(txt)
# 	if translations.has_key(txt):
# 		return translations[txt]
# 	return unicode(txt)


# Path: dual_view.py
from Tkinter import *
from ttk import Notebook
from Tkconstants import *
from ScrolledText import *
from functools import partial
from toolbox import *
from toolbox import _
from tabbed import *
from goban import *
from copy import deepcopy as copy
import tkFont
import sys,time
import os
import threading, Queue
		import goban

				
				for popup in self.popups:
					if isinstance(popup,OpenChart):
						log("Updating chart")
						popup.nb_moves=self.nb_moves
						popup.data=self.data_for_chart
						popup.initialize()
						popup.display()
				log("Updating data for table")
				try:
					self.table_widget.gameroot=self.gameroot
				except:
					pass
				
		except:
			pass
		
		self.after(period*1000,self.update_from_file)
	
	def stone_sound(self):
		play_stone_sound()
		
	def click_game_goban(self,event):
		goban=event.widget
		dim=self.dim
		i,j=goban.xy2ij(event.x,event.y)
		if 0 <= i <= dim-1 and 0 <= j <= dim-1:
			if (goban.grid[i][j] not in (1,2)) or (type(goban.markup[i][j])==type(123)):
				
				if guess_color_to_play(self.gameroot,self.current_move+goban.left_variation_index)=="b":

					color=1