The toggle setting is now independent of the "minimize to tray" setting
This commit is contained in:
parent
7c09ddda85
commit
0f6688b4cf
|
@ -117,27 +117,14 @@ var SettingsPage = React.createClass({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleChangeMinimizeToTray: function() {
|
handleChangeMinimizeToTray: function() {
|
||||||
var isChecked = this.refs.minimizeToTray.getChecked();
|
|
||||||
this.setState({
|
this.setState({
|
||||||
minimizeToTray: isChecked
|
minimizeToTray: this.refs.minimizeToTray.getChecked()
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!isChecked) {
|
|
||||||
this.setState({
|
|
||||||
toggleWindowOnTrayIconClick: false
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
handleChangeToggleWindowOnTrayIconClick: function() {
|
handleChangeToggleWindowOnTrayIconClick: function() {
|
||||||
if (this.refs.minimizeToTray.getChecked()) {
|
this.setState({
|
||||||
this.setState({
|
toggleWindowOnTrayIconClick: this.refs.toggleWindowOnTrayIconClick.getChecked()
|
||||||
toggleWindowOnTrayIconClick: this.refs.toggleWindowOnTrayIconClick.getChecked()
|
});
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.setState({
|
|
||||||
toggleWindowOnTrayIconClick: false
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
toggleShowTeamForm: function() {
|
toggleShowTeamForm: function() {
|
||||||
this.setState({
|
this.setState({
|
||||||
|
@ -186,7 +173,7 @@ var SettingsPage = React.createClass({
|
||||||
options.push(<Input key="inputMinimizeToTray" id="inputMinimizeToTray" ref="minimizeToTray" type="checkbox" label="Leave app running in notification area when the window is closed"
|
options.push(<Input key="inputMinimizeToTray" id="inputMinimizeToTray" ref="minimizeToTray" type="checkbox" label="Leave app running in notification area when the window is closed"
|
||||||
checked={ this.state.minimizeToTray } onChange={ this.handleChangeMinimizeToTray } />);
|
checked={ this.state.minimizeToTray } onChange={ this.handleChangeMinimizeToTray } />);
|
||||||
options.push(<Input key="inputToggleWindowOnTrayIconClick" id="inputToggleWindowOnTrayIconClick" ref="toggleWindowOnTrayIconClick" type="checkbox" label="Toggle window visibility when clicking on the tray icon."
|
options.push(<Input key="inputToggleWindowOnTrayIconClick" id="inputToggleWindowOnTrayIconClick" ref="toggleWindowOnTrayIconClick" type="checkbox" label="Toggle window visibility when clicking on the tray icon."
|
||||||
disabled={ !this.state.minimizeToTray } checked={ this.state.toggleWindowOnTrayIconClick } onChange={ this.handleChangeToggleWindowOnTrayIconClick } />);
|
checked={ this.state.toggleWindowOnTrayIconClick } onChange={ this.handleChangeToggleWindowOnTrayIconClick } />);
|
||||||
}
|
}
|
||||||
var options_row = (options.length > 0) ? (
|
var options_row = (options.length > 0) ? (
|
||||||
<Row>
|
<Row>
|
||||||
|
|
Loading…
Reference in a new issue