Exemple #1
0
 def __init__( self, parent ):
     
     PanelPredicateSystem.__init__( self, parent )
     
     choices = [ '<', u'\u2248', '=', '>' ]
     
     self._sign = wx.RadioBox( self, choices = choices, style = wx.RA_SPECIFY_COLS )
     
     self._num = wx.SpinCtrl( self, min = 0, max = 65535 )
     
     choices = [ ( HC.duplicate_type_string_lookup[ status ], status ) for status in ( HC.DUPLICATE_BETTER_OR_WORSE, HC.DUPLICATE_BETTER, HC.DUPLICATE_WORSE, HC.DUPLICATE_SAME_QUALITY, HC.DUPLICATE_ALTERNATE, HC.DUPLICATE_NOT_DUPLICATE, HC.DUPLICATE_UNKNOWN ) ]
     
     self._dupe_type = ClientGUICommon.BetterRadioBox( self, choices = choices, style = wx.RA_SPECIFY_ROWS )
     
     #
     
     self._sign.SetStringSelection( '>' )
     self._num.SetValue( 0 )
     
     #
     
     hbox = wx.BoxSizer( wx.HORIZONTAL )
     
     hbox.Add( ClientGUICommon.BetterStaticText( self, 'system:num duplicate relationships' ), CC.FLAGS_VCENTER )
     hbox.Add( self._sign, CC.FLAGS_VCENTER )
     hbox.Add( self._num, CC.FLAGS_VCENTER )
     hbox.Add( self._dupe_type, CC.FLAGS_VCENTER )
     
     self.SetSizer( hbox )
     
     wx.CallAfter( self._num.SetFocus )
    def __init__(self, parent):

        PanelPredicateSystem.__init__(self, parent)

        self._sign = ClientGUICommon.BetterRadioBox(self,
                                                    choices=[('is', True),
                                                             ('is not', False)
                                                             ],
                                                    style=wx.RA_SPECIFY_ROWS)

        self._current_pending = ClientGUICommon.BetterRadioBox(
            self,
            choices=[('currently in', HC.CONTENT_STATUS_CURRENT),
                     ('pending to', HC.CONTENT_STATUS_PENDING)],
            style=wx.RA_SPECIFY_ROWS)

        services = HG.client_controller.services_manager.GetServices(
            HC.FILE_SERVICES)

        choices = [(service.GetName(), service.GetServiceKey())
                   for service in services]

        self._file_service_key = ClientGUICommon.BetterRadioBox(
            self, choices=choices, style=wx.RA_SPECIFY_ROWS)

        hbox = wx.BoxSizer(wx.HORIZONTAL)

        hbox.Add(
            ClientGUICommon.BetterStaticText(self, 'system:file service:'),
            CC.FLAGS_VCENTER)
        hbox.Add(self._sign, CC.FLAGS_VCENTER)
        hbox.Add(self._current_pending, CC.FLAGS_VCENTER)
        hbox.Add(self._file_service_key, CC.FLAGS_VCENTER)

        self.SetSizer(hbox)

        wx.CallAfter(self._sign.SetFocus)