1/ this shouldn't be needed
2/ it is not yet enough as when windows disappear we don't notice
that the command is no longer active.
os.kill(self.w.pid, 15)
return
+
+class win_refresh:
+ def __init__(self, winlist):
+ self.format='cmd'
+ self.embedded = lambda:None
+ self.winlist = winlist
+
+ def get_name(self):
+ return "Windows"
+ def buttons(self):
+ return ["Refresh"]
+ def press(self, ind):
+ self.winlist.get_list()
+
class WindowType:
def __init__(self, win, name):
self.owner = win
self.ignore = []
self.list = winlist(add_handle = self.add)
self.current = {}
+ self.my_refresh = win_refresh(self.list)
gobject.io_add_watch(self.list.fd, gobject.IO_IN, self.list.events)
self.list.on_change(self.change, self.add, self.delete)
self.ignore.append(line)
def get_task(self, ind):
+ if ind == 0:
+ return self.my_refresh
+ ind -= 1
w = self.list.winfo
if ind >= len(w):
return None