Merge pull request #324 from itsmartin/fix-linux-tray-settings

Fix linux tray settings
This commit is contained in:
Yuya Ochiai
2016-10-28 00:25:03 +09:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -168,7 +168,7 @@ var SettingsPage = React.createClass({
onChange={ this.handleChangeHideMenuBar } />);
}
if (process.platform === 'darwin' || process.platform === 'linux') {
options.push(<Input key="inputShowTrayIcon" id="inputShowTrayIcon" ref="showTrayIcon" type="checkbox" label="Show icon on menu bar (Need to restart the application)" checked={ this.state.showTrayIcon }
options.push(<Input key="inputShowTrayIcon" id="inputShowTrayIcon" ref="showTrayIcon" type="checkbox" label={ process.platform === 'darwin' ? "Show icon on menu bar (need to restart the application)" : "Show icon in notification area (need to restart the application)" } checked={ this.state.showTrayIcon }
onChange={ this.handleChangeShowTrayIcon } />);
}
if (process.platform === 'linux') {

View File

@@ -444,7 +444,7 @@ app.on('ready', function() {
if (shouldShowTrayIcon()) {
const tray_menu = require('./main/menus/tray').createMenu(mainWindow, config);
trayIcon.setContextMenu(tray_menu);
if (process.platform === 'darwin') {
if (process.platform === 'darwin' || process.platform === 'linux') {
// store the information, if the tray was initialized, for checking in the settings, if the application
// was restarted after setting "Show icon on menu bar"
if (trayIcon)