@ -29,6 +29,7 @@ except AttributeError:
from addresses import *
import shared
from bitmessageui import *
from configparser import BMConfigParser
from namecoin import namecoinConnection , ensureNamecoinOptions
from newaddressdialog import *
from newaddresswizard import *
@ -77,6 +78,7 @@ from class_singleWorker import singleWorker
from helper_generic import powQueueSize , invQueueSize
from proofofwork import getPowType
from statusbar import BMStatusBar
from version import softwareVersion
def _translate ( context , text , disambiguation = None , encoding = None , number = None ) :
if number is None :
@ -490,11 +492,11 @@ class MyForm(settingsmixin.SMainWindow):
enabled = { }
for toAddress in getSortedAccounts ( ) :
isEnabled = shared. config . getboolean (
isEnabled = BMConfigParser( ) . getboolean (
toAddress , ' enabled ' )
isChan = shared. safeConfig GetBoolean(
isChan = BMConfigParser( ) . safe GetBoolean(
toAddress , ' chan ' )
isMaillinglist = shared. safeConfig GetBoolean(
isMaillinglist = BMConfigParser( ) . safe GetBoolean(
toAddress , ' mailinglist ' )
if treeWidget == self . ui . treeWidgetYourIdentities :
@ -603,7 +605,7 @@ class MyForm(settingsmixin.SMainWindow):
reply = QtGui . QMessageBox . question (
self , ' Message ' , displayMsg , QtGui . QMessageBox . Yes , QtGui . QMessageBox . No )
if reply == QtGui . QMessageBox . Yes :
shared. config . remove_section ( addressInKeysFile )
BMConfigParser( ) . remove_section ( addressInKeysFile )
shared . writeKeysFile ( )
# Configure Bitmessage to start on startup (or remove the
@ -614,7 +616,7 @@ class MyForm(settingsmixin.SMainWindow):
self . settings = QSettings ( RUN_PATH , QSettings . NativeFormat )
self . settings . remove (
" PyBitmessage " ) # In case the user moves the program and the registry entry is no longer valid, this will delete the old registry entry.
if shared. config . getboolean ( ' bitmessagesettings ' , ' startonlogon ' ) :
if BMConfigParser( ) . getboolean ( ' bitmessagesettings ' , ' startonlogon ' ) :
self . settings . setValue ( " PyBitmessage " , sys . argv [ 0 ] )
elif ' darwin ' in sys . platform :
# startup for mac
@ -783,7 +785,7 @@ class MyForm(settingsmixin.SMainWindow):
self . rerenderComboBoxSendFromBroadcast ( )
# Put the TTL slider in the correct spot
TTL = shared. config . getint ( ' bitmessagesettings ' , ' ttl ' )
TTL = BMConfigParser( ) . getint ( ' bitmessagesettings ' , ' ttl ' )
if TTL < 3600 : # an hour
TTL = 3600
elif TTL > 28 * 24 * 60 * 60 : # 28 days
@ -799,11 +801,11 @@ class MyForm(settingsmixin.SMainWindow):
# Check to see whether we can connect to namecoin. Hide the 'Fetch Namecoin ID' button if we can't.
try :
options = { }
options [ " type " ] = shared. config . get ( ' bitmessagesettings ' , ' namecoinrpctype ' )
options [ " host " ] = shared. config . get ( ' bitmessagesettings ' , ' namecoinrpchost ' )
options [ " port " ] = shared. config . get ( ' bitmessagesettings ' , ' namecoinrpcport ' )
options [ " user " ] = shared. config . get ( ' bitmessagesettings ' , ' namecoinrpcuser ' )
options [ " password " ] = shared. config . get ( ' bitmessagesettings ' , ' namecoinrpcpassword ' )
options [ " type " ] = BMConfigParser( ) . get ( ' bitmessagesettings ' , ' namecoinrpctype ' )
options [ " host " ] = BMConfigParser( ) . get ( ' bitmessagesettings ' , ' namecoinrpchost ' )
options [ " port " ] = BMConfigParser( ) . get ( ' bitmessagesettings ' , ' namecoinrpcport ' )
options [ " user " ] = BMConfigParser( ) . get ( ' bitmessagesettings ' , ' namecoinrpcuser ' )
options [ " password " ] = BMConfigParser( ) . get ( ' bitmessagesettings ' , ' namecoinrpcpassword ' )
nc = namecoinConnection ( options )
if nc . test ( ) [ 0 ] == ' failed ' :
self . ui . pushButtonFetchNamecoinID . hide ( )
@ -814,7 +816,7 @@ class MyForm(settingsmixin.SMainWindow):
def updateTTL ( self , sliderPosition ) :
TTL = int ( sliderPosition * * 3.199 + 3600 )
self . updateHumanFriendlyTTLDescription ( TTL )
shared. config . set ( ' bitmessagesettings ' , ' ttl ' , str ( TTL ) )
BMConfigParser( ) . set ( ' bitmessagesettings ' , ' ttl ' , str ( TTL ) )
shared . writeKeysFile ( )
def updateHumanFriendlyTTLDescription ( self , TTL ) :
@ -1161,7 +1163,7 @@ class MyForm(settingsmixin.SMainWindow):
# show bitmessage
self . actionShow = QtGui . QAction ( _translate (
" MainWindow " , " Show Bitmessage " ) , m , checkable = True )
self . actionShow . setChecked ( not shared. config . getboolean (
self . actionShow . setChecked ( not BMConfigParser( ) . getboolean (
' bitmessagesettings ' , ' startintray ' ) )
self . actionShow . triggered . connect ( self . appIndicatorShowOrHideWindow )
if not sys . platform [ 0 : 3 ] == ' win ' :
@ -1250,7 +1252,7 @@ class MyForm(settingsmixin.SMainWindow):
if toAddress == str_broadcast_subscribers :
toLabel = str_broadcast_subscribers
else :
toLabel = shared. config . get ( toAddress , ' label ' )
toLabel = BMConfigParser( ) . get ( toAddress , ' label ' )
except :
toLabel = ' '
if toLabel == ' ' :
@ -1595,7 +1597,7 @@ class MyForm(settingsmixin.SMainWindow):
self . connectDialogInstance = connectDialog ( self )
if self . connectDialogInstance . exec_ ( ) :
if self . connectDialogInstance . ui . radioButtonConnectNow . isChecked ( ) :
shared. config . remove_option ( ' bitmessagesettings ' , ' dontconnect ' )
BMConfigParser( ) . remove_option ( ' bitmessagesettings ' , ' dontconnect ' )
shared . writeKeysFile ( )
else :
self . click_actionSettings ( )
@ -1619,7 +1621,7 @@ class MyForm(settingsmixin.SMainWindow):
self . ui . blackwhitelist . init_blacklist_popup_menu ( False )
if event . type ( ) == QtCore . QEvent . WindowStateChange :
if self . windowState ( ) & QtCore . Qt . WindowMinimized :
if shared. config . getboolean ( ' bitmessagesettings ' , ' minimizetotray ' ) and not ' darwin ' in sys . platform :
if BMConfigParser( ) . getboolean ( ' bitmessagesettings ' , ' minimizetotray ' ) and not ' darwin ' in sys . platform :
QTimer . singleShot ( 0 , self . appIndicatorHide )
elif event . oldState ( ) & QtCore . Qt . WindowMinimized :
# The window state has just been changed to
@ -1644,7 +1646,7 @@ class MyForm(settingsmixin.SMainWindow):
QIcon ( " :/newPrefix/images/redicon.png " ) )
shared . statusIconColor = ' red '
# if the connection is lost then show a notification
if self . connected and not shared. config . getboolean ( ' bitmessagesettings ' , ' hidetrayconnectionnotifications ' ) :
if self . connected and not BMConfigParser( ) . getboolean ( ' bitmessagesettings ' , ' hidetrayconnectionnotifications ' ) :
self . notifierShow ( ' Bitmessage ' , unicode ( _translate (
" MainWindow " , " Connection lost " ) . toUtf8 ( ) , ' utf-8 ' ) ,
self . SOUND_DISCONNECTED , None )
@ -1661,7 +1663,7 @@ class MyForm(settingsmixin.SMainWindow):
" :/newPrefix/images/yellowicon.png " ) )
shared . statusIconColor = ' yellow '
# if a new connection has been established then show a notification
if not self . connected and not shared. config . getboolean ( ' bitmessagesettings ' , ' hidetrayconnectionnotifications ' ) :
if not self . connected and not BMConfigParser( ) . getboolean ( ' bitmessagesettings ' , ' hidetrayconnectionnotifications ' ) :
self . notifierShow ( ' Bitmessage ' , unicode ( _translate (
" MainWindow " , " Connected " ) . toUtf8 ( ) , ' utf-8 ' ) ,
self . SOUND_CONNECTED , None )
@ -1677,7 +1679,7 @@ class MyForm(settingsmixin.SMainWindow):
self . pushButtonStatusIcon . setIcon (
QIcon ( " :/newPrefix/images/greenicon.png " ) )
shared . statusIconColor = ' green '
if not self . connected and not shared. config . getboolean ( ' bitmessagesettings ' , ' hidetrayconnectionnotifications ' ) :
if not self . connected and not BMConfigParser( ) . getboolean ( ' bitmessagesettings ' , ' hidetrayconnectionnotifications ' ) :
self . notifierShow ( ' Bitmessage ' , unicode ( _translate (
" MainWindow " , " Connected " ) . toUtf8 ( ) , ' utf-8 ' ) ,
self . SOUND_CONNECTION_GREEN , None )
@ -1856,7 +1858,7 @@ class MyForm(settingsmixin.SMainWindow):
addresses = getSortedAccounts ( )
for address in addresses :
account = accountClass ( address )
if ( account . type == AccountMixin . CHAN and shared. safeConfig GetBoolean( address , ' enabled ' ) ) :
if ( account . type == AccountMixin . CHAN and BMConfigParser( ) . safe GetBoolean( address , ' enabled ' ) ) :
newRows [ address ] = [ account . getLabel ( ) , AccountMixin . CHAN ]
# normal accounts
queryreturn = sqlQuery ( ' SELECT * FROM addressbook ' )
@ -1952,8 +1954,8 @@ class MyForm(settingsmixin.SMainWindow):
email = ' ' . join ( random . SystemRandom ( ) . choice ( string . ascii_lowercase ) for _ in range ( 12 ) ) + " @mailchuck.com "
acct = MailchuckAccount ( fromAddress )
acct . register ( email )
shared. config . set ( fromAddress , ' label ' , email )
shared. config . set ( fromAddress , ' gateway ' , ' mailchuck ' )
BMConfigParser( ) . set ( fromAddress , ' label ' , email )
BMConfigParser( ) . set ( fromAddress , ' gateway ' , ' mailchuck ' )
shared . writeKeysFile ( )
self . statusBar ( ) . showMessage ( _translate (
" MainWindow " , " Error: Your account wasn ' t registered at an email gateway. Sending registration now as % 1, please wait for the registration to be processed before retrying sending. " ) . arg ( email ) , 10000 )
@ -2027,7 +2029,7 @@ class MyForm(settingsmixin.SMainWindow):
0 , # retryNumber
' sent ' , # folder
encoding , # encodingtype
shared. config . getint ( ' bitmessagesettings ' , ' ttl ' )
BMConfigParser( ) . getint ( ' bitmessagesettings ' , ' ttl ' )
)
toLabel = ' '
@ -2080,7 +2082,7 @@ class MyForm(settingsmixin.SMainWindow):
0 , # retryNumber
' sent ' , # folder
encoding , # encoding type
shared. config . getint ( ' bitmessagesettings ' , ' ttl ' )
BMConfigParser( ) . getint ( ' bitmessagesettings ' , ' ttl ' )
)
sqlExecute (
''' INSERT INTO sent VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ''' , * t )
@ -2125,7 +2127,7 @@ class MyForm(settingsmixin.SMainWindow):
def setBroadcastEnablementDependingOnWhetherThisIsAMailingListAddress ( self , address ) :
# If this is a chan then don't let people broadcast because no one
# should subscribe to chan addresses.
if shared. safeConfig GetBoolean( str ( address ) , ' mailinglist ' ) :
if BMConfigParser( ) . safe GetBoolean( str ( address ) , ' mailinglist ' ) :
self . ui . tabWidgetSend . setCurrentIndex ( 1 )
else :
self . ui . tabWidgetSend . setCurrentIndex ( 0 )
@ -2133,11 +2135,11 @@ class MyForm(settingsmixin.SMainWindow):
def rerenderComboBoxSendFrom ( self ) :
self . ui . comboBoxSendFrom . clear ( )
for addressInKeysFile in getSortedAccounts ( ) :
isEnabled = shared. config . getboolean (
isEnabled = BMConfigParser( ) . getboolean (
addressInKeysFile , ' enabled ' ) # I realize that this is poor programming practice but I don't care. It's easier for others to read.
isMaillinglist = shared. safeConfig GetBoolean( addressInKeysFile , ' mailinglist ' )
isMaillinglist = BMConfigParser( ) . safe GetBoolean( addressInKeysFile , ' mailinglist ' )
if isEnabled and not isMaillinglist :
label = unicode ( shared. config . get ( addressInKeysFile , ' label ' ) , ' utf-8 ' , ' ignore ' ) . strip ( )
label = unicode ( BMConfigParser( ) . get ( addressInKeysFile , ' label ' ) , ' utf-8 ' , ' ignore ' ) . strip ( )
if label == " " :
label = addressInKeysFile
self . ui . comboBoxSendFrom . addItem ( avatarize ( addressInKeysFile ) , label , addressInKeysFile )
@ -2154,11 +2156,11 @@ class MyForm(settingsmixin.SMainWindow):
def rerenderComboBoxSendFromBroadcast ( self ) :
self . ui . comboBoxSendFromBroadcast . clear ( )
for addressInKeysFile in getSortedAccounts ( ) :
isEnabled = shared. config . getboolean (
isEnabled = BMConfigParser( ) . getboolean (
addressInKeysFile , ' enabled ' ) # I realize that this is poor programming practice but I don't care. It's easier for others to read.
isChan = shared. safeConfig GetBoolean( addressInKeysFile , ' chan ' )
isChan = BMConfigParser( ) . safe GetBoolean( addressInKeysFile , ' chan ' )
if isEnabled and not isChan :
label = unicode ( shared. config . get ( addressInKeysFile , ' label ' ) , ' utf-8 ' , ' ignore ' ) . strip ( )
label = unicode ( BMConfigParser( ) . get ( addressInKeysFile , ' label ' ) , ' utf-8 ' , ' ignore ' ) . strip ( )
if label == " " :
label = addressInKeysFile
self . ui . comboBoxSendFromBroadcast . addItem ( avatarize ( addressInKeysFile ) , label , addressInKeysFile )
@ -2221,7 +2223,7 @@ class MyForm(settingsmixin.SMainWindow):
else :
acct = ret
self . propagateUnreadCount ( acct . address )
if shared. config . getboolean ( ' bitmessagesettings ' , ' showtraynotifications ' ) :
if BMConfigParser( ) . getboolean ( ' bitmessagesettings ' , ' showtraynotifications ' ) :
self . notifierShow ( unicode ( _translate ( " MainWindow " , ' New Message ' ) . toUtf8 ( ) , ' utf-8 ' ) , unicode ( _translate ( " MainWindow " , ' From ' ) . toUtf8 ( ) , ' utf-8 ' ) + unicode ( acct . fromLabel , ' utf-8 ' ) , self . SOUND_UNKNOWN , None )
if self . getCurrentAccount ( ) is not None and ( ( self . getCurrentFolder ( treeWidget ) != " inbox " and self . getCurrentFolder ( treeWidget ) is not None ) or self . getCurrentAccount ( treeWidget ) != acct . address ) :
# Ubuntu should notify of new message irespective of whether it's in current message list or not
@ -2235,8 +2237,8 @@ class MyForm(settingsmixin.SMainWindow):
email = str ( self . dialog . ui . lineEditEmail . text ( ) . toUtf8 ( ) )
# register resets address variables
acct . register ( email )
shared. config . set ( acct . fromAddress , ' label ' , email )
shared. config . set ( acct . fromAddress , ' gateway ' , ' mailchuck ' )
BMConfigParser( ) . set ( acct . fromAddress , ' label ' , email )
BMConfigParser( ) . set ( acct . fromAddress , ' gateway ' , ' mailchuck ' )
shared . writeKeysFile ( )
self . statusBar ( ) . showMessage ( _translate (
" MainWindow " , " Sending email gateway registration request " ) , 10000 )
@ -2323,113 +2325,113 @@ class MyForm(settingsmixin.SMainWindow):
def click_actionSettings ( self ) :
self . settingsDialogInstance = settingsDialog ( self )
if self . settingsDialogInstance . exec_ ( ) :
shared. config . set ( ' bitmessagesettings ' , ' startonlogon ' , str (
BMConfigParser( ) . set ( ' bitmessagesettings ' , ' startonlogon ' , str (
self . settingsDialogInstance . ui . checkBoxStartOnLogon . isChecked ( ) ) )
shared. config . set ( ' bitmessagesettings ' , ' minimizetotray ' , str (
BMConfigParser( ) . set ( ' bitmessagesettings ' , ' minimizetotray ' , str (
self . settingsDialogInstance . ui . checkBoxMinimizeToTray . isChecked ( ) ) )
shared. config . set ( ' bitmessagesettings ' , ' trayonclose ' , str (
BMConfigParser( ) . set ( ' bitmessagesettings ' , ' trayonclose ' , str (
self . settingsDialogInstance . ui . checkBoxTrayOnClose . isChecked ( ) ) )
shared. config . set ( ' bitmessagesettings ' , ' hidetrayconnectionnotifications ' , str (
BMConfigParser( ) . set ( ' bitmessagesettings ' , ' hidetrayconnectionnotifications ' , str (
self . settingsDialogInstance . ui . checkBoxHideTrayConnectionNotifications . isChecked ( ) ) )
shared. config . set ( ' bitmessagesettings ' , ' showtraynotifications ' , str (
BMConfigParser( ) . set ( ' bitmessagesettings ' , ' showtraynotifications ' , str (
self . settingsDialogInstance . ui . checkBoxShowTrayNotifications . isChecked ( ) ) )
shared. config . set ( ' bitmessagesettings ' , ' startintray ' , str (
BMConfigParser( ) . set ( ' bitmessagesettings ' , ' startintray ' , str (
self . settingsDialogInstance . ui . checkBoxStartInTray . isChecked ( ) ) )
shared. config . set ( ' bitmessagesettings ' , ' willinglysendtomobile ' , str (
BMConfigParser( ) . set ( ' bitmessagesettings ' , ' willinglysendtomobile ' , str (
self . settingsDialogInstance . ui . checkBoxWillinglySendToMobile . isChecked ( ) ) )
shared. config . set ( ' bitmessagesettings ' , ' useidenticons ' , str (
BMConfigParser( ) . set ( ' bitmessagesettings ' , ' useidenticons ' , str (
self . settingsDialogInstance . ui . checkBoxUseIdenticons . isChecked ( ) ) )
shared. config . set ( ' bitmessagesettings ' , ' replybelow ' , str (
BMConfigParser( ) . set ( ' bitmessagesettings ' , ' replybelow ' , str (
self . settingsDialogInstance . ui . checkBoxReplyBelow . isChecked ( ) ) )
lang = str ( self . settingsDialogInstance . ui . languageComboBox . itemData ( self . settingsDialogInstance . ui . languageComboBox . currentIndex ( ) ) . toString ( ) )
shared. config . set ( ' bitmessagesettings ' , ' userlocale ' , lang )
BMConfigParser( ) . set ( ' bitmessagesettings ' , ' userlocale ' , lang )
change_translation ( l10n . getTranslationLanguage ( ) )
if int ( shared. config . get ( ' bitmessagesettings ' , ' port ' ) ) != int ( self . settingsDialogInstance . ui . lineEditTCPPort . text ( ) ) :
if not shared. safeConfig GetBoolean( ' bitmessagesettings ' , ' dontconnect ' ) :
if int ( BMConfigParser( ) . get ( ' bitmessagesettings ' , ' port ' ) ) != int ( self . settingsDialogInstance . ui . lineEditTCPPort . text ( ) ) :
if not BMConfigParser( ) . safe GetBoolean( ' bitmessagesettings ' , ' dontconnect ' ) :
QMessageBox . about ( self , _translate ( " MainWindow " , " Restart " ) , _translate (
" MainWindow " , " You must restart Bitmessage for the port number change to take effect. " ) )
shared. config . set ( ' bitmessagesettings ' , ' port ' , str (
BMConfigParser( ) . set ( ' bitmessagesettings ' , ' port ' , str (
self . settingsDialogInstance . ui . lineEditTCPPort . text ( ) ) )
if self . settingsDialogInstance . ui . checkBoxUPnP . isChecked ( ) != shared. safeConfig GetBoolean( ' bitmessagesettings ' , ' upnp ' ) :
shared. config . set ( ' bitmessagesettings ' , ' upnp ' , str ( self . settingsDialogInstance . ui . checkBoxUPnP . isChecked ( ) ) )
if self . settingsDialogInstance . ui . checkBoxUPnP . isChecked ( ) != BMConfigParser( ) . safe GetBoolean( ' bitmessagesettings ' , ' upnp ' ) :
BMConfigParser( ) . set ( ' bitmessagesettings ' , ' upnp ' , str ( self . settingsDialogInstance . ui . checkBoxUPnP . isChecked ( ) ) )
if self . settingsDialogInstance . ui . checkBoxUPnP . isChecked ( ) :
import upnp
upnpThread = upnp . uPnPThread ( )
upnpThread . start ( )
#print 'self.settingsDialogInstance.ui.comboBoxProxyType.currentText()', self.settingsDialogInstance.ui.comboBoxProxyType.currentText()
#print 'self.settingsDialogInstance.ui.comboBoxProxyType.currentText())[0:5]', self.settingsDialogInstance.ui.comboBoxProxyType.currentText()[0:5]
if shared. config . get ( ' bitmessagesettings ' , ' socksproxytype ' ) == ' none ' and self . settingsDialogInstance . ui . comboBoxProxyType . currentText ( ) [ 0 : 5 ] == ' SOCKS ' :
if BMConfigParser( ) . get ( ' bitmessagesettings ' , ' socksproxytype ' ) == ' none ' and self . settingsDialogInstance . ui . comboBoxProxyType . currentText ( ) [ 0 : 5 ] == ' SOCKS ' :
if shared . statusIconColor != ' red ' :
QMessageBox . about ( self , _translate ( " MainWindow " , " Restart " ) , _translate (
" MainWindow " , " Bitmessage will use your proxy from now on but you may want to manually restart Bitmessage now to close existing connections (if any). " ) )
if shared. config . get ( ' bitmessagesettings ' , ' socksproxytype ' ) [ 0 : 5 ] == ' SOCKS ' and self . settingsDialogInstance . ui . comboBoxProxyType . currentText ( ) [ 0 : 5 ] != ' SOCKS ' :
if BMConfigParser( ) . get ( ' bitmessagesettings ' , ' socksproxytype ' ) [ 0 : 5 ] == ' SOCKS ' and self . settingsDialogInstance . ui . comboBoxProxyType . currentText ( ) [ 0 : 5 ] != ' SOCKS ' :
self . statusBar ( ) . clearMessage ( )
if self . settingsDialogInstance . ui . comboBoxProxyType . currentText ( ) [ 0 : 5 ] == ' SOCKS ' :
shared. config . set ( ' bitmessagesettings ' , ' socksproxytype ' , str (
BMConfigParser( ) . set ( ' bitmessagesettings ' , ' socksproxytype ' , str (
self . settingsDialogInstance . ui . comboBoxProxyType . currentText ( ) ) )
else :
shared. config . set ( ' bitmessagesettings ' , ' socksproxytype ' , ' none ' )
shared. config . set ( ' bitmessagesettings ' , ' socksauthentication ' , str (
BMConfigParser( ) . set ( ' bitmessagesettings ' , ' socksproxytype ' , ' none ' )
BMConfigParser( ) . set ( ' bitmessagesettings ' , ' socksauthentication ' , str (
self . settingsDialogInstance . ui . checkBoxAuthentication . isChecked ( ) ) )
shared. config . set ( ' bitmessagesettings ' , ' sockshostname ' , str (
BMConfigParser( ) . set ( ' bitmessagesettings ' , ' sockshostname ' , str (
self . settingsDialogInstance . ui . lineEditSocksHostname . text ( ) ) )
shared. config . set ( ' bitmessagesettings ' , ' socksport ' , str (
BMConfigParser( ) . set ( ' bitmessagesettings ' , ' socksport ' , str (
self . settingsDialogInstance . ui . lineEditSocksPort . text ( ) ) )
shared. config . set ( ' bitmessagesettings ' , ' socksusername ' , str (
BMConfigParser( ) . set ( ' bitmessagesettings ' , ' socksusername ' , str (
self . settingsDialogInstance . ui . lineEditSocksUsername . text ( ) ) )