]> granicus.if.org Git - python/commitdiff
More changes to attempt to get the menubar back on exit. Without success:-(
authorJack Jansen <jack.jansen@cwi.nl>
Sat, 17 Feb 2001 22:02:07 +0000 (22:02 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Sat, 17 Feb 2001 22:02:07 +0000 (22:02 +0000)
Mac/Python/macglue.c
Mac/Python/macmain.c

index 63214217205aee5e34a96595ce4d99151a4742df..52bc22584ee00b88ca14a4acebdd2cd6d3dec88d 100644 (file)
@@ -162,7 +162,7 @@ int PyMac_ConsoleIsDead;
 /*
 ** Sioux menu bar, saved early so we can restore it
 */
-static Handle sioux_mbar;
+static MenuBarHandle sioux_mbar;
 
 /*
 ** Some stuff for our GetDirectory and PromptGetFile routines
@@ -784,11 +784,19 @@ PyMac_InitMenuBar()
 void
 PyMac_RestoreMenuBar()
 {
+#if 0
+       /* This doesn't seem to work anymore? Or only for Carbon? */
+       MenuBarHandle curmenubar;
+       
+       curmenubar = GetMenuBar();
        if ( sioux_mbar ) {
                SetMenuBar(sioux_mbar);
                DrawMenuBar();
-       } else
+       } else {
                PyMac_InitMenuBar();
+               DrawMenuBar();
+       }
+#endif
 }
 
 
index 09d86486d26aa75c4ed7222c640aab45751faf61..bb798f2b993282e1f450ff41a04e8a886b9c2875 100644 (file)
@@ -552,6 +552,8 @@ Py_Main(argc, argv)
 void
 PyMac_OutputSeen()
 {
+       if ( console_output_state == STATE_UNKNOWN )
+               PyMac_InitMenuBar();
        console_output_state = STATE_LASTREAD;
 }
 
@@ -561,6 +563,8 @@ PyMac_OutputSeen()
 void
 PyMac_OutputNotSeen()
 {
+       if ( console_output_state == STATE_UNKNOWN )
+               PyMac_InitMenuBar();
        console_output_state = STATE_LASTWRITE;
 }