Skip to content

Add option to start minimized #146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion electron/js/menu/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,14 @@ var toggleFullScreenTemplate = {
},
};

var toggleStartInTrayTemplate = {
i18n: 'menuStartInTray',
type: 'checkbox',
checked: init.restore('startInTray', false),
click: function() {
init.save('startInTray', !init.restore('startInTray'));
},
};

var editTemplate = {
i18n: 'menuEdit',
Expand Down Expand Up @@ -438,7 +446,8 @@ module.exports = {
});
windowTemplate.submenu.push(
separatorTemplate,
toggleFullScreenTemplate
toggleFullScreenTemplate,
toggleStartInTrayTemplate
);
toggleFullScreenTemplate.checked = init.restore('fullscreen', false);
}
Expand Down
1 change: 1 addition & 0 deletions electron/locale/strings-en.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ string.menuQuit = 'Quit Wire';
string.menuShowHide = 'Show/Hide Menu';
string.menuSavePictureAs = 'Save Picture As...';
string.menuNoSuggestions = 'No Suggestions';
string.menuStartInTray = 'Start App in Tray';

string.restartNeeded = 'Restart Needed';
string.restartLocale = 'Please restart the app for this setting to take effect.';
Expand Down
1 change: 1 addition & 0 deletions electron/locale/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ string.menuQuit = 'Quit Wire';
string.menuShowHide = 'Show/Hide Menu';
string.menuSavePictureAs = 'Save Picture As...';
string.menuNoSuggestions = 'No Suggestions';
string.menuStartInTray = 'Start App in Tray';

string.restartNeeded = 'Restart Needed';
string.restartLocale = 'Please restart the app for this setting to take effect.';
Expand Down
2 changes: 1 addition & 1 deletion electron/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function showMainWindow() {
main.webContents.openDevTools();
}

if (!argv.startup) {
if (!argv.startup && !init.restore('startInTray')) {
if (!util.isInView(main)) {
main.center();
}
Expand Down