diff --git a/client/modules/IDE/components/Toolbar.jsx b/client/modules/IDE/components/Toolbar.jsx
index d237a08f..2b7101bf 100644
--- a/client/modules/IDE/components/Toolbar.jsx
+++ b/client/modules/IDE/components/Toolbar.jsx
@@ -1,9 +1,14 @@
import PropTypes from 'prop-types';
import React from 'react';
+import { connect } from 'react-redux';
import { Link } from 'react-router';
import classNames from 'classnames';
import InlineSVG from 'react-inlinesvg';
+import * as IDEActions from '../actions/ide';
+import * as preferenceActions from '../actions/preferences';
+import * as projectActions from '../actions/project';
+
const playUrl = require('../../../images/play.svg');
const stopUrl = require('../../../images/stop.svg');
const preferencesUrl = require('../../../images/preferences.svg');
@@ -186,4 +191,22 @@ Toolbar.defaultProps = {
currentUser: undefined
};
-export default Toolbar;
+function mapStateToProps(state) {
+ return {
+ autorefresh: state.preferences.autorefresh,
+ currentUser: state.user.username,
+ infiniteLoop: state.ide.infiniteLoop,
+ isPlaying: state.ide.isPlaying,
+ owner: state.project.owner,
+ preferencesIsVisible: state.ide.preferencesIsVisible,
+ project: state.project,
+ };
+}
+
+const mapDispatchToProps = {
+ ...IDEActions,
+ ...preferenceActions,
+ ...projectActions,
+};
+
+export default connect(mapStateToProps, mapDispatchToProps)(Toolbar);
diff --git a/client/modules/IDE/pages/IDEView.jsx b/client/modules/IDE/pages/IDEView.jsx
index d2de83e2..55d7dac3 100644
--- a/client/modules/IDE/pages/IDEView.jsx
+++ b/client/modules/IDE/pages/IDEView.jsx
@@ -212,30 +212,7 @@ class IDEView extends React.Component {
warnIfUnsavedChanges={this.warnIfUnsavedChanges}
cmController={this.cmController}
/>
-
+
{this.props.ide.preferencesIsVisible &&