def __init__( self, parent, subscription ):
     
     subscription = subscription.Duplicate()
     
     ClientGUIScrolledPanels.EditPanel.__init__( self, parent )
     
     self._original_subscription = subscription
     
     #
     
     self._name = wx.TextCtrl( self )
     
     #
     
     self._info_panel = ClientGUICommon.StaticBox( self, 'info' )
     
     self._last_checked_st = wx.StaticText( self._info_panel )
     self._next_check_st = wx.StaticText( self._info_panel )
     self._seed_info_st = wx.StaticText( self._info_panel )
     
     #
     
     self._query_panel = ClientGUICommon.StaticBox( self, 'site and query' )
     
     self._site_type = ClientGUICommon.BetterChoice( self._query_panel )
     
     site_types = []
     site_types.append( HC.SITE_TYPE_BOORU )
     site_types.append( HC.SITE_TYPE_DEVIANT_ART )
     site_types.append( HC.SITE_TYPE_HENTAI_FOUNDRY_ARTIST )
     site_types.append( HC.SITE_TYPE_HENTAI_FOUNDRY_TAGS )
     site_types.append( HC.SITE_TYPE_NEWGROUNDS )
     site_types.append( HC.SITE_TYPE_PIXIV_ARTIST_ID )
     site_types.append( HC.SITE_TYPE_PIXIV_TAG )
     site_types.append( HC.SITE_TYPE_TUMBLR )
     
     for site_type in site_types:
         
         self._site_type.Append( HC.site_type_string_lookup[ site_type ], site_type )
         
     
     self._site_type.Bind( wx.EVT_CHOICE, self.EventSiteChanged )
     
     self._query = wx.TextCtrl( self._query_panel )
     
     self._booru_selector = wx.ListBox( self._query_panel )
     self._booru_selector.Bind( wx.EVT_LISTBOX, self.EventBooruSelected )
     
     self._period = ClientGUICommon.TimeDeltaButton( self._query_panel, min = 3600 * 4, days = True, hours = True )
     self._period.Bind( ClientGUICommon.EVT_TIME_DELTA, self.EventPeriodChanged )
     
     #
     
     self._options_panel = ClientGUICommon.StaticBox( self, 'options' )
     
     menu_items = []
     
     invert_call = self._InvertGetTagsIfURLKnownAndFileRedundant
     value_call = self._GetTagsIfURLKnownAndFileRedundant
     
     check_manager = ClientGUICommon.CheckboxManagerCalls( invert_call, value_call )
     
     menu_items.append( ( 'check', 'get tags even if url is known and file is already in db (this downloader)', 'If this is selected, the client will fetch the tags from a file\'s page even if it has the file and already previously downloaded it from that location.', check_manager ) )
     
     menu_items.append( ( 'separator', 0, 0, 0 ) )
     
     check_manager = ClientGUICommon.CheckboxManagerOptions( 'get_tags_if_url_known_and_file_redundant' )
     
     menu_items.append( ( 'check', 'get tags even if url is known and file is already in db (default)', 'Set the default for this value.', check_manager ) )
     
     cog_button = ClientGUICommon.MenuBitmapButton( self._options_panel, CC.GlobalBMPs.cog, menu_items )
     
     self._initial_file_limit = ClientGUICommon.NoneableSpinCtrl( self._options_panel, '', none_phrase = 'get everything', min = 1, max = 1000000 )
     self._initial_file_limit.SetToolTipString( 'If set, the first sync will add no more than this many files. Otherwise, it will get everything the gallery has.' )
     
     self._periodic_file_limit = ClientGUICommon.NoneableSpinCtrl( self._options_panel, '', none_phrase = 'get everything', min = 1, max = 1000000 )
     self._periodic_file_limit.SetToolTipString( 'If set, normal syncs will add no more than this many files. Otherwise, they will get everything up until they find a file they have seen before.' )
     
     #
     
     self._control_panel = ClientGUICommon.StaticBox( self, 'control' )
     
     self._paused = wx.CheckBox( self._control_panel )
     
     self._seed_cache_button = ClientGUICommon.BetterBitmapButton( self, CC.GlobalBMPs.seed_cache, self._SeedCache )
     self._seed_cache_button.SetToolTipString( 'open detailed url cache status' )
     
     self._retry_failed = ClientGUICommon.BetterButton( self._control_panel, 'retry failed', self.RetryFailed )
     
     self._check_now_button = ClientGUICommon.BetterButton( self._control_panel, 'force check on dialog ok', self.CheckNow )
     
     self._reset_cache_button = ClientGUICommon.BetterButton( self._control_panel, 'reset url cache', self.ResetCache )
     
     #
     
     self._import_tag_options = ClientGUICollapsible.CollapsibleOptionsTags( self )
     
     self._import_file_options = ClientGUICollapsible.CollapsibleOptionsImportFiles( self )
     
     #
     
     ( name, gallery_identifier, gallery_stream_identifiers, query, period, self._get_tags_if_url_known_and_file_redundant, initial_file_limit, periodic_file_limit, paused, import_file_options, import_tag_options, self._last_checked, self._last_error, self._check_now, self._seed_cache ) = subscription.ToTuple()
     
     self._name.SetValue( name )
     
     site_type = gallery_identifier.GetSiteType()
     
     self._site_type.SelectClientData( site_type )
     
     self._PresentForSiteType()
     
     if site_type == HC.SITE_TYPE_BOORU:
         
         booru_name = gallery_identifier.GetAdditionalInfo()
         
         index = self._booru_selector.FindString( booru_name )
         
         if index != wx.NOT_FOUND:
             
             self._booru_selector.Select( index )
             
         
     
     # set gallery_stream_identifiers selection here--some kind of list of checkboxes or whatever
     
     self._query.SetValue( query )
     
     self._period.SetValue( period )
     
     self._initial_file_limit.SetValue( initial_file_limit )
     self._periodic_file_limit.SetValue( periodic_file_limit )
     
     self._paused.SetValue( paused )
     
     self._import_file_options.SetOptions( import_file_options )
     
     self._import_tag_options.SetOptions( import_tag_options )
     
     if self._last_checked == 0:
         
         self._reset_cache_button.Disable()
         
     
     if self._check_now:
         
         self._check_now_button.Disable()
         
     
     self._UpdateCommandButtons()
     self._UpdateLastNextCheck()
     self._UpdateSeedInfo()
     
     #
     
     self._info_panel.AddF( self._last_checked_st, CC.FLAGS_EXPAND_PERPENDICULAR )
     self._info_panel.AddF( self._next_check_st, CC.FLAGS_EXPAND_PERPENDICULAR )
     self._info_panel.AddF( self._seed_info_st, CC.FLAGS_EXPAND_PERPENDICULAR )
     
     #
     
     rows = []
     
     rows.append( ( 'search text: ', self._query ) )
     rows.append( ( 'check for new files every: ', self._period ) )
     
     gridbox = ClientGUICommon.WrapInGrid( self._query_panel, rows )
     
     self._query_panel.AddF( self._site_type, CC.FLAGS_EXPAND_PERPENDICULAR )
     self._query_panel.AddF( self._booru_selector, CC.FLAGS_EXPAND_PERPENDICULAR )
     self._query_panel.AddF( gridbox, CC.FLAGS_EXPAND_SIZER_PERPENDICULAR )
     
     #
     
     rows = []
     
     rows.append( ( 'on first check, get at most this many files: ', self._initial_file_limit ) )
     rows.append( ( 'on normal checks, get at most this many newer files: ', self._periodic_file_limit ) )
     
     gridbox = ClientGUICommon.WrapInGrid( self._options_panel, rows )
     
     self._options_panel.AddF( cog_button, CC.FLAGS_LONE_BUTTON )
     self._options_panel.AddF( gridbox, CC.FLAGS_EXPAND_SIZER_PERPENDICULAR )
     
     #
     
     self._control_panel.AddF( self._seed_cache_button, CC.FLAGS_LONE_BUTTON )
     
     rows = []
     
     rows.append( ( 'currently paused: ', self._paused ) )
     
     gridbox = ClientGUICommon.WrapInGrid( self._control_panel, rows )
     
     self._control_panel.AddF( gridbox, CC.FLAGS_LONE_BUTTON )
     self._control_panel.AddF( self._retry_failed, CC.FLAGS_LONE_BUTTON )
     self._control_panel.AddF( self._check_now_button, CC.FLAGS_LONE_BUTTON )
     self._control_panel.AddF( self._reset_cache_button, CC.FLAGS_LONE_BUTTON )
     
     #
     
     vbox = wx.BoxSizer( wx.VERTICAL )
     
     vbox.AddF( ClientGUICommon.WrapInText( self._name, self, 'name: ' ), CC.FLAGS_EXPAND_SIZER_PERPENDICULAR )
     vbox.AddF( self._info_panel, CC.FLAGS_EXPAND_PERPENDICULAR )
     vbox.AddF( self._query_panel, CC.FLAGS_EXPAND_PERPENDICULAR )
     vbox.AddF( self._options_panel, CC.FLAGS_EXPAND_PERPENDICULAR )
     vbox.AddF( self._control_panel, CC.FLAGS_EXPAND_PERPENDICULAR )
     vbox.AddF( self._import_tag_options, CC.FLAGS_EXPAND_PERPENDICULAR )
     vbox.AddF( self._import_file_options, CC.FLAGS_EXPAND_PERPENDICULAR )
     
     self.SetSizer( vbox )
 def __init__( self, parent, info ):
     
     ClientGUIScrolledPanels.EditPanel.__init__( self, parent )
     
     self._original_info = info
     
     ( self._mime, media_show_action, preview_show_action, ( media_scale_up, media_scale_down, preview_scale_up, preview_scale_down, exact_zooms_only, scale_up_quality, scale_down_quality ) ) = self._original_info
     
     possible_actions = CC.media_viewer_capabilities[ self._mime ]
     
     self._media_show_action = ClientGUICommon.BetterChoice( self )
     self._preview_show_action = ClientGUICommon.BetterChoice( self )
     
     for action in possible_actions:
         
         self._media_show_action.Append( CC.media_viewer_action_string_lookup[ action ], action )
         
         if action != CC.MEDIA_VIEWER_ACTION_DO_NOT_SHOW_ON_ACTIVATION_OPEN_EXTERNALLY:
             
             self._preview_show_action.Append( CC.media_viewer_action_string_lookup[ action ], action )
             
         
     
     self._media_show_action.Bind( wx.EVT_CHOICE, self.EventActionChange )
     self._preview_show_action.Bind( wx.EVT_CHOICE, self.EventActionChange )
     
     self._media_scale_up = ClientGUICommon.BetterChoice( self )
     self._media_scale_down = ClientGUICommon.BetterChoice( self )
     self._preview_scale_up = ClientGUICommon.BetterChoice( self )
     self._preview_scale_down = ClientGUICommon.BetterChoice( self )
     
     for scale_action in ( CC.MEDIA_VIEWER_SCALE_100, CC.MEDIA_VIEWER_SCALE_MAX_REGULAR, CC.MEDIA_VIEWER_SCALE_TO_CANVAS ):
         
         text = CC.media_viewer_scale_string_lookup[ scale_action ]
         
         self._media_scale_up.Append( text, scale_action )
         self._preview_scale_up.Append( text, scale_action )
         
         if scale_action != CC.MEDIA_VIEWER_SCALE_100:
             
             self._media_scale_down.Append( text, scale_action )
             self._preview_scale_down.Append( text, scale_action )
             
         
     
     self._exact_zooms_only = wx.CheckBox( self, label = 'only permit half and double zooms' )
     self._exact_zooms_only.SetToolTipString( 'This limits zooms to 25%, 50%, 100%, 200%, 400%, and so on. It makes for fast resize and is useful for files that often have flat colours and hard edges, which often scale badly otherwise. The \'canvas fit\' zoom will still be inserted.' )
     
     self._scale_up_quality = ClientGUICommon.BetterChoice( self )
     
     for zoom in ( CC.ZOOM_NEAREST, CC.ZOOM_LINEAR, CC.ZOOM_CUBIC, CC.ZOOM_LANCZOS4 ):
         
         self._scale_up_quality.Append( CC.zoom_string_lookup[ zoom ], zoom )
         
     
     self._scale_down_quality = ClientGUICommon.BetterChoice( self )
     
     for zoom in ( CC.ZOOM_NEAREST, CC.ZOOM_LINEAR, CC.ZOOM_AREA ):
         
         self._scale_down_quality.Append( CC.zoom_string_lookup[ zoom ], zoom )
         
     
     #
     
     self._media_show_action.SelectClientData( media_show_action )
     self._preview_show_action.SelectClientData( preview_show_action )
     
     self._media_scale_up.SelectClientData( media_scale_up )
     self._media_scale_down.SelectClientData( media_scale_down )
     self._preview_scale_up.SelectClientData( preview_scale_up )
     self._preview_scale_down.SelectClientData( preview_scale_down )
     
     self._exact_zooms_only.SetValue( exact_zooms_only )
     
     self._scale_up_quality.SelectClientData( scale_up_quality )
     self._scale_down_quality.SelectClientData( scale_down_quality )
     
     #
     
     vbox = wx.BoxSizer( wx.VERTICAL )
     
     text = 'Setting media view options for ' + HC.mime_string_lookup[ self._mime ] + '.'
     
     vbox.AddF( wx.StaticText( self, label = text ), CC.FLAGS_EXPAND_PERPENDICULAR )
     vbox.AddF( ClientGUICommon.WrapInText( self._media_show_action, self, 'media viewer show action:' ), CC.FLAGS_EXPAND_SIZER_PERPENDICULAR )
     vbox.AddF( ClientGUICommon.WrapInText( self._preview_show_action, self, 'preview show action:' ), CC.FLAGS_EXPAND_SIZER_PERPENDICULAR )
     
     if possible_actions == CC.no_support:
         
         self._media_scale_up.Hide()
         self._media_scale_down.Hide()
         self._preview_scale_up.Hide()
         self._preview_scale_down.Hide()
         
         self._exact_zooms_only.Hide()
         
         self._scale_up_quality.Hide()
         self._scale_down_quality.Hide()
         
     else:
         
         rows = []
         
         rows.append( ( 'if the media is smaller than the media viewer canvas: ', self._media_scale_up ) )
         rows.append( ( 'if the media is larger than the media viewer canvas: ', self._media_scale_down ) )
         rows.append( ( 'if the media is smaller than the preview canvas: ', self._preview_scale_up) )
         rows.append( ( 'if the media is larger than the preview canvas: ', self._preview_scale_down ) )
         
         gridbox = ClientGUICommon.WrapInGrid( self, rows )
         
         vbox.AddF( gridbox, CC.FLAGS_EXPAND_SIZER_PERPENDICULAR )
         
         vbox.AddF( self._exact_zooms_only, CC.FLAGS_EXPAND_PERPENDICULAR )
         
         vbox.AddF( wx.StaticText( self, label = 'Nearest neighbour is fast and ugly, 8x8 lanczos and area resampling are slower but beautiful.' ), CC.FLAGS_VCENTER )
         
         vbox.AddF( ClientGUICommon.WrapInText( self._scale_up_quality, self, '>100% (interpolation) quality:' ), CC.FLAGS_EXPAND_SIZER_PERPENDICULAR )
         vbox.AddF( ClientGUICommon.WrapInText( self._scale_down_quality, self, '<100% (decimation) quality:' ), CC.FLAGS_EXPAND_SIZER_PERPENDICULAR )
         
     
     if self._mime == HC.APPLICATION_FLASH:
         
         self._scale_up_quality.Disable()
         self._scale_down_quality.Disable()
         
     
     self.SetSizer( vbox )
 def __init__( self, parent, service_type, account_type ):
     
     ClientGUIScrolledPanels.EditPanel.__init__( self, parent )
     
     ( self._account_type_key, title, permissions, bandwidth_rules ) = account_type.ToTuple()
     
     self._title = wx.TextCtrl( self )
     
     permission_choices = self._GeneratePermissionChoices( service_type )
     
     self._permission_controls = []
     
     self._permissions_panel = ClientGUICommon.StaticBox( self, 'permissions' )
     
     gridbox_rows = []
     
     for ( content_type, action_rows ) in permission_choices:
         
         choice_control = ClientGUICommon.BetterChoice( self._permissions_panel )
         
         for ( label, action ) in action_rows:
             
             choice_control.Append( label, ( content_type, action ) )
             
         
         if content_type in permissions:
             
             selection_row = ( content_type, permissions[ content_type ] )
             
         else:
             
             selection_row = ( content_type, None )
             
         
         try:
             
             choice_control.SelectClientData( selection_row )
             
         except:
             
             choice_control.SelectClientData( ( content_type, None ) )
             
         
         self._permission_controls.append( choice_control )
         
         gridbox_label = HC.content_type_string_lookup[ content_type ]
         
         gridbox_rows.append( ( gridbox_label, choice_control ) )
         
     
     gridbox = ClientGUICommon.WrapInGrid( self._permissions_panel, gridbox_rows )
     
     self._bandwidth_rules_control = ClientGUIControls.BandwidthRulesCtrl( self, bandwidth_rules )
     
     #
     
     self._title.SetValue( title )
     
     #
     
     t_hbox = ClientGUICommon.WrapInText( self._title, self, 'title: ' )
     
     self._permissions_panel.AddF( gridbox, CC.FLAGS_EXPAND_SIZER_PERPENDICULAR )
     
     vbox = wx.BoxSizer( wx.VERTICAL )
     
     vbox.AddF( t_hbox, CC.FLAGS_EXPAND_SIZER_PERPENDICULAR )
     vbox.AddF( self._permissions_panel, CC.FLAGS_EXPAND_PERPENDICULAR )
     vbox.AddF( self._bandwidth_rules_control, CC.FLAGS_EXPAND_PERPENDICULAR )
     
     self.SetSizer( vbox )
示例#4
0
    def __init__(self,
                 parent,
                 tag_filter,
                 prefer_blacklist=False,
                 namespaces=None,
                 message=None):

        ClientGUIScrolledPanels.EditPanel.__init__(self, parent)

        self._namespaces = namespaces

        #

        help_button = ClientGUICommon.BetterBitmapButton(
            self, CC.GlobalBMPs.help, self._ShowHelp)

        help_hbox = ClientGUICommon.WrapInText(help_button, self,
                                               'help for this panel -->',
                                               wx.Colour(0, 0, 255))

        #

        self._notebook = wx.Notebook(self)

        #

        self._advanced_panel = self._InitAdvancedPanel()

        self._whitelist_panel = self._InitWhitelistPanel()
        self._blacklist_panel = self._InitBlacklistPanel()

        #

        if prefer_blacklist:

            self._notebook.AddPage(self._blacklist_panel, 'blacklist')
            self._notebook.AddPage(self._whitelist_panel, 'whitelist')

        else:

            self._notebook.AddPage(self._whitelist_panel, 'whitelist')
            self._notebook.AddPage(self._blacklist_panel, 'blacklist')

        self._notebook.AddPage(self._advanced_panel, 'advanced')

        blacklist_tag_slices = [
            tag_slice
            for (tag_slice, rule) in tag_filter.GetTagSlicesToRules().items()
            if rule == CC.FILTER_BLACKLIST
        ]
        whitelist_tag_slices = [
            tag_slice
            for (tag_slice, rule) in tag_filter.GetTagSlicesToRules().items()
            if rule == CC.FILTER_WHITELIST
        ]

        self._advanced_blacklist.AddTags(blacklist_tag_slices)
        self._advanced_whitelist.AddTags(whitelist_tag_slices)

        (whitelist_possible,
         blacklist_possible) = self._GetWhiteBlacklistsPossible()

        selection_tests = []

        if prefer_blacklist:

            selection_tests.append((blacklist_possible, 0))
            selection_tests.append((whitelist_possible, 1))
            selection_tests.append((True, 2))

        else:

            selection_tests.append((whitelist_possible, 0))
            selection_tests.append((blacklist_possible, 1))
            selection_tests.append((True, 2))

        for (test, index) in selection_tests:

            if test:

                self._notebook.SetSelection(index)

                break

        #

        self._redundant_st = ClientGUICommon.BetterStaticText(self, '')

        self._current_filter_st = ClientGUICommon.BetterStaticText(
            self, 'currently keeping: ')

        #

        vbox = wx.BoxSizer(wx.VERTICAL)

        vbox.Add(help_hbox, CC.FLAGS_BUTTON_SIZER)

        if message is not None:

            vbox.Add(ClientGUICommon.BetterStaticText(self, message),
                     CC.FLAGS_EXPAND_PERPENDICULAR)

        vbox.Add(self._notebook, CC.FLAGS_EXPAND_BOTH_WAYS)
        vbox.Add(self._redundant_st, CC.FLAGS_EXPAND_PERPENDICULAR)
        vbox.Add(self._current_filter_st, CC.FLAGS_EXPAND_PERPENDICULAR)

        self.SetSizer(vbox)

        #

        self._advanced_panel.Bind(ClientGUIListBoxes.EVT_LIST_BOX,
                                  self.EventListBoxChanged)
        self._simple_whitelist_global_checkboxes.Bind(
            wx.EVT_CHECKLISTBOX, self.EventSimpleWhitelistGlobalCheck)
        self._simple_whitelist_namespace_checkboxes.Bind(
            wx.EVT_CHECKLISTBOX, self.EventSimpleWhitelistNamespaceCheck)
        self._simple_blacklist_global_checkboxes.Bind(
            wx.EVT_CHECKLISTBOX, self.EventSimpleBlacklistGlobalCheck)
        self._simple_blacklist_namespace_checkboxes.Bind(
            wx.EVT_CHECKLISTBOX, self.EventSimpleBlacklistNamespaceCheck)

        self._UpdateStatus()
示例#5
0
    def __init__(self, parent, checker_options):

        ClientGUIScrolledPanels.EditPanel.__init__(self, parent)

        help_button = ClientGUICommon.BetterBitmapButton(
            self, CC.GlobalBMPs.help, self._ShowHelp)
        help_button.SetToolTip('Show help regarding these checker options.')

        help_hbox = ClientGUICommon.WrapInText(help_button, self,
                                               'help for this panel -->',
                                               wx.Colour(0, 0, 255))

        # add statictext or whatever that will update on any updates above to say 'given velocity of blah and last check at blah, next check in 5 mins'
        # or indeed this could just take the seed cache and last check of the caller, if there is one
        # this would be more useful to the user, to know 'right, on ok, it'll refresh in 30 mins'

        self._intended_files_per_check = wx.SpinCtrl(self, min=1, max=1000)

        self._never_faster_than = TimeDeltaCtrl(self,
                                                min=30,
                                                days=True,
                                                hours=True,
                                                minutes=True,
                                                seconds=True)

        self._never_slower_than = TimeDeltaCtrl(self,
                                                min=600,
                                                days=True,
                                                hours=True,
                                                minutes=True)

        self._death_file_velocity = VelocityCtrl(self,
                                                 min_time_delta=60,
                                                 days=True,
                                                 hours=True,
                                                 minutes=True,
                                                 per_phrase='in',
                                                 unit='files')

        #

        (intended_files_per_check, never_faster_than, never_slower_than,
         death_file_velocity) = checker_options.ToTuple()

        self._intended_files_per_check.SetValue(intended_files_per_check)
        self._never_faster_than.SetValue(never_faster_than)
        self._never_slower_than.SetValue(never_slower_than)
        self._death_file_velocity.SetValue(death_file_velocity)

        #

        rows = []

        rows.append(
            ('intended new files per check: ', self._intended_files_per_check))
        rows.append(('stop checking if new files found falls below: ',
                     self._death_file_velocity))
        rows.append(
            ('never check faster than once per: ', self._never_faster_than))
        rows.append(
            ('never check slower than once per: ', self._never_slower_than))

        gridbox = ClientGUICommon.WrapInGrid(self, rows)

        vbox = wx.BoxSizer(wx.VERTICAL)

        vbox.Add(help_hbox, CC.FLAGS_BUTTON_SIZER)
        vbox.Add(gridbox, CC.FLAGS_EXPAND_SIZER_PERPENDICULAR)

        self.SetSizer(vbox)
示例#6
0
 def __init__( self, parent, checker_options ):
     
     ClientGUIScrolledPanels.EditPanel.__init__( self, parent )
     
     help_button = ClientGUICommon.BetterBitmapButton( self, CC.GlobalBMPs.help, self._ShowHelp )
     help_button.SetToolTip( 'Show help regarding these checker options.' )
     
     help_hbox = ClientGUICommon.WrapInText( help_button, self, 'help for this panel -->', wx.Colour( 0, 0, 255 ) )
     
     import ClientDefaults
     
     defaults_panel = ClientGUICommon.StaticBox( self, 'reasonable defaults' )
     
     defaults_1 = ClientGUICommon.BetterButton( defaults_panel, 'thread', self.SetValue, ClientDefaults.GetDefaultCheckerOptions( 'thread' ) )
     defaults_2 = ClientGUICommon.BetterButton( defaults_panel, 'slow thread', self.SetValue, ClientDefaults.GetDefaultCheckerOptions( 'slow thread' ) )
     defaults_3 = ClientGUICommon.BetterButton( defaults_panel, 'faster tag subscription', self.SetValue, ClientDefaults.GetDefaultCheckerOptions( 'fast tag subscription' ) )
     defaults_4 = ClientGUICommon.BetterButton( defaults_panel, 'medium tag/artist subscription', self.SetValue, ClientDefaults.GetDefaultCheckerOptions( 'artist subscription' ) )
     defaults_5 = ClientGUICommon.BetterButton( defaults_panel, 'slower tag subscription', self.SetValue, ClientDefaults.GetDefaultCheckerOptions( 'slow tag subscription' ) )
     
     #
     
     # add statictext or whatever that will update on any updates above to say 'given velocity of blah and last check at blah, next check in 5 mins'
     # or indeed this could just take the file_seed cache and last check of the caller, if there is one
     # this would be more useful to the user, to know 'right, on ok, it'll refresh in 30 mins'
     # this is actually more complicated--it also needs last check time to calc a fresh file velocity based on new death_file_velocity
     
     #
     
     self._death_file_velocity = VelocityCtrl( self, min_time_delta = 60, days = True, hours = True, minutes = True, per_phrase = 'in', unit = 'files' )
     
     self._flat_check_period_checkbox = wx.CheckBox( self )
     
     #
     
     self._reactive_check_panel = ClientGUICommon.StaticBox( self, 'reactive checking' )
     
     self._intended_files_per_check = wx.SpinCtrl( self._reactive_check_panel, min = 1, max = 1000 )
     
     self._never_faster_than = TimeDeltaCtrl( self._reactive_check_panel, min = 30, days = True, hours = True, minutes = True, seconds = True )
     
     self._never_slower_than = TimeDeltaCtrl( self._reactive_check_panel, min = 600, days = True, hours = True, minutes = True )
     
     #
     
     self._static_check_panel = ClientGUICommon.StaticBox( self, 'static checking' )
     
     self._flat_check_period = TimeDeltaCtrl( self._static_check_panel, min = 180, days = True, hours = True, minutes = True )
     
     #
     
     self.SetValue( checker_options )
     
     #
     
     defaults_panel.Add( defaults_1, CC.FLAGS_EXPAND_PERPENDICULAR )
     defaults_panel.Add( defaults_2, CC.FLAGS_EXPAND_PERPENDICULAR )
     defaults_panel.Add( defaults_3, CC.FLAGS_EXPAND_PERPENDICULAR )
     defaults_panel.Add( defaults_4, CC.FLAGS_EXPAND_PERPENDICULAR )
     defaults_panel.Add( defaults_5, CC.FLAGS_EXPAND_PERPENDICULAR )
     
     #
     
     rows = []
     
     rows.append( ( 'intended new files per check: ', self._intended_files_per_check ) )
     rows.append( ( 'never check faster than once per: ', self._never_faster_than ) )
     rows.append( ( 'never check slower than once per: ', self._never_slower_than ) )
     
     gridbox = ClientGUICommon.WrapInGrid( self._reactive_check_panel, rows )
     
     self._reactive_check_panel.Add( gridbox, CC.FLAGS_EXPAND_SIZER_PERPENDICULAR )
     
     #
     
     rows = []
     
     rows.append( ( 'check period: ', self._flat_check_period ) )
     
     gridbox = ClientGUICommon.WrapInGrid( self._static_check_panel, rows )
     
     self._static_check_panel.Add( gridbox, CC.FLAGS_EXPAND_SIZER_PERPENDICULAR )
     
     #
     
     rows = []
     
     rows.append( ( 'stop checking if new files found falls below: ', self._death_file_velocity ) )
     rows.append( ( 'just check at a static, regular interval: ', self._flat_check_period_checkbox ) )
     
     gridbox = ClientGUICommon.WrapInGrid( self, rows )
     
     vbox = wx.BoxSizer( wx.VERTICAL )
     
     vbox.Add( help_hbox, CC.FLAGS_BUTTON_SIZER )
     vbox.Add( defaults_panel, CC.FLAGS_EXPAND_PERPENDICULAR )
     vbox.Add( gridbox, CC.FLAGS_EXPAND_SIZER_PERPENDICULAR )
     vbox.Add( self._reactive_check_panel, CC.FLAGS_EXPAND_PERPENDICULAR )
     vbox.Add( self._static_check_panel, CC.FLAGS_EXPAND_PERPENDICULAR )
     
     self.SetSizer( vbox )
     
     #
     
     self._flat_check_period_checkbox.Bind( wx.EVT_CHECKBOX, self.EventFlatPeriodCheck )