def createSupportMessage(myapp): checkAddressBook(myapp) address = createAddressIfNeeded(myapp) if state.shutdown: return myapp.ui.lineEditSubject.setText(str(QtGui.QApplication.translate("Support", SUPPORT_SUBJECT))) addrIndex = myapp.ui.comboBoxSendFrom.findData(address, QtCore.Qt.UserRole, QtCore.Qt.MatchFixedString | QtCore.Qt.MatchCaseSensitive) if addrIndex == -1: # something is very wrong return myapp.ui.comboBoxSendFrom.setCurrentIndex(addrIndex) myapp.ui.lineEditTo.setText(SUPPORT_ADDRESS) version = softwareVersion commit = paths.lastCommit() if commit: version += " GIT " + commit os = sys.platform if os == "win32": windowsversion = sys.getwindowsversion() os = "Windows " + str(windowsversion[0]) + "." + str(windowsversion[1]) else: try: from os import uname unixversion = uname() os = unixversion[0] + " " + unixversion[2] except: pass architecture = "32" if ctypes.sizeof(ctypes.c_voidp) == 4 else "64" pythonversion = sys.version opensslversion = "%s (Python internal), %s (external for PyElliptic)" % (ssl.OPENSSL_VERSION, OpenSSL._version) frozen = "N/A" if paths.frozen: frozen = paths.frozen portablemode = "True" if state.appdata == paths.lookupExeFolder() else "False" cpow = "True" if bmpow else "False" #cpow = QtGui.QApplication.translate("Support", cpow) openclpow = str(BMConfigParser().safeGet('bitmessagesettings', 'opencl')) if openclEnabled() else "None" #openclpow = QtGui.QApplication.translate("Support", openclpow) locale = getTranslationLanguage() try: socks = BMConfigParser().get('bitmessagesettings', 'socksproxytype') except: socks = "N/A" try: upnp = BMConfigParser().get('bitmessagesettings', 'upnp') except: upnp = "N/A" connectedhosts = len(shared.connectedHostsList) myapp.ui.textEditMessage.setText(str(QtGui.QApplication.translate("Support", SUPPORT_MESSAGE)).format(version, os, architecture, pythonversion, opensslversion, frozen, portablemode, cpow, openclpow, locale, socks, upnp, connectedhosts)) # single msg tab myapp.ui.tabWidgetSend.setCurrentIndex(0) # send tab myapp.ui.tabWidget.setCurrentIndex(1)
def __init__(self, parent=None): super(AboutDialog, self).__init__(parent) widgets.load('about.ui', self) last_commit = paths.lastCommit() version = softwareVersion commit = last_commit.get('commit') if commit: version += '-' + commit[:7] self.labelVersion.setText(self.labelVersion.text().replace( ':version:', version).replace(':branch:', commit or 'v%s' % version)) self.labelVersion.setOpenExternalLinks(True) try: self.label_2.setText(self.label_2.text().replace( '2017', str(last_commit.get('time').year))) except AttributeError: pass self.setFixedSize(QtGui.QWidget.sizeHint(self))
def __init__(self, parent=None): super(AboutDialog, self).__init__(parent) widgets.load('about.ui', self) last_commit = paths.lastCommit() version = softwareVersion commit = last_commit.get('commit') if commit: version += '-' + commit[:7] self.labelVersion.setText( self.labelVersion.text().replace( ':version:', version ).replace(':branch:', commit or 'v%s' % version) ) self.labelVersion.setOpenExternalLinks(True) try: self.label_2.setText( self.label_2.text().replace( '2017', str(last_commit.get('time').year) )) except AttributeError: pass self.setFixedSize(QtGui.QWidget.sizeHint(self))
def createSupportMessage(myapp): checkAddressBook(myapp) address = createAddressIfNeeded(myapp) if state.shutdown: return myapp.ui.lineEditSubject.setText(str(QtGui.QApplication.translate("Support", SUPPORT_SUBJECT))) addrIndex = myapp.ui.comboBoxSendFrom.findData(address, QtCore.Qt.UserRole, QtCore.Qt.MatchFixedString | QtCore.Qt.MatchCaseSensitive) if addrIndex == -1: # something is very wrong return myapp.ui.comboBoxSendFrom.setCurrentIndex(addrIndex) myapp.ui.lineEditTo.setText(SUPPORT_ADDRESS) version = softwareVersion commit = paths.lastCommit().get('commit') if commit: version += " GIT " + commit os = sys.platform if os == "win32": windowsversion = sys.getwindowsversion() os = "Windows " + str(windowsversion[0]) + "." + str(windowsversion[1]) else: try: from os import uname unixversion = uname() os = unixversion[0] + " " + unixversion[2] except: pass architecture = "32" if ctypes.sizeof(ctypes.c_voidp) == 4 else "64" pythonversion = sys.version opensslversion = "%s (Python internal), %s (external for PyElliptic)" % (ssl.OPENSSL_VERSION, OpenSSL._version) frozen = "N/A" if paths.frozen: frozen = paths.frozen portablemode = "True" if state.appdata == paths.lookupExeFolder() else "False" cpow = "True" if proofofwork.bmpow else "False" #cpow = QtGui.QApplication.translate("Support", cpow) openclpow = str(BMConfigParser().safeGet('bitmessagesettings', 'opencl')) if openclEnabled() else "None" #openclpow = QtGui.QApplication.translate("Support", openclpow) locale = getTranslationLanguage() try: socks = BMConfigParser().get('bitmessagesettings', 'socksproxytype') except: socks = "N/A" try: upnp = BMConfigParser().get('bitmessagesettings', 'upnp') except: upnp = "N/A" connectedhosts = len(network.stats.connectedHostsList()) myapp.ui.textEditMessage.setText(str(QtGui.QApplication.translate("Support", SUPPORT_MESSAGE)).format(version, os, architecture, pythonversion, opensslversion, frozen, portablemode, cpow, openclpow, locale, socks, upnp, connectedhosts)) # single msg tab myapp.ui.tabWidgetSend.setCurrentIndex( myapp.ui.tabWidgetSend.indexOf(myapp.ui.sendDirect) ) # send tab myapp.ui.tabWidget.setCurrentIndex( myapp.ui.tabWidget.indexOf(myapp.ui.send) )