Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 657ba27

Browse files
committed
More changes to attempt to get the menubar back on exit. Without success:-(
1 parent fab7415 commit 657ba27

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

Mac/Python/macglue.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ int PyMac_ConsoleIsDead;
162162
/*
163163
** Sioux menu bar, saved early so we can restore it
164164
*/
165-
static Handle sioux_mbar;
165+
static MenuBarHandle sioux_mbar;
166166

167167
/*
168168
** Some stuff for our GetDirectory and PromptGetFile routines
@@ -784,11 +784,19 @@ PyMac_InitMenuBar()
784784
void
785785
PyMac_RestoreMenuBar()
786786
{
787+
#if 0
788+
/* This doesn't seem to work anymore? Or only for Carbon? */
789+
MenuBarHandle curmenubar;
790+
791+
curmenubar = GetMenuBar();
787792
if ( sioux_mbar ) {
788793
SetMenuBar(sioux_mbar);
789794
DrawMenuBar();
790-
} else
795+
} else {
791796
PyMac_InitMenuBar();
797+
DrawMenuBar();
798+
}
799+
#endif
792800
}
793801

794802

Mac/Python/macmain.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,8 @@ Py_Main(argc, argv)
552552
void
553553
PyMac_OutputSeen()
554554
{
555+
if ( console_output_state == STATE_UNKNOWN )
556+
PyMac_InitMenuBar();
555557
console_output_state = STATE_LASTREAD;
556558
}
557559

@@ -561,6 +563,8 @@ PyMac_OutputSeen()
561563
void
562564
PyMac_OutputNotSeen()
563565
{
566+
if ( console_output_state == STATE_UNKNOWN )
567+
PyMac_InitMenuBar();
564568
console_output_state = STATE_LASTWRITE;
565569
}
566570

0 commit comments

Comments
 (0)