[Python-checkins] python/dist/src/Mac/Python macglue.c,1.110,1.111
jackjansen@sourceforge.net
jackjansen@sourceforge.net
Thu, 11 Apr 2002 13:48:21 -0700
Update of /cvsroot/python/python/dist/src/Mac/Python
In directory usw-pr-cvs1:/tmp/cvs-serv9761/Python/Mac/Python
Modified Files:
macglue.c
Log Message:
Got rid of ifdefs for long-obsolete GUSI versions and other stuff that is now standard (appearance, interned strings)
Index: macglue.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Python/macglue.c,v
retrieving revision 1.110
retrieving revision 1.111
diff -C2 -d -r1.110 -r1.111
*** macglue.c 27 Dec 2001 23:01:18 -0000 1.110
--- macglue.c 11 Apr 2002 20:48:19 -0000 1.111
***************
*** 72,80 ****
#endif
- #ifdef USE_GUSI1
- #include <TFileSpec.h> /* For Path2FSSpec */
- #include <GUSI.h>
- #endif
-
/* The ID of the Sioux apple menu */
#define SIOUX_APPLEID 32000
--- 72,75 ----
***************
*** 175,183 ****
static PyObject *python_event_handler;
- /*
- ** Set to true if we're appearance-compliant
- */
- int PyMac_AppearanceCompliant;
-
/* Given an FSSpec, return the FSSpec of the parent folder */
--- 170,173 ----
***************
*** 251,277 ****
}
- #ifdef USE_GUSI1
- /*
- ** GUSI (1.6.0 and earlier, at the least) do not set the MacOS idea of
- ** the working directory. Hence, we call this routine after each call
- ** to chdir() to rectify things.
- */
- void
- PyMac_FixGUSIcd()
- {
- WDPBRec pb;
- FSSpec curdirfss;
-
- if ( Path2FSSpec(":x", &curdirfss) != noErr )
- return;
-
- /* Set MacOS "working directory" */
- pb.ioNamePtr= "\p";
- pb.ioVRefNum= curdirfss.vRefNum;
- pb.ioWDDirID= curdirfss.parID;
- if (PBHSetVolSync(&pb) != noErr)
- return;
- }
- #endif
#ifdef USE_GUSI
--- 241,244 ----
***************
*** 283,328 ****
void RotateCursor(short x) { /* Dummy */ }
- /*
- ** Replacement GUSI Spin function
- */
- #ifdef USE_GUSI1
- static int
- PyMac_GUSISpin(spin_msg msg, long arg)
- {
- static Boolean inForeground = true;
- int maxsleep = 6; /* 6 ticks is "normal" sleeptime */
-
- if (PyMac_ConsoleIsDead) return 0;
- #if 0
- if (inForeground)
- SpinCursor(msg == SP_AUTO_SPIN ? short(arg) : 1);
- #endif
-
-
- if ( msg == SP_AUTO_SPIN )
- maxsleep = 0;
- if ( msg==SP_SLEEP||msg==SP_SELECT ) {
- maxsleep = arg;
- /*
- ** We force-scan for interrupts. Not pretty, but otherwise
- ** a program may hang in select or sleep forever.
- */
- scan_event_queue(1);
- }
- if (interrupted) {
- interrupted = 0;
- return -1;
- }
-
- PyMac_DoYield(maxsleep, 0); /* XXXX or is it safe to call python here? */
-
- return 0;
- }
-
- void
- PyMac_SetGUSISpin() {
- GUSISetHook(GUSI_SpinHook, (GUSIHook)PyMac_GUSISpin);
- }
- #endif
/* Called at exit() time thru atexit(), to stop event processing */
--- 250,253 ----
***************
*** 441,449 ****
if (thread_for_sentinel == PyThreadState_Get()) {
return -1;
- #if 0
- } else {
- /* Else we are unsure... */
- fprintf(stderr, "Stackcheck in other thread (was %x now %x)\n", thread_for_sentinel,PyThreadState_Get());
- #endif
}
}
--- 366,369 ----
***************
*** 736,748 ****
if ( sioux_mbar ) return;
- #if 0
- /* This code does not seem to work anymore: apparently
- ** we now always have a menubar (since MacOS9?).
- ** So we simply always setup the Sioux menus here.
- */
- if ( (sioux_mbar=GetMenuBar()) == NULL ) {
- #else
if ( (sioux_mbar=GetMenuBar()) == NULL || GetMenuHandle(SIOUX_APPLEID) == NULL) {
- #endif
/* Sioux menu not installed yet. Do so */
SIOUXSetupMenus();
--- 656,660 ----
***************
*** 763,768 ****
PyMac_RestoreMenuBar()
{
- #if 1
- /* This doesn't seem to work anymore? Or only for Carbon? */
MenuBarHandle curmenubar;
--- 675,678 ----
***************
*** 775,779 ****
DrawMenuBar();
}
- #endif
}
--- 685,688 ----