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 self.doAutoImportBool = True
widget.set_label(_(u' _Stop Auto Import ')) widget.set_label(_(u' _Stop Auto Import '))
if self.pipe_to_hud is None: if self.pipe_to_hud is None:
if Configuration.FROZEN: if Configuration.FROZEN: # if py2exe, run hud_main.exe
path = Configuration.EXEC_PATH path = Configuration.EXEC_PATH
command = "HUD_main.exe" command = "HUD_main.exe"
bs = 0 bs = 0
elif os.name == 'nt': elif os.name == 'nt':
path = sys.path[0].replace('\\','\\\\') path = sys.path[0].replace('\\','\\\\')
command = 'pythonw "'+path+'\\HUD_main.pyw" ' + self.settings['cl_options'] 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 bs = 0
else: else:
command = os.path.join(sys.path[0], 'HUD_main.pyw') command = os.path.join(sys.path[0], 'HUD_main.pyw')
@ -220,12 +222,15 @@ class GuiAutoImport (threading.Thread):
try: try:
print _("opening pipe to HUD") print _("opening pipe to HUD")
self.pipe_to_hud = subprocess.Popen(command, bufsize=bs, if Configuration.FROZEN:
stdin=subprocess.PIPE, self.pipe_to_hud = subprocess.Popen(command, bufsize=bs,
stdout=subprocess.PIPE, # only needed for py2exe stdin=subprocess.PIPE,
stderr=subprocess.PIPE, # only needed for py2exe stdout=subprocess.PIPE, # only needed for py2exe
universal_newlines=True 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.stdout.close()
#self.pipe_to_hud.stderr.close() #self.pipe_to_hud.stderr.close()
except: except:

View File

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