         project = @visible_projects()[0]
         if project?
             open_project(project: project.project_id)
+    ###
+    # Consolidate the next two functions.
+    ###
+
+    # Returns true if this project has any hidden files
+    has_hidden_files : ->
+        for project in @project_list()
+            if project_is_in_filter(project, true, false)
+                return true
+        return false
+
+
+    # Returns true if this project has any deleted files
+    has_deleted_files : ->
+        for project in @project_list()
+            if project_is_in_filter(project, false, true)
+                return true
+        return false
 
     render : ->
         if not @props.project_map?

                    description_text : ''
                    error            : ''

    render_input_section : ->
        <Well style={backgroundColor: '#ffffff'}>
            <Row>

    displayName : 'ProjectsFilterButtons'

    propTypes :
        hidden              : rtypes.bool.isRequired
        deleted             : rtypes.bool.isRequired
        show_hidden_button  : rtypes.bool
        show_deleted_button : rtypes.bool

    getDefaultProps : ->
        hidden  : false
        deleted : false
        show_hidden_button : false
        show_deleted_button : false

    render_deleted_button : ->
        if @props.show_deleted_button
            return <Button onClick = {=>flux.getActions('projects').setTo(deleted: not @props.deleted)}>
                    <Icon name={if @props.deleted then 'check-square-o' else 'square-o'} fixedWidth /> Deleted
                </Button>
        else
            return null

    render_hidden_button : ->
        if @props.show_hidden_button
            return <Button onClick = {=>flux.getActions('projects').setTo(hidden: not @props.hidden)}>
                    <Icon name={if @props.hidden then 'check-square-o' else 'square-o'} fixedWidth /> Hidden
                </Button>
        else
            return null

    render : ->
        <ButtonGroup>
            {@render_deleted_button()}
            {@render_hidden_button()}
        </ButtonGroup>

ProjectsSearch = rclass
