Remove trailing whitespaces.
This commit is contained in:
parent
310e2cc347
commit
27b3592e16
1 changed files with 899 additions and 899 deletions
|
|
@ -31,11 +31,11 @@ class ProfileManager(urwid.WidgetWrap):
|
|||
#profiles list
|
||||
profiles = self.host.bridge.getProfilesList()
|
||||
profiles.sort()
|
||||
|
||||
|
||||
#login & password box must be created before list because of onProfileChange
|
||||
self.login_wid = AdvancedEdit(_('Login:'),align='center')
|
||||
self.pass_wid = Password(_('Password:'),align='center')
|
||||
|
||||
|
||||
self.list_profile = List(profiles, style=['single'], align='center', on_change=self.onProfileChange)
|
||||
|
||||
#new & delete buttons
|
||||
|
|
@ -96,7 +96,7 @@ class ProfileManager(urwid.WidgetWrap):
|
|||
self.host.bridge.deleteProfile(profile_name)
|
||||
self.__refillProfiles()
|
||||
self.host.removePopUp()
|
||||
|
||||
|
||||
def onNewProfile(self, e):
|
||||
pop_up_widget = InputDialog(_("New profile"), _("Please enter a new profile name"), cancel_cb=self.cancelDialog, ok_cb=self.newProfile)
|
||||
self.host.showPopUp(pop_up_widget)
|
||||
|
|
@ -117,7 +117,7 @@ class ProfileManager(urwid.WidgetWrap):
|
|||
if profile_name:
|
||||
self.host.bridge.asyncGetParamA("JabberID", "Connection", profile_key=profile_name, callback=setJID, errback=self.getParamError)
|
||||
self.host.bridge.asyncGetParamA("Password", "Connection", profile_key=profile_name, callback=setPassword, errback=self.getParamError)
|
||||
|
||||
|
||||
def onConnectProfile(self, button):
|
||||
profile_name = self.list_profile.getSelectedValue()
|
||||
if not profile_name:
|
||||
|
|
@ -136,7 +136,7 @@ class ProfileManager(urwid.WidgetWrap):
|
|||
def __old_jidReceived(self, old_jid, profile):
|
||||
self.host.bridge.asyncGetParamA("Password", "Connection", profile_key=profile,
|
||||
callback=lambda old_pass: self.__old_passReceived(old_jid, old_pass, profile), errback=self.getParamError)
|
||||
|
||||
|
||||
def __old_passReceived(self, old_jid, old_pass, profile):
|
||||
"""Check if we have new jid/pass, save them if it is the case, and plug profile"""
|
||||
new_jid = self.login_wid.get_edit_text()
|
||||
|
|
@ -148,7 +148,7 @@ class ProfileManager(urwid.WidgetWrap):
|
|||
if old_pass != new_pass:
|
||||
self.host.bridge.setParam("Password", new_pass, "Connection", profile)
|
||||
self.host.plug_profile(profile)
|
||||
|
||||
|
||||
def getParamError(self, ignore):
|
||||
popup = Alert("Error", _("Can't get profile parameter"), ok_cb=self.host.removePopUp)
|
||||
self.host.showPopUp(popup)
|
||||
|
|
|
|||
Loading…
Reference in a new issue