From 1417c14821024bde33552573665973165613fa2a Mon Sep 17 00:00:00 2001 From: Treeki Date: Mon, 27 Jan 2014 05:01:34 +0100 Subject: add window closing for queries --- python_client.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'python_client.py') diff --git a/python_client.py b/python_client.py index 5a82031..22c31da 100644 --- a/python_client.py +++ b/python_client.py @@ -358,6 +358,20 @@ class MainWindow(QtWidgets.QMainWindow): self.tabs.addTab(tab, wtitle) self.tabLookup[wid] = tab tab.pushMessage('\n'.join(msgs)) + elif ptype == 0x101: + # WINDOW CLOSE + wndCount = u32.unpack_from(pdata, 0)[0] + pos = 4 + + for i in range(wndCount): + wid = u32.unpack_from(pdata, pos)[0] + pos += 4 + + if wid in self.tabLookup: + tab = self.tabLookup[wid] + self.tabs.removeTab(self.tabs.indexOf(tab)) + del self.tabLookup[wid] + elif ptype == 0x102: # WINDOW MESSAGES wndID, msglen = struct.unpack_from('