import React, { Component, PropTypes } from 'react'
import { connect } from 'react-redux'

import { onKeyDown } from '../ducks/ui/keyboard'
import MainView from './MainView'
import Header from './Header'
import EventLog from './EventLog'
import Footer from './Footer'

class ProxyAppMain extends Component {

    componentWillMount() {
        window.addEventListener('keydown', this.props.onKeyDown);
    }

    componentWillUnmount() {
        window.removeEventListener('keydown', this.props.onKeyDown);
    }

    render() {
        const { showEventLog, location, filter, highlight } = this.props
        return (
            <div id="container" tabIndex="0">
                <Header/>
                <MainView />
                {showEventLog && (
                    <EventLog key="eventlog"/>
                )}
                <Footer />
            </div>
        )
    }
}

export default connect(
    state => ({
        showEventLog: state.eventLog.visible,
    }),
    {
        onKeyDown,
    }
)(ProxyAppMain)
='this.form.submit();'>
<option value='master' selected='selected'>master</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>clone of  git://git.panaceas.org/iCE40/nextpnr</td><td class='sub right'></td></tr></table>
<table class='tabs'><tr><td>
<a href='/cgit/iCE40/nextpnr/about/'>about</a><a href='/cgit/iCE40/nextpnr/'>summary</a><a href='/cgit/iCE40/nextpnr/refs/?id=bbc05f31133a335af39476bed917e0318a1cffcd'>refs</a><a href='/cgit/iCE40/nextpnr/log/3rdparty/QtPropertyBrowser/cmake/InstallProjectConfig.cmake'>log</a><a class='active' href='/cgit/iCE40/nextpnr/tree/3rdparty/QtPropertyBrowser/cmake/InstallProjectConfig.cmake?id=bbc05f31133a335af39476bed917e0318a1cffcd'>tree</a><a href='/cgit/iCE40/nextpnr/commit/3rdparty/QtPropertyBrowser/cmake/InstallProjectConfig.cmake?id=bbc05f31133a335af39476bed917e0318a1cffcd'>commit</a><a href='/cgit/iCE40/nextpnr/diff/3rdparty/QtPropertyBrowser/cmake/InstallProjectConfig.cmake?id=bbc05f31133a335af39476bed917e0318a1cffcd'>diff</a><a href='/cgit/iCE40/nextpnr/stats/3rdparty/QtPropertyBrowser/cmake/InstallProjectConfig.cmake'>stats</a></td><td class='form'><form class='right' method='get' action='/cgit/iCE40/nextpnr/log/3rdparty/QtPropertyBrowser/cmake/InstallProjectConfig.cmake'>
<input type='hidden' name='id' value='bbc05f31133a335af39476bed917e0318a1cffcd'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit/iCE40/nextpnr/tree/?id=bbc05f31133a335af39476bed917e0318a1cffcd'>root</a>/<a href='/cgit/iCE40/nextpnr/tree/3rdparty?id=bbc05f31133a335af39476bed917e0318a1cffcd'>3rdparty</a>/<a href='/cgit/iCE40/nextpnr/tree/3rdparty/QtPropertyBrowser?id=bbc05f31133a335af39476bed917e0318a1cffcd'>QtPropertyBrowser</a>/<a href='/cgit/iCE40/nextpnr/tree/3rdparty/QtPropertyBrowser/cmake?id=bbc05f31133a335af39476bed917e0318a1cffcd'>cmake</a>/<a href='/cgit/iCE40/nextpnr/tree/3rdparty/QtPropertyBrowser/cmake/InstallProjectConfig.cmake?id=bbc05f31133a335af39476bed917e0318a1cffcd'>InstallProjectConfig.cmake</a></div><div class='content'>blob: d93b3ff05cf43ac7e121390b87aaac6f85a6a73e (<a href='/cgit/iCE40/nextpnr/plain/3rdparty/QtPropertyBrowser/cmake/InstallProjectConfig.cmake?id=bbc05f31133a335af39476bed917e0318a1cffcd'>plain</a>)
<table summary='blob content' class='blob'>
<tr><td class='linenumbers'><pre><a id='n1' href='#n1'>1</a>
<a id='n2' href='#n2'>2</a>
<a id='n3' href='#n3'>3</a>
<a id='n4' href='#n4'>4</a>
<a id='n5' href='#n5'>5</a>
<a id='n6' href='#n6'>6</a>
<a id='n7' href='#n7'>7</a>
<a id='n8' href='#n8'>8</a>
<a id='n9' href='#n9'>9</a>
<a id='n10' href='#n10'>10</a>
<a id='n11' href='#n11'>11</a>
<a id='n12' href='#n12'>12</a>
<a id='n13' href='#n13'>13</a>
<a id='n14' href='#n14'>14</a>
<a id='n15' href='#n15'>15</a>
<a id='n16' href='#n16'>16</a>
<a id='n17' href='#n17'>17</a>
<a id='n18' href='#n18'>18</a>
</pre></td>
<td class='lines'><pre><code>