Avoid hide-menubar functions when saving config except on Windows
This commit is contained in:
@@ -33,13 +33,15 @@ var SettingsPage = React.createClass({
|
|||||||
handleSave: function() {
|
handleSave: function() {
|
||||||
var config = {
|
var config = {
|
||||||
teams: this.state.teams,
|
teams: this.state.teams,
|
||||||
hideMenuBar: this.refs.hideMenuBar.getChecked(),
|
hideMenuBar: this.state.hideMenuBar,
|
||||||
version: settings.version
|
version: settings.version
|
||||||
};
|
};
|
||||||
settings.writeFileSync(this.props.configFile, config);
|
settings.writeFileSync(this.props.configFile, config);
|
||||||
var currentWindow = remote.getCurrentWindow();
|
if (process.platform === 'win32') {
|
||||||
currentWindow.setAutoHideMenuBar(config.hideMenuBar);
|
var currentWindow = remote.getCurrentWindow();
|
||||||
currentWindow.setMenuBarVisibility(!config.hideMenuBar);
|
currentWindow.setAutoHideMenuBar(config.hideMenuBar);
|
||||||
|
currentWindow.setMenuBarVisibility(!config.hideMenuBar);
|
||||||
|
}
|
||||||
window.location = './index.html';
|
window.location = './index.html';
|
||||||
},
|
},
|
||||||
handleCancel: function() {
|
handleCancel: function() {
|
||||||
|
@@ -9,6 +9,7 @@ var upgradeV0toV1 = function(config_v0) {
|
|||||||
name: 'Primary team',
|
name: 'Primary team',
|
||||||
url: config_v0.url
|
url: config_v0.url
|
||||||
}],
|
}],
|
||||||
|
hideMenuBar: false,
|
||||||
version: 1
|
version: 1
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user