Fixed Discovery panel in URI Editor dialog : double click works back again, and avoid setting URI to unicode type.
authorEdouard Tisserant
Wed, 05 Dec 2018 13:04:37 +0100
changeset 2466 98d28d809488
parent 2465 47d3aea2be30
child 2467 fce6ab7ae156
Fixed Discovery panel in URI Editor dialog : double click works back again, and avoid setting URI to unicode type.
controls/DiscoveryPanel.py
--- a/controls/DiscoveryPanel.py	Wed Dec 05 13:03:09 2018 +0100
+++ b/controls/DiscoveryPanel.py	Wed Dec 05 13:04:37 2018 +0100
@@ -110,6 +110,8 @@
     def __init__(self, parent):
         wx.Panel.__init__(self, parent)
 
+        self.parent = parent
+
         self._init_list_ctrl()
         listmix.ColumnSorterMixin.__init__(self, 4)
 
@@ -153,7 +155,7 @@
 
     def OnItemActivated(self, event):
         self.SetURI(event.m_itemIndex)
-        self.EndModal(wx.ID_OK)
+        self.parent.EndModal(wx.ID_OK)
         event.Skip()
 
 #    def SetURI(self, idx):
@@ -167,7 +169,7 @@
         self.LatestSelection = idx
         svcname = self.getColumnText(idx, 0)
         connect_type = self.getColumnText(idx, 1)
-        self.URI = "%s://%s" % (connect_type, svcname + '.' + service_type)
+        self.URI = str("%s://%s" % (connect_type, svcname + '.' + service_type))
 
     def GetURI(self):
         if self.LatestSelection is not None: