disable menubar by default and remove old preferences from menubar

pull/733/head
Audric Ackermann 5 years ago
parent 7e6bbe9c54
commit 24bf436b0c

@ -16,17 +16,12 @@ exports.createTemplate = (options, messages) => {
setupWithImport, setupWithImport,
showAbout, showAbout,
showDebugLog, showDebugLog,
showSettings,
} = options; } = options;
const template = [ const template = [
{ {
label: messages.mainMenuFile.message, label: messages.mainMenuFile.message,
submenu: [ submenu: [
{
label: messages.mainMenuSettings.message,
click: showSettings,
},
{ {
type: 'separator', type: 'separator',
}, },
@ -193,7 +188,6 @@ function updateForMac(template, messages, options) {
setupAsStandalone, setupAsStandalone,
setupWithImport, setupWithImport,
showAbout, showAbout,
showSettings,
showWindow, showWindow,
} = options; } = options;
@ -242,11 +236,6 @@ function updateForMac(template, messages, options) {
{ {
type: 'separator', type: 'separator',
}, },
{
label: messages.mainMenuSettings.message,
accelerator: 'CommandOrControl+,',
click: showSettings,
},
{ {
type: 'separator', type: 'separator',
}, },

@ -1005,8 +1005,13 @@
}; };
window.toggleMenuBar = () => { window.toggleMenuBar = () => {
const newValue = !window.getSettingValue('hide-menu-bar'); const current = window.getSettingValue('hide-menu-bar');
window.Events.setHideMenuBar(newValue); if (current === undefined) {
window.Events.setHideMenuBar(false);
return;
}
window.Events.setHideMenuBar(!current);
}; };
window.toggleSpellCheck = () => { window.toggleSpellCheck = () => {

@ -38,7 +38,7 @@
} }
}, },
applyHideMenu() { applyHideMenu() {
const hideMenuBar = storage.get('hide-menu-bar', false); const hideMenuBar = storage.get('hide-menu-bar', true);
window.setAutoHideMenuBar(hideMenuBar); window.setAutoHideMenuBar(hideMenuBar);
window.setMenuBarVisibility(!hideMenuBar); window.setMenuBarVisibility(!hideMenuBar);
}, },

@ -314,7 +314,7 @@ export class SettingsView extends React.Component<SettingsViewProps, State> {
type: SessionSettingType.Toggle, type: SessionSettingType.Toggle,
category: SessionSettingCategory.General, category: SessionSettingCategory.General,
setFn: window.toggleMenuBar, setFn: window.toggleMenuBar,
content: undefined, content: { defaultValue: true },
comparisonValue: undefined, comparisonValue: undefined,
onClick: undefined, onClick: undefined,
}, },

Loading…
Cancel
Save