1.1 --- a/OpenSecurity/bin/opensecurity_tray.pyw Mon Nov 03 19:13:54 2014 +0100
1.2 +++ b/OpenSecurity/bin/opensecurity_tray.pyw Fri Nov 07 16:24:10 2014 +0100
1.3 @@ -227,20 +227,20 @@
1.4 self._icon_network = QtGui.QIcon()
1.5 self._icon_network.addPixmap(QtGui.QPixmap(":/opensecurity/gfx/network-workgroup.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
1.6
1.7 - cleared = False
1.8 + self._menu_format.clear()
1.9 +
1.10 for m in machines:
1.11
1.12 # do not insert Browsing VM
1.13 if u'SecurityDVM0' in m:
1.14 continue
1.15 +
1.16 + properties = json.load(urllib2.urlopen('http://127.0.0.1:8080/sdvms/' + m))
1.17 + if 'USBAttachedUUID1' in properties and properties['USBAttachedUUID1'] != None:
1.18 + a = self._menu_format.addAction(m + '\\\\' + machines[m])
1.19 + a.setIcon(self._icon_network)
1.20 + a.triggered.connect(self.format_drive)
1.21
1.22 - if not cleared:
1.23 - self._menu_format.clear()
1.24 - cleared = True
1.25 -
1.26 - a = self._menu_format.addAction(m + '\\\\' + machines[m])
1.27 - a.setIcon(self._icon_network)
1.28 - a.triggered.connect(self.format_drive)
1.29
1.30 except:
1.31 pass