Merge branch 'eric'

trivial conflict
This commit is contained in:
steffen123 2010-09-27 09:23:53 +02:00
commit a29de2b533
2 changed files with 18 additions and 10 deletions

View File

@ -205,13 +205,15 @@ class GuiAutoImport (threading.Thread):
self.doAutoImportBool = True
widget.set_label(_(u' _Stop Auto Import '))
if self.pipe_to_hud is None:
if Configuration.FROZEN:
if Configuration.FROZEN: # if py2exe, run hud_main.exe
path = Configuration.EXEC_PATH
command = "HUD_main.exe"
bs = 0
elif os.name == 'nt':
path = sys.path[0].replace('\\','\\\\')
command = 'pythonw "'+path+'\\HUD_main.pyw" ' + self.settings['cl_options']
#command = 'python "'+path+'\\HUD_main.pyw" ' + self.settings['cl_options']
# uncomment above line if you want hud_main stdout to work ... and make sure you are running fpdb.py using python.exe not pythonw.exe
bs = 0
else:
command = os.path.join(sys.path[0], 'HUD_main.pyw')
@ -220,12 +222,15 @@ class GuiAutoImport (threading.Thread):
try:
print _("opening pipe to HUD")
self.pipe_to_hud = subprocess.Popen(command, bufsize=bs,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE, # only needed for py2exe
stderr=subprocess.PIPE, # only needed for py2exe
universal_newlines=True
)
if Configuration.FROZEN:
self.pipe_to_hud = subprocess.Popen(command, bufsize=bs,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE, # only needed for py2exe
stderr=subprocess.PIPE, # only needed for py2exe
universal_newlines=True
)
else:
self.pipe_to_hud = subprocess.Popen(command, bufsize=bs, stdin=subprocess.PIPE, universal_newlines=True)
#self.pipe_to_hud.stdout.close()
#self.pipe_to_hud.stderr.close()
except:

View File

@ -128,19 +128,22 @@ class HUD_main(object):
log.error(e)
def client_moved(self, widget, hud):
print "hud_main: client moved"
print hud, hud.table.name, "moved", hud.table.x, hud.table.y
def client_resized(self, widget, hud):
print _("Client resized")
print _("hud_main: Client resized")
print hud, hud.table.name, hud.table.x, hud.table.y
def client_destroyed(self, widget, hud): # call back for terminating the main eventloop
print _("hud_main: Client destroyed")
self.kill_hud(None, hud.table.name)
def game_changed(self, widget, hud):
print _("Game changed.")
print _("hud_main: Game changed.")
def table_changed(self, widget, hud):
print _("Table changed.")
print _("hud_main: Table changed.")
self.kill_hud(None, hud.table.name)
def destroy(self, *args): # call back for terminating the main eventloop