| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,3 @@ | |||
| 1 | + Remove ``_tkinter`` module code guarded by definition of the ``TK_AQUA`` macro | ||
| 2 | + which was only needed for Tk 8.4.7 or earlier and was never actually defined by | ||
| 3 | + any build system or documented for manual use. | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3283,20 +3283,6 @@ PyInit__tkinter(void) | |||
| 3283 | 3283 | } | |
| 3284 | 3284 | PyTclObject_Type = o; | |
| 3285 | 3285 | ||
| 3286 | - #ifdef TK_AQUA | ||
| 3287 | - /* Tk_MacOSXSetupTkNotifier must be called before Tcl's subsystems | ||
| 3288 | - * start waking up. Note that Tcl_FindExecutable will do this, this | ||
| 3289 | - * code must be above it! The original warning from | ||
| 3290 | - * tkMacOSXAppInit.c is copied below. | ||
| 3291 | - * | ||
| 3292 | - * NB - You have to swap in the Tk Notifier BEFORE you start up the | ||
| 3293 | - * Tcl interpreter for now. It probably should work to do this | ||
| 3294 | - * in the other order, but for now it doesn't seem to. | ||
| 3295 | - * | ||
| 3296 | - */ | ||
| 3297 | - Tk_MacOSXSetupTkNotifier(); | ||
| 3298 | - #endif | ||
| 3299 | - | ||
| 3300 | 3286 | ||
| 3301 | 3287 | /* This helps the dynamic loader; in Unicode aware Tcl versions | |
| 3302 | 3288 | it also helps Tcl find its encodings. */ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,54 +23,9 @@ Tcl_AppInit(Tcl_Interp *interp) | |||
| 23 | 23 | { | |
| 24 | 24 | const char *_tkinter_skip_tk_init; | |
| 25 | 25 | ||
| 26 | - #ifdef TK_AQUA | ||
| 27 | - #ifndef MAX_PATH_LEN | ||
| 28 | - #define MAX_PATH_LEN 1024 | ||
| 29 | - #endif | ||
| 30 | - char tclLibPath[MAX_PATH_LEN], tkLibPath[MAX_PATH_LEN]; | ||
| 31 | - Tcl_Obj* pathPtr; | ||
| 32 | - | ||
| 33 | - /* pre- Tcl_Init code copied from tkMacOSXAppInit.c */ | ||
| 34 | - Tk_MacOSXOpenBundleResources (interp, "com.tcltk.tcllibrary", | ||
| 35 | - tclLibPath, MAX_PATH_LEN, 0); | ||
| 36 | - | ||
| 37 | - if (tclLibPath[0] != '\0') { | ||
| 38 | - Tcl_SetVar(interp, "tcl_library", tclLibPath, TCL_GLOBAL_ONLY); | ||
| 39 | - Tcl_SetVar(interp, "tclDefaultLibrary", tclLibPath, TCL_GLOBAL_ONLY); | ||
| 40 | - Tcl_SetVar(interp, "tcl_pkgPath", tclLibPath, TCL_GLOBAL_ONLY); | ||
| 41 | - } | ||
| 42 | - | ||
| 43 | - if (tclLibPath[0] != '\0') { | ||
| 44 | - Tcl_SetVar(interp, "tcl_library", tclLibPath, TCL_GLOBAL_ONLY); | ||
| 45 | - Tcl_SetVar(interp, "tclDefaultLibrary", tclLibPath, TCL_GLOBAL_ONLY); | ||
| 46 | - Tcl_SetVar(interp, "tcl_pkgPath", tclLibPath, TCL_GLOBAL_ONLY); | ||
| 47 | - } | ||
| 48 | - #endif | ||
| 49 | 26 | if (Tcl_Init (interp) == TCL_ERROR) | |
| 50 | 27 | return TCL_ERROR; | |
| 51 | 28 | ||
| 52 | - #ifdef TK_AQUA | ||
| 53 | - /* pre- Tk_Init code copied from tkMacOSXAppInit.c */ | ||
| 54 | - Tk_MacOSXOpenBundleResources (interp, "com.tcltk.tklibrary", | ||
| 55 | - tkLibPath, MAX_PATH_LEN, 1); | ||
| 56 | - | ||
| 57 | - if (tclLibPath[0] != '\0') { | ||
| 58 | - pathPtr = Tcl_NewStringObj(tclLibPath, -1); | ||
| 59 | - } else { | ||
| 60 | - Tcl_Obj *pathPtr = TclGetLibraryPath(); | ||
| 61 | - } | ||
| 62 | - | ||
| 63 | - if (tkLibPath[0] != '\0') { | ||
| 64 | - Tcl_Obj *objPtr; | ||
| 65 | - | ||
| 66 | - Tcl_SetVar(interp, "tk_library", tkLibPath, TCL_GLOBAL_ONLY); | ||
| 67 | - objPtr = Tcl_NewStringObj(tkLibPath, -1); | ||
| 68 | - Tcl_ListObjAppendElement(NULL, pathPtr, objPtr); | ||
| 69 | - } | ||
| 70 | - | ||
| 71 | - TclSetLibraryPath(pathPtr); | ||
| 72 | - #endif | ||
| 73 | - | ||
| 74 | 29 | #ifdef WITH_XXX | |
| 75 | 30 | /* Initialize modules that don't require Tk */ | |
| 76 | 31 | #endif | |
@@ -88,11 +43,6 @@ Tcl_AppInit(Tcl_Interp *interp) | |||
| 88 | 43 | ||
| 89 | 44 | Tk_MainWindow(interp); | |
| 90 | 45 | ||
| 91 | - #ifdef TK_AQUA | ||
| 92 | - TkMacOSXInitAppleEvents(interp); | ||
| 93 | - TkMacOSXInitMenus(interp); | ||
| 94 | - #endif | ||
| 95 | - | ||
| 96 | 46 | #ifdef WITH_PIL /* 0.2b5 and later -- not yet released as of May 14 */ | |
| 97 | 47 | { | |
| 98 | 48 | extern void TkImaging_Init(Tcl_Interp *); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments