Пример #1
0
 def readSettings(self):
     if os.name == 'nt':
         settings = QSettings()
     else:
         settings = QSettings(os.path.expanduser("~/.iosshy.ini"), QSettings.IniFormat)
     for name in settings.childGroups():
         tunnel = Tunnel(self)
         tunnel.name = name
         tunnel.readSettings(settings)
         self._tunnels.append(tunnel)
         self.tray.menu.insertAction(self.actionLastSep, tunnel.action)
         self.tray.menu.removeAction(self.actionNoTun)
Пример #2
0
 def readSettings(self):
     if os.name == 'nt':
         settings = QSettings()
     else:
         settings = QSettings(os.path.expanduser("~/.iosshy.ini"), QSettings.IniFormat)
     for name in settings.childGroups():
         tunnel = Tunnel(self)
         tunnel.name = name
         tunnel.readSettings(settings)
         self._tunnels.append(tunnel)
         self.tray.menu.insertAction(self.actionLastSep, tunnel.action)
         self.tray.menu.removeAction(self.actionNoTun)
Пример #3
0
 def on_btnDuplicateTunnel_clicked(self):
     cur = self.currentTunnel()
     if cur is not None:
         tunnel = Tunnel(self)
         tunnel.name = cur.name+" (copy)"
         tunnel.host = cur.host
         tunnel.localPort = cur.localPort
         tunnel.port = cur.port
         tunnel.username = cur.username
         tunnel.command = cur.command
         tunnel.autoClose = cur.autoClose
         self._tunnels.append(tunnel)
         self.listTunnels.setCurrentItem(tunnel.item)
         self.tray.menu.insertAction(self.actionLastSep, tunnel.action)
Пример #4
0
 def on_btnDuplicateTunnel_clicked(self):
     cur = self.currentTunnel()
     if cur is not None:
         tunnel = Tunnel(self)
         tunnel.name = cur.name+" (copy)"
         tunnel.host = cur.host
         tunnel.localPort = cur.localPort
         tunnel.port = cur.port
         tunnel.username = cur.username
         tunnel.command = cur.command
         tunnel.autoClose = cur.autoClose
         self._tunnels.append(tunnel)
         self.listTunnels.setCurrentItem(tunnel.item)
         self.tray.menu.insertAction(self.actionLastSep, tunnel.action)