search string for table detect changed
This commit is contained in:
parent
207277e55a
commit
f1e6b597a2
|
@ -512,7 +512,7 @@ or None if we fail to get the info """
|
||||||
def getTableTitleRe(type, table_name=None, tournament = None, table_number=None):
|
def getTableTitleRe(type, table_name=None, tournament = None, table_number=None):
|
||||||
"Returns string to search in windows titles"
|
"Returns string to search in windows titles"
|
||||||
if type=="tour":
|
if type=="tour":
|
||||||
return "%s.+Table\s%s" % (tournament, table_number)
|
return "%s.+Table.+%s" % (tournament, table_number)
|
||||||
else:
|
else:
|
||||||
return table_name
|
return table_name
|
||||||
|
|
||||||
|
|
|
@ -161,7 +161,7 @@ def discover_posix_by_name(c, tablename):
|
||||||
|
|
||||||
def discover_posix_tournament(c, t_number, s_number):
|
def discover_posix_tournament(c, t_number, s_number):
|
||||||
"""Finds the X window for a client, given tournament and table nos."""
|
"""Finds the X window for a client, given tournament and table nos."""
|
||||||
search_string = "%s.+Table\s%s" % (t_number, s_number)
|
search_string = "%s.+Table.+%s" % (t_number, s_number)
|
||||||
for listing in os.popen('xwininfo -root -tree').readlines():
|
for listing in os.popen('xwininfo -root -tree').readlines():
|
||||||
if re.search(search_string, listing):
|
if re.search(search_string, listing):
|
||||||
return decode_xwininfo(c, listing)
|
return decode_xwininfo(c, listing)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user