fix issue with changing annonced Pyro service name via taskbar icon
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Wed, 07 Dec 2016 18:25:37 +0300
changeset 1594 049b7144a710
parent 1593 6a27490fed96
child 1595 b3cc68dd037d
fix issue with changing annonced Pyro service name via taskbar icon
Beremiz_service.py
--- a/Beremiz_service.py	Wed Dec 07 18:23:59 2016 +0300
+++ b/Beremiz_service.py	Wed Dec 07 18:25:37 2016 +0300
@@ -310,10 +310,12 @@
                     self.pyroserver.Stop()
 
             def OnTaskBarChangeName(self, evt):
-                dlg = ParamsEntryDialog(None, _("Enter a name "), defaultValue=self.pyroserver.name)
+                servicename = self.pyroserver.servicename
+                servicename = '' if servicename is None else servicename
+                dlg = ParamsEntryDialog(None, _("Enter a name "), defaultValue=servicename)
                 dlg.SetTests([(lambda name : len(name) is not 0 , _("Name must not be null!"))])
                 if dlg.ShowModal() == wx.ID_OK:
-                    self.pyroserver.name = dlg.GetValue()
+                    self.pyroserver.servicename = dlg.GetValue()
                     self.pyroserver.Restart()
 
             def _LiveShellLocals(self):