dialogs/DiscoveryDialog.py
changeset 1495 078047c3ab85
parent 1494 00910a8572d9
child 1571 486f94a8032c
equal deleted inserted replaced
1494:00910a8572d9 1495:078047c3ab85
    76     
    76     
    77     def _init_ctrls(self, prnt):
    77     def _init_ctrls(self, prnt):
    78         wx.Dialog.__init__(self, id=ID_DISCOVERYDIALOG, 
    78         wx.Dialog.__init__(self, id=ID_DISCOVERYDIALOG, 
    79               name='DiscoveryDialog', parent=prnt,  
    79               name='DiscoveryDialog', parent=prnt,  
    80               size=wx.Size(600, 600), style=wx.DEFAULT_DIALOG_STYLE,
    80               size=wx.Size(600, 600), style=wx.DEFAULT_DIALOG_STYLE,
    81               title='Service Discovery')
    81               title=_('Service Discovery'))
    82         
    82         
    83         self.staticText1 = wx.StaticText(id=ID_DISCOVERYDIALOGSTATICTEXT1,
    83         self.staticText1 = wx.StaticText(id=ID_DISCOVERYDIALOGSTATICTEXT1,
    84               label=_('Services available:'), name='staticText1', parent=self,
    84               label=_('Services available:'), name='staticText1', parent=self,
    85               pos=wx.Point(0, 0), size=wx.DefaultSize, style=0)
    85               pos=wx.Point(0, 0), size=wx.DefaultSize, style=0)
    86         
    86         
    87         # Set up list control
    87         # Set up list control
    88         self.ServicesList = AutoWidthListCtrl(id=ID_DISCOVERYDIALOGSERVICESLIST,
    88         self.ServicesList = AutoWidthListCtrl(id=ID_DISCOVERYDIALOGSERVICESLIST,
    89               name='ServicesList', parent=self, pos=wx.Point(0, 0), size=wx.Size(0, 0), 
    89               name='ServicesList', parent=self, pos=wx.Point(0, 0), size=wx.Size(0, 0), 
    90               style=wx.LC_REPORT|wx.LC_EDIT_LABELS|wx.LC_SORT_ASCENDING|wx.LC_SINGLE_SEL)
    90               style=wx.LC_REPORT|wx.LC_EDIT_LABELS|wx.LC_SORT_ASCENDING|wx.LC_SINGLE_SEL)
    91         self.ServicesList.InsertColumn(0, 'NAME')
    91         self.ServicesList.InsertColumn(0, _('NAME'))
    92         self.ServicesList.InsertColumn(1, 'TYPE')
    92         self.ServicesList.InsertColumn(1, _('TYPE'))
    93         self.ServicesList.InsertColumn(2, 'IP')
    93         self.ServicesList.InsertColumn(2, _('IP'))
    94         self.ServicesList.InsertColumn(3, 'PORT')
    94         self.ServicesList.InsertColumn(3, _('PORT'))
    95         self.ServicesList.SetColumnWidth(0, 150)
    95         self.ServicesList.SetColumnWidth(0, 150)
    96         self.ServicesList.SetColumnWidth(1, 150)
    96         self.ServicesList.SetColumnWidth(1, 150)
    97         self.ServicesList.SetColumnWidth(2, 150)
    97         self.ServicesList.SetColumnWidth(2, 150)
    98         self.ServicesList.SetColumnWidth(3, 150)
    98         self.ServicesList.SetColumnWidth(3, 150)
    99         self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnItemSelected, id=ID_DISCOVERYDIALOGSERVICESLIST)
    99         self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnItemSelected, id=ID_DISCOVERYDIALOGSERVICESLIST)