Merge remote-tracking branch 'origin/v2.2'

This commit is contained in:
Adolfo Gómez García 2018-06-06 15:30:14 +02:00
commit db87dd101b
5 changed files with 6513 additions and 6 deletions

View File

@ -61,6 +61,7 @@ def sigTerm(sigNo, stackFrame):
# About dialog # About dialog
class UDSAboutDialog(QtGui.QDialog): class UDSAboutDialog(QtGui.QDialog):
def __init__(self, parent=None): def __init__(self, parent=None):
QtGui.QDialog.__init__(self, parent) QtGui.QDialog.__init__(self, parent)
self.ui = Ui_UDSAboutDialog() self.ui = Ui_UDSAboutDialog()
@ -72,6 +73,7 @@ class UDSAboutDialog(QtGui.QDialog):
class UDSMessageDialog(QtGui.QDialog): class UDSMessageDialog(QtGui.QDialog):
def __init__(self, parent=None): def __init__(self, parent=None):
QtGui.QDialog.__init__(self, parent) QtGui.QDialog.__init__(self, parent)
self.ui = Ui_UDSMessageDialog() self.ui = Ui_UDSMessageDialog()
@ -165,6 +167,7 @@ class MessagesProcessor(QtCore.QThread):
class UDSSystemTray(QtGui.QSystemTrayIcon): class UDSSystemTray(QtGui.QSystemTrayIcon):
def __init__(self, app_, parent=None): def __init__(self, app_, parent=None):
self.app = app_ self.app = app_
@ -310,10 +313,11 @@ class UDSSystemTray(QtGui.QSystemTrayIcon):
self.app.quit() self.app.quit()
if __name__ == '__main__': if __name__ == '__main__':
app = QtGui.QApplication(sys.argv) app = QtGui.QApplication(sys.argv)
#if not QtGui.QSystemTrayIcon.isSystemTrayAvailable(): # if not QtGui.QSystemTrayIcon.isSystemTrayAvailable():
# # QtGui.QMessageBox.critical(None, "Systray", "I couldn't detect any system tray on this system.") # # QtGui.QMessageBox.critical(None, "Systray", "I couldn't detect any system tray on this system.")
# sys.exit(1) # sys.exit(1)
@ -337,7 +341,7 @@ if __name__ == '__main__':
res = app.exec_() res = app.exec_()
logger.debug('Exiting') logger.debug('Exiting')
trayIcon.quit() trayIcon.quit(logoff=doLogoff) # Pass existing doLogoff
if doLogoff: if doLogoff:
try: try:
@ -346,5 +350,4 @@ if __name__ == '__main__':
except Exception: except Exception:
pass pass
sys.exit(res) sys.exit(res)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
# This is a template # This is a template
# Saved as .py for easier editing # Saved as .py for easier editing
from __future__ import unicode_literals # from __future__ import unicode_literals
# pylint: disable=import-error, no-name-in-module # pylint: disable=import-error, no-name-in-module
import os import os

View File

@ -1,6 +1,6 @@
# This is a template # This is a template
# Saved as .py for easier editing # Saved as .py for easier editing
from __future__ import unicode_literals #from __future__ import unicode_literals
# pylint: disable=import-error, no-name-in-module, too-many-format-args, undefined-variable # pylint: disable=import-error, no-name-in-module, too-many-format-args, undefined-variable
@ -19,7 +19,7 @@ if forwardThread.status == 2:
raise Exception('Unable to open tunnel') raise Exception('Unable to open tunnel')
tools.addTaskToWait(forwardThread) tools.addTaskToWait(forwardThread)
# Care, expanduser is encoding using "mcbs", so treat it as bytes always
home = expanduser('~').replace('\\', '\\\\') + '#1;' home = expanduser('~').replace('\\', '\\\\') + '#1;'
keyFile = tools.saveTempFile('''{m.key}''') keyFile = tools.saveTempFile('''{m.key}''')
theFile = '''{m.xf}'''.format(export=home, keyFile=keyFile.replace('\\', '/'), ip='127.0.0.1', port=port) theFile = '''{m.xf}'''.format(export=home, keyFile=keyFile.replace('\\', '/'), ip='127.0.0.1', port=port)