Remove trailing whitespaces.
This commit is contained in:
parent
310e2cc347
commit
27b3592e16
1 changed files with 899 additions and 899 deletions
|
|
@ -56,7 +56,7 @@ class ProfileManager(wx.Panel):
|
|||
self.sizer.Add(button_panel, flag=wx.CENTER)
|
||||
self.Bind(wx.EVT_BUTTON, self.onNewProfile, button_new)
|
||||
self.Bind(wx.EVT_BUTTON, self.onDeleteProfile, button_del)
|
||||
|
||||
|
||||
login_box = wx.StaticBox(self, -1, _("Login"))
|
||||
self.login_sizer = wx.StaticBoxSizer(login_box, wx.VERTICAL)
|
||||
self.sizer.Add(self.login_sizer, 1, wx.EXPAND | wx.ALL)
|
||||
|
|
@ -66,13 +66,13 @@ class ProfileManager(wx.Panel):
|
|||
self.login_pass = wx.TextCtrl(self, -1, style = wx.TE_PASSWORD)
|
||||
self.login_sizer.Add(wx.StaticText(self, -1, _("Password:")), 0, flag=wx.ALIGN_CENTER)
|
||||
self.login_sizer.Add(self.login_pass, flag=wx.EXPAND)
|
||||
|
||||
|
||||
loggin_button = wx.Button(self, -1, _("Connect"))
|
||||
self.Bind(wx.EVT_BUTTON, self.onConnectButton, loggin_button)
|
||||
self.login_sizer.Add(loggin_button, flag=wx.ALIGN_CENTER)
|
||||
|
||||
self.sizer.Add(wx.Window(self, -1), 1)
|
||||
|
||||
|
||||
#Now we can set the default value
|
||||
self.__setDefault()
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ class ProfileManager(wx.Panel):
|
|||
if profile_default:
|
||||
self.profile_name.SetValue(profile_default)
|
||||
self.onProfileChange(None)
|
||||
|
||||
|
||||
def __refillProfiles(self):
|
||||
"""Update profiles with current names. Must be called after a profile change"""
|
||||
self.profile_name.Clear()
|
||||
|
|
@ -90,8 +90,8 @@ class ProfileManager(wx.Panel):
|
|||
profiles.sort()
|
||||
for profile in profiles:
|
||||
self.profile_name.Append(profile)
|
||||
|
||||
|
||||
|
||||
|
||||
def onNewProfile(self, event):
|
||||
dlg = wx.TextEntryDialog(self, _("Please enter the new profile name"), _("New profile"), style = wx.OK | wx.CANCEL)
|
||||
if dlg.ShowModal() == wx.ID_OK:
|
||||
|
|
@ -104,7 +104,7 @@ class ProfileManager(wx.Panel):
|
|||
self.__refillProfiles()
|
||||
self.profile_name.SetValue(name)
|
||||
dlg.Destroy()
|
||||
|
||||
|
||||
def onDeleteProfile(self, event):
|
||||
name = self.profile_name.GetValue()
|
||||
if not name:
|
||||
|
|
@ -136,12 +136,12 @@ class ProfileManager(wx.Panel):
|
|||
return
|
||||
profile = self.host.bridge.getProfileName(name)
|
||||
assert(profile)
|
||||
|
||||
|
||||
self.host.bridge.asyncGetParamA("JabberID", "Connection", profile_key=profile, callback=lambda old_jid: self.__old_jidReceived(old_jid, profile), errback=self.getParamError)
|
||||
|
||||
|
||||
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):
|
||||
new_jid = self.login_jid.GetValue()
|
||||
new_pass = self.login_pass.GetValue()
|
||||
|
|
@ -153,7 +153,7 @@ class ProfileManager(wx.Panel):
|
|||
debug(_('Saving new password'))
|
||||
self.host.bridge.setParam("Password", new_pass, "Connection", profile)
|
||||
self.host.plug_profile(profile)
|
||||
|
||||
|
||||
|
||||
|
||||
def getParamError(self, ignore):
|
||||
wx.MessageDialog(self, _("Can't get profile parameter"), _("Profile error"), wx.ICON_ERROR).ShowModal()
|
||||
|
|
|
|||
Loading…
Reference in a new issue