@@ -71,6 +71,7 @@ import { Welcome } from './welcome'
7171import { AppMenuBar } from './app-menu'
7272import { UpdateAvailable , renderBanner } from './banners'
7373import { Preferences } from './preferences'
74+ import { ConfirmRestart } from './preferences/confirm-restart'
7475import { RepositorySettings } from './repository-settings'
7576import { AppError } from './app-error'
7677import { MissingRepository } from './missing-repository'
@@ -1496,8 +1497,8 @@ export class App extends React.Component<IAppProps, IAppState> {
14961497 * on Windows.
14971498 */
14981499 private renderAppMenuBar ( ) {
1499- // We only render the app menu bar on Windows
1500- if ( ! __WIN32__ ) {
1500+ // We do not render the app menu bar on macOS
1501+ if ( __DARWIN__ ) {
15011502 return null
15021503 }
15031504
@@ -1548,22 +1549,22 @@ export class App extends React.Component<IAppProps, IAppState> {
15481549 this . state . currentFoldout &&
15491550 this . state . currentFoldout . type === FoldoutType . AppMenu
15501551
1551- // As Linux still uses the classic Electron menu, we are opting out of the
1552- // custom menu that is shown as part of the title bar below
1553- if ( __LINUX__ ) {
1552+ // We do not render the app menu bar on Linux when the user has selected
1553+ // the "native" menu option
1554+ if ( __LINUX__ && this . state . titleBarStyle === 'native' ) {
15541555 return null
15551556 }
15561557
15571558 // When we're in full-screen mode on Windows we only need to render
15581559 // the title bar when the menu bar is active. On other platforms we
15591560 // never render the title bar while in full-screen mode.
15601561 if ( inFullScreen ) {
1561- if ( ! __WIN32__ || ! menuBarActive ) {
1562+ if ( __DARWIN__ || ! menuBarActive ) {
15621563 return null
15631564 }
15641565 }
15651566
1566- const showAppIcon = __WIN32__ && ! this . state . showWelcomeFlow
1567+ const showAppIcon = ! __DARWIN__ && ! this . state . showWelcomeFlow
15671568 const inWelcomeFlow = this . state . showWelcomeFlow
15681569 const inNoRepositoriesView = this . inNoRepositoriesViewState ( )
15691570
@@ -1762,6 +1763,7 @@ export class App extends React.Component<IAppProps, IAppState> {
17621763 customEditor = { this . state . customEditor }
17631764 useCustomShell = { this . state . useCustomShell }
17641765 customShell = { this . state . customShell }
1766+ titleBarStyle = { this . state . titleBarStyle }
17651767 repositoryIndicatorsEnabled = { this . state . repositoryIndicatorsEnabled }
17661768 onOpenFileInExternalEditor = { this . openFileInExternalEditor }
17671769 underlineLinks = { this . state . underlineLinks }
@@ -2682,6 +2684,9 @@ export class App extends React.Component<IAppProps, IAppState> {
26822684 />
26832685 )
26842686 }
2687+ case PopupType . ConfirmRestart : {
2688+ return < ConfirmRestart onDismissed = { onPopupDismissedFn } />
2689+ }
26852690 default :
26862691 return assertNever ( popup , `Unknown popup type: ${ popup } ` )
26872692 }
0 commit comments