311 ip_addr = self.pyroserver.ip_addr |
311 ip_addr = self.pyroserver.ip_addr |
312 ip_addr = '' if ip_addr is None else ip_addr |
312 ip_addr = '' if ip_addr is None else ip_addr |
313 dlg = ParamsEntryDialog(None, _("Enter the IP of the interface to bind"), defaultValue=ip_addr) |
313 dlg = ParamsEntryDialog(None, _("Enter the IP of the interface to bind"), defaultValue=ip_addr) |
314 dlg.SetTests([(re.compile('\d{1,3}(?:\.\d{1,3}){3}$').match, _("IP is not valid!")), |
314 dlg.SetTests([(re.compile('\d{1,3}(?:\.\d{1,3}){3}$').match, _("IP is not valid!")), |
315 (lambda x:len([x for x in x.split(".") if 0 <= int(x) <= 255]) == 4, |
315 (lambda x:len([x for x in x.split(".") if 0 <= int(x) <= 255]) == 4, |
316 _("IP is not valid!")) |
316 _("IP is not valid!"))]) |
317 ]) |
|
318 if dlg.ShowModal() == wx.ID_OK: |
317 if dlg.ShowModal() == wx.ID_OK: |
319 self.pyroserver.ip_addr = dlg.GetValue() |
318 self.pyroserver.ip_addr = dlg.GetValue() |
320 self.pyroserver.Stop() |
319 self.pyroserver.Stop() |
321 |
320 |
322 def OnTaskBarChangePort(self, evt): |
321 def OnTaskBarChangePort(self, evt): |