core, memory, plugins, stdui, frontends: look for DNS SRV records when server is not specified:

- fix bug 3
    - modify "Connection" params:
          - rename "Server" to "Force server" and "Port" to "Force port"
          - set the default value to empty string for both
This commit is contained in:
souliane 2014-06-23 00:44:10 +02:00
commit d4eff5b99c
4 changed files with 26 additions and 19 deletions

View file

@ -95,7 +95,7 @@ class ProfileCreate(base.CommandBase):
def _profile_created(self):
self.host.bridge.setParam("JabberID", self.args.jid, "Connection" ,profile_key=self.args.profile)
self.host.bridge.setParam("Server", JID(self.args.jid).domain, "Connection", profile_key=self.args.profile)
self.host.bridge.setParam(C.FORCE_SERVER_PARAM, JID(self.args.jid).domain, "Connection", profile_key=self.args.profile)
self.host.bridge.setParam("Password", self.args.password, "Connection", profile_key=self.args.profile)
self.host.quit()

View file

@ -167,7 +167,7 @@ class ProfileManager(urwid.WidgetWrap):
if old_jid != new_jid:
self.host.bridge.setParam("JabberID", new_jid, "Connection", profile_key=profile)
self.host.bridge.setParam("Server", JID(new_jid).domain, "Connection", profile_key=profile)
self.host.bridge.setParam(C.FORCE_SERVER_PARAM, JID(new_jid).domain, "Connection", profile_key=profile)
if old_pass != new_pass:
self.host.bridge.setParam("Password", new_pass, "Connection", profile_key=profile)
self.host.plug_profile(profile)

View file

@ -174,7 +174,7 @@ class ProfileManager(wx.Panel):
if old_jid != new_jid:
log.debug(_('Saving new JID and server'))
self.host.bridge.setParam("JabberID", new_jid, "Connection", profile_key=profile)
self.host.bridge.setParam("Server", JID(new_jid).domain, "Connection", profile_key=profile)
self.host.bridge.setParam(C.FORCE_SERVER_PARAM, JID(new_jid).domain, "Connection", profile_key=profile)
if old_pass != new_pass:
log.debug(_('Saving new password'))
self.host.bridge.setParam("Password", new_pass, "Connection", profile_key=profile)

View file

@ -320,7 +320,7 @@ class XMLUI(xmlui.XMLUI, wx.Frame):
if (ctrl._param_category, param_name) == ('Connection', 'JabberID'):
domain = JID(ctrl._xmluiGetValue()).domain
for widget in (ctl['control'] for ctl in self.ctrl_list.values()):
if (widget._param_category, widget._param_name) == ('Connection', 'Server'):
if (widget._param_category, widget._param_name) == ('Connection', C.FORCE_SERVER_PARAM):
widget.SetValue(domain)
break