@simplexai/localmodels-darwin-arm64 0.1.0-dev.31.build.gitb5579b4b26f273bf03468c6aedf61b327fa6c245 → 0.1.0-dev.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (583) hide show
  1. package/bootstrap.identity +1 -1
  2. package/bootstrap.sha256 +10 -582
  3. package/modules/localmodels/__init__.py +1 -1
  4. package/modules/{simplex_localmodels-0.1.0.dev31.dist-info → simplex_localmodels-0.1.0.dev32.dist-info}/METADATA +1 -1
  5. package/modules/{simplex_localmodels-0.1.0.dev31.dist-info → simplex_localmodels-0.1.0.dev32.dist-info}/RECORD +7 -7
  6. package/package.json +1 -1
  7. package/tool.json +1 -1
  8. package/python/bin/2to3 +0 -7
  9. package/python/bin/2to3-3.12 +0 -7
  10. package/python/bin/idle3 +0 -7
  11. package/python/bin/idle3.12 +0 -7
  12. package/python/bin/pip +0 -8
  13. package/python/bin/pip3 +0 -8
  14. package/python/bin/pip3.12 +0 -8
  15. package/python/bin/pydoc3 +0 -7
  16. package/python/bin/pydoc3.12 +0 -7
  17. package/python/bin/python +0 -0
  18. package/python/bin/python3 +0 -0
  19. package/python/bin/python3-config +0 -76
  20. package/python/bin/python3.12-config +0 -76
  21. package/python/include/python3.12/Python.h +0 -109
  22. package/python/include/python3.12/abstract.h +0 -899
  23. package/python/include/python3.12/bltinmodule.h +0 -14
  24. package/python/include/python3.12/boolobject.h +0 -42
  25. package/python/include/python3.12/bytearrayobject.h +0 -44
  26. package/python/include/python3.12/bytesobject.h +0 -69
  27. package/python/include/python3.12/ceval.h +0 -168
  28. package/python/include/python3.12/codecs.h +0 -248
  29. package/python/include/python3.12/compile.h +0 -22
  30. package/python/include/python3.12/complexobject.h +0 -30
  31. package/python/include/python3.12/cpython/abstract.h +0 -206
  32. package/python/include/python3.12/cpython/bytearrayobject.h +0 -34
  33. package/python/include/python3.12/cpython/bytesobject.h +0 -133
  34. package/python/include/python3.12/cpython/cellobject.h +0 -44
  35. package/python/include/python3.12/cpython/ceval.h +0 -35
  36. package/python/include/python3.12/cpython/classobject.h +0 -71
  37. package/python/include/python3.12/cpython/code.h +0 -389
  38. package/python/include/python3.12/cpython/compile.h +0 -69
  39. package/python/include/python3.12/cpython/complexobject.h +0 -44
  40. package/python/include/python3.12/cpython/context.h +0 -78
  41. package/python/include/python3.12/cpython/descrobject.h +0 -64
  42. package/python/include/python3.12/cpython/dictobject.h +0 -118
  43. package/python/include/python3.12/cpython/fileobject.h +0 -19
  44. package/python/include/python3.12/cpython/fileutils.h +0 -8
  45. package/python/include/python3.12/cpython/floatobject.h +0 -27
  46. package/python/include/python3.12/cpython/frameobject.h +0 -29
  47. package/python/include/python3.12/cpython/funcobject.h +0 -190
  48. package/python/include/python3.12/cpython/genobject.h +0 -89
  49. package/python/include/python3.12/cpython/import.h +0 -46
  50. package/python/include/python3.12/cpython/initconfig.h +0 -256
  51. package/python/include/python3.12/cpython/interpreteridobject.h +0 -11
  52. package/python/include/python3.12/cpython/listobject.h +0 -47
  53. package/python/include/python3.12/cpython/longintrepr.h +0 -133
  54. package/python/include/python3.12/cpython/longobject.h +0 -100
  55. package/python/include/python3.12/cpython/memoryobject.h +0 -52
  56. package/python/include/python3.12/cpython/methodobject.h +0 -66
  57. package/python/include/python3.12/cpython/modsupport.h +0 -109
  58. package/python/include/python3.12/cpython/object.h +0 -575
  59. package/python/include/python3.12/cpython/objimpl.h +0 -95
  60. package/python/include/python3.12/cpython/odictobject.h +0 -43
  61. package/python/include/python3.12/cpython/picklebufobject.h +0 -31
  62. package/python/include/python3.12/cpython/pthread_stubs.h +0 -88
  63. package/python/include/python3.12/cpython/pyctype.h +0 -39
  64. package/python/include/python3.12/cpython/pydebug.h +0 -38
  65. package/python/include/python3.12/cpython/pyerrors.h +0 -178
  66. package/python/include/python3.12/cpython/pyfpe.h +0 -15
  67. package/python/include/python3.12/cpython/pyframe.h +0 -35
  68. package/python/include/python3.12/cpython/pylifecycle.h +0 -111
  69. package/python/include/python3.12/cpython/pymem.h +0 -98
  70. package/python/include/python3.12/cpython/pystate.h +0 -456
  71. package/python/include/python3.12/cpython/pythonrun.h +0 -121
  72. package/python/include/python3.12/cpython/pythread.h +0 -42
  73. package/python/include/python3.12/cpython/pytime.h +0 -331
  74. package/python/include/python3.12/cpython/setobject.h +0 -72
  75. package/python/include/python3.12/cpython/sysmodule.h +0 -16
  76. package/python/include/python3.12/cpython/traceback.h +0 -16
  77. package/python/include/python3.12/cpython/tupleobject.h +0 -39
  78. package/python/include/python3.12/cpython/unicodeobject.h +0 -976
  79. package/python/include/python3.12/cpython/warnings.h +0 -20
  80. package/python/include/python3.12/cpython/weakrefobject.h +0 -56
  81. package/python/include/python3.12/datetime.h +0 -267
  82. package/python/include/python3.12/descrobject.h +0 -100
  83. package/python/include/python3.12/dictobject.h +0 -97
  84. package/python/include/python3.12/dynamic_annotations.h +0 -499
  85. package/python/include/python3.12/enumobject.h +0 -17
  86. package/python/include/python3.12/errcode.h +0 -38
  87. package/python/include/python3.12/exports.h +0 -36
  88. package/python/include/python3.12/fileobject.h +0 -49
  89. package/python/include/python3.12/fileutils.h +0 -26
  90. package/python/include/python3.12/floatobject.h +0 -54
  91. package/python/include/python3.12/frameobject.h +0 -20
  92. package/python/include/python3.12/genericaliasobject.h +0 -14
  93. package/python/include/python3.12/import.h +0 -98
  94. package/python/include/python3.12/internal/pycore_abstract.h +0 -25
  95. package/python/include/python3.12/internal/pycore_asdl.h +0 -112
  96. package/python/include/python3.12/internal/pycore_ast.h +0 -922
  97. package/python/include/python3.12/internal/pycore_ast_state.h +0 -265
  98. package/python/include/python3.12/internal/pycore_atexit.h +0 -57
  99. package/python/include/python3.12/internal/pycore_atomic.h +0 -557
  100. package/python/include/python3.12/internal/pycore_atomic_funcs.h +0 -94
  101. package/python/include/python3.12/internal/pycore_bitutils.h +0 -186
  102. package/python/include/python3.12/internal/pycore_blocks_output_buffer.h +0 -317
  103. package/python/include/python3.12/internal/pycore_bytes_methods.h +0 -73
  104. package/python/include/python3.12/internal/pycore_bytesobject.h +0 -47
  105. package/python/include/python3.12/internal/pycore_call.h +0 -133
  106. package/python/include/python3.12/internal/pycore_ceval.h +0 -164
  107. package/python/include/python3.12/internal/pycore_ceval_state.h +0 -103
  108. package/python/include/python3.12/internal/pycore_code.h +0 -496
  109. package/python/include/python3.12/internal/pycore_compile.h +0 -118
  110. package/python/include/python3.12/internal/pycore_condvar.h +0 -99
  111. package/python/include/python3.12/internal/pycore_context.h +0 -71
  112. package/python/include/python3.12/internal/pycore_descrobject.h +0 -26
  113. package/python/include/python3.12/internal/pycore_dict.h +0 -199
  114. package/python/include/python3.12/internal/pycore_dict_state.h +0 -50
  115. package/python/include/python3.12/internal/pycore_dtoa.h +0 -69
  116. package/python/include/python3.12/internal/pycore_emscripten_signal.h +0 -25
  117. package/python/include/python3.12/internal/pycore_exceptions.h +0 -37
  118. package/python/include/python3.12/internal/pycore_faulthandler.h +0 -99
  119. package/python/include/python3.12/internal/pycore_fileutils.h +0 -292
  120. package/python/include/python3.12/internal/pycore_fileutils_windows.h +0 -98
  121. package/python/include/python3.12/internal/pycore_floatobject.h +0 -71
  122. package/python/include/python3.12/internal/pycore_flowgraph.h +0 -120
  123. package/python/include/python3.12/internal/pycore_format.h +0 -27
  124. package/python/include/python3.12/internal/pycore_frame.h +0 -283
  125. package/python/include/python3.12/internal/pycore_function.h +0 -26
  126. package/python/include/python3.12/internal/pycore_gc.h +0 -211
  127. package/python/include/python3.12/internal/pycore_genobject.h +0 -49
  128. package/python/include/python3.12/internal/pycore_getopt.h +0 -22
  129. package/python/include/python3.12/internal/pycore_gil.h +0 -50
  130. package/python/include/python3.12/internal/pycore_global_objects.h +0 -105
  131. package/python/include/python3.12/internal/pycore_global_objects_fini_generated.h +0 -1517
  132. package/python/include/python3.12/internal/pycore_global_strings.h +0 -777
  133. package/python/include/python3.12/internal/pycore_hamt.h +0 -134
  134. package/python/include/python3.12/internal/pycore_hashtable.h +0 -149
  135. package/python/include/python3.12/internal/pycore_import.h +0 -183
  136. package/python/include/python3.12/internal/pycore_initconfig.h +0 -179
  137. package/python/include/python3.12/internal/pycore_instruments.h +0 -106
  138. package/python/include/python3.12/internal/pycore_interp.h +0 -275
  139. package/python/include/python3.12/internal/pycore_intrinsics.h +0 -32
  140. package/python/include/python3.12/internal/pycore_list.h +0 -83
  141. package/python/include/python3.12/internal/pycore_long.h +0 -258
  142. package/python/include/python3.12/internal/pycore_memoryobject.h +0 -18
  143. package/python/include/python3.12/internal/pycore_moduleobject.h +0 -45
  144. package/python/include/python3.12/internal/pycore_namespace.h +0 -20
  145. package/python/include/python3.12/internal/pycore_object.h +0 -455
  146. package/python/include/python3.12/internal/pycore_object_state.h +0 -42
  147. package/python/include/python3.12/internal/pycore_obmalloc.h +0 -700
  148. package/python/include/python3.12/internal/pycore_obmalloc_init.h +0 -73
  149. package/python/include/python3.12/internal/pycore_opcode.h +0 -587
  150. package/python/include/python3.12/internal/pycore_opcode_utils.h +0 -92
  151. package/python/include/python3.12/internal/pycore_parser.h +0 -66
  152. package/python/include/python3.12/internal/pycore_pathconfig.h +0 -24
  153. package/python/include/python3.12/internal/pycore_pyarena.h +0 -64
  154. package/python/include/python3.12/internal/pycore_pyerrors.h +0 -129
  155. package/python/include/python3.12/internal/pycore_pyhash.h +0 -40
  156. package/python/include/python3.12/internal/pycore_pylifecycle.h +0 -99
  157. package/python/include/python3.12/internal/pycore_pymath.h +0 -205
  158. package/python/include/python3.12/internal/pycore_pymem.h +0 -98
  159. package/python/include/python3.12/internal/pycore_pymem_init.h +0 -85
  160. package/python/include/python3.12/internal/pycore_pystate.h +0 -180
  161. package/python/include/python3.12/internal/pycore_pythread.h +0 -81
  162. package/python/include/python3.12/internal/pycore_range.h +0 -21
  163. package/python/include/python3.12/internal/pycore_runtime.h +0 -235
  164. package/python/include/python3.12/internal/pycore_runtime_init.h +0 -188
  165. package/python/include/python3.12/internal/pycore_runtime_init_generated.h +0 -1511
  166. package/python/include/python3.12/internal/pycore_signal.h +0 -98
  167. package/python/include/python3.12/internal/pycore_sliceobject.h +0 -22
  168. package/python/include/python3.12/internal/pycore_strhex.h +0 -36
  169. package/python/include/python3.12/internal/pycore_structseq.h +0 -39
  170. package/python/include/python3.12/internal/pycore_symtable.h +0 -160
  171. package/python/include/python3.12/internal/pycore_sysmodule.h +0 -34
  172. package/python/include/python3.12/internal/pycore_time.h +0 -25
  173. package/python/include/python3.12/internal/pycore_token.h +0 -108
  174. package/python/include/python3.12/internal/pycore_traceback.h +0 -101
  175. package/python/include/python3.12/internal/pycore_tracemalloc.h +0 -123
  176. package/python/include/python3.12/internal/pycore_tuple.h +0 -79
  177. package/python/include/python3.12/internal/pycore_typeobject.h +0 -151
  178. package/python/include/python3.12/internal/pycore_typevarobject.h +0 -24
  179. package/python/include/python3.12/internal/pycore_ucnhash.h +0 -34
  180. package/python/include/python3.12/internal/pycore_unicodeobject.h +0 -86
  181. package/python/include/python3.12/internal/pycore_unicodeobject_generated.h +0 -2832
  182. package/python/include/python3.12/internal/pycore_unionobject.h +0 -23
  183. package/python/include/python3.12/internal/pycore_warnings.h +0 -29
  184. package/python/include/python3.12/interpreteridobject.h +0 -17
  185. package/python/include/python3.12/intrcheck.h +0 -30
  186. package/python/include/python3.12/iterobject.h +0 -27
  187. package/python/include/python3.12/listobject.h +0 -52
  188. package/python/include/python3.12/longobject.h +0 -108
  189. package/python/include/python3.12/marshal.h +0 -31
  190. package/python/include/python3.12/memoryobject.h +0 -34
  191. package/python/include/python3.12/methodobject.h +0 -132
  192. package/python/include/python3.12/modsupport.h +0 -168
  193. package/python/include/python3.12/moduleobject.h +0 -119
  194. package/python/include/python3.12/object.h +0 -993
  195. package/python/include/python3.12/objimpl.h +0 -234
  196. package/python/include/python3.12/opcode.h +0 -271
  197. package/python/include/python3.12/osdefs.h +0 -51
  198. package/python/include/python3.12/osmodule.h +0 -17
  199. package/python/include/python3.12/patchlevel.h +0 -35
  200. package/python/include/python3.12/py_curses.h +0 -99
  201. package/python/include/python3.12/pybuffer.h +0 -145
  202. package/python/include/python3.12/pycapsule.h +0 -59
  203. package/python/include/python3.12/pyconfig.h +0 -1943
  204. package/python/include/python3.12/pydtrace.h +0 -59
  205. package/python/include/python3.12/pyerrors.h +0 -337
  206. package/python/include/python3.12/pyexpat.h +0 -70
  207. package/python/include/python3.12/pyframe.h +0 -26
  208. package/python/include/python3.12/pyhash.h +0 -146
  209. package/python/include/python3.12/pylifecycle.h +0 -78
  210. package/python/include/python3.12/pymacconfig.h +0 -99
  211. package/python/include/python3.12/pymacro.h +0 -172
  212. package/python/include/python3.12/pymath.h +0 -62
  213. package/python/include/python3.12/pymem.h +0 -104
  214. package/python/include/python3.12/pyport.h +0 -782
  215. package/python/include/python3.12/pystate.h +0 -132
  216. package/python/include/python3.12/pystats.h +0 -110
  217. package/python/include/python3.12/pystrcmp.h +0 -23
  218. package/python/include/python3.12/pystrtod.h +0 -46
  219. package/python/include/python3.12/pythonrun.h +0 -49
  220. package/python/include/python3.12/pythread.h +0 -135
  221. package/python/include/python3.12/pytypedefs.h +0 -30
  222. package/python/include/python3.12/rangeobject.h +0 -27
  223. package/python/include/python3.12/setobject.h +0 -49
  224. package/python/include/python3.12/sliceobject.h +0 -65
  225. package/python/include/python3.12/structmember.h +0 -56
  226. package/python/include/python3.12/structseq.h +0 -49
  227. package/python/include/python3.12/sysmodule.h +0 -54
  228. package/python/include/python3.12/traceback.h +0 -26
  229. package/python/include/python3.12/tracemalloc.h +0 -77
  230. package/python/include/python3.12/tupleobject.h +0 -46
  231. package/python/include/python3.12/typeslots.h +0 -88
  232. package/python/include/python3.12/unicodeobject.h +0 -1020
  233. package/python/include/python3.12/warnings.h +0 -45
  234. package/python/include/python3.12/weakrefobject.h +0 -42
  235. package/python/lib/itcl4.3.8/itcl.tcl +0 -151
  236. package/python/lib/itcl4.3.8/itclConfig.sh +0 -67
  237. package/python/lib/itcl4.3.8/itclHullCmds.tcl +0 -562
  238. package/python/lib/itcl4.3.8/itclWidget.tcl +0 -447
  239. package/python/lib/itcl4.3.8/libitcl4.3.8.dylib +0 -0
  240. package/python/lib/itcl4.3.8/libitclstub.a +0 -0
  241. package/python/lib/itcl4.3.8/libitclstub4.3.8.a +0 -0
  242. package/python/lib/itcl4.3.8/libtcl9itcl4.3.8.dylib +0 -0
  243. package/python/lib/itcl4.3.8/pkgIndex.tcl +0 -14
  244. package/python/lib/libpython3.12.dylib +0 -0
  245. package/python/lib/libtcl9.0.dylib +0 -0
  246. package/python/lib/libtcl9tk9.0.dylib +0 -0
  247. package/python/lib/pkgconfig/python-3.12-embed.pc +0 -13
  248. package/python/lib/pkgconfig/python-3.12.pc +0 -13
  249. package/python/lib/pkgconfig/python3-embed.pc +0 -13
  250. package/python/lib/pkgconfig/python3.pc +0 -13
  251. package/python/lib/python3.12/config-3.12-darwin/Makefile +0 -3273
  252. package/python/lib/python3.12/config-3.12-darwin/Setup +0 -303
  253. package/python/lib/python3.12/config-3.12-darwin/Setup.bootstrap +0 -36
  254. package/python/lib/python3.12/config-3.12-darwin/Setup.local +0 -19
  255. package/python/lib/python3.12/config-3.12-darwin/Setup.stdlib +0 -183
  256. package/python/lib/python3.12/config-3.12-darwin/config.c +0 -246
  257. package/python/lib/python3.12/config-3.12-darwin/config.c.in +0 -71
  258. package/python/lib/python3.12/config-3.12-darwin/install-sh +0 -541
  259. package/python/lib/python3.12/config-3.12-darwin/makesetup +0 -353
  260. package/python/lib/python3.12/config-3.12-darwin/python-config.py +0 -76
  261. package/python/lib/python3.12/config-3.12-darwin/python.o +0 -0
  262. package/python/lib/python3.12/idlelib/CREDITS.txt +0 -47
  263. package/python/lib/python3.12/idlelib/ChangeLog +0 -1591
  264. package/python/lib/python3.12/idlelib/HISTORY.txt +0 -296
  265. package/python/lib/python3.12/idlelib/Icons/README.txt +0 -51
  266. package/python/lib/python3.12/idlelib/Icons/folder.gif +0 -0
  267. package/python/lib/python3.12/idlelib/Icons/idle.ico +0 -0
  268. package/python/lib/python3.12/idlelib/Icons/idle_16.gif +0 -0
  269. package/python/lib/python3.12/idlelib/Icons/idle_16.png +0 -0
  270. package/python/lib/python3.12/idlelib/Icons/idle_256.png +0 -0
  271. package/python/lib/python3.12/idlelib/Icons/idle_32.gif +0 -0
  272. package/python/lib/python3.12/idlelib/Icons/idle_32.png +0 -0
  273. package/python/lib/python3.12/idlelib/Icons/idle_48.gif +0 -0
  274. package/python/lib/python3.12/idlelib/Icons/idle_48.png +0 -0
  275. package/python/lib/python3.12/idlelib/Icons/minusnode.gif +0 -0
  276. package/python/lib/python3.12/idlelib/Icons/openfolder.gif +0 -0
  277. package/python/lib/python3.12/idlelib/Icons/plusnode.gif +0 -0
  278. package/python/lib/python3.12/idlelib/Icons/python.gif +0 -0
  279. package/python/lib/python3.12/idlelib/Icons/tk.gif +0 -0
  280. package/python/lib/python3.12/idlelib/NEWS2x.txt +0 -660
  281. package/python/lib/python3.12/idlelib/News3.txt +0 -1390
  282. package/python/lib/python3.12/idlelib/README.txt +0 -290
  283. package/python/lib/python3.12/idlelib/TODO.txt +0 -210
  284. package/python/lib/python3.12/idlelib/__init__.py +0 -10
  285. package/python/lib/python3.12/idlelib/__main__.py +0 -7
  286. package/python/lib/python3.12/idlelib/autocomplete.py +0 -228
  287. package/python/lib/python3.12/idlelib/autocomplete_w.py +0 -498
  288. package/python/lib/python3.12/idlelib/autoexpand.py +0 -96
  289. package/python/lib/python3.12/idlelib/browser.py +0 -260
  290. package/python/lib/python3.12/idlelib/calltip.py +0 -205
  291. package/python/lib/python3.12/idlelib/calltip_w.py +0 -202
  292. package/python/lib/python3.12/idlelib/codecontext.py +0 -270
  293. package/python/lib/python3.12/idlelib/colorizer.py +0 -384
  294. package/python/lib/python3.12/idlelib/config-extensions.def +0 -62
  295. package/python/lib/python3.12/idlelib/config-highlight.def +0 -105
  296. package/python/lib/python3.12/idlelib/config-keys.def +0 -309
  297. package/python/lib/python3.12/idlelib/config-main.def +0 -93
  298. package/python/lib/python3.12/idlelib/config.py +0 -917
  299. package/python/lib/python3.12/idlelib/config_key.py +0 -354
  300. package/python/lib/python3.12/idlelib/configdialog.py +0 -2408
  301. package/python/lib/python3.12/idlelib/debugger.py +0 -602
  302. package/python/lib/python3.12/idlelib/debugger_r.py +0 -390
  303. package/python/lib/python3.12/idlelib/debugobj.py +0 -146
  304. package/python/lib/python3.12/idlelib/debugobj_r.py +0 -41
  305. package/python/lib/python3.12/idlelib/delegator.py +0 -34
  306. package/python/lib/python3.12/idlelib/dynoption.py +0 -57
  307. package/python/lib/python3.12/idlelib/editor.py +0 -1767
  308. package/python/lib/python3.12/idlelib/extend.txt +0 -83
  309. package/python/lib/python3.12/idlelib/filelist.py +0 -132
  310. package/python/lib/python3.12/idlelib/format.py +0 -426
  311. package/python/lib/python3.12/idlelib/grep.py +0 -223
  312. package/python/lib/python3.12/idlelib/help.html +0 -805
  313. package/python/lib/python3.12/idlelib/help.py +0 -297
  314. package/python/lib/python3.12/idlelib/help_about.py +0 -211
  315. package/python/lib/python3.12/idlelib/history.py +0 -106
  316. package/python/lib/python3.12/idlelib/hyperparser.py +0 -312
  317. package/python/lib/python3.12/idlelib/idle.bat +0 -4
  318. package/python/lib/python3.12/idlelib/idle.py +0 -14
  319. package/python/lib/python3.12/idlelib/idle.pyw +0 -17
  320. package/python/lib/python3.12/idlelib/iomenu.py +0 -441
  321. package/python/lib/python3.12/idlelib/macosx.py +0 -278
  322. package/python/lib/python3.12/idlelib/mainmenu.py +0 -126
  323. package/python/lib/python3.12/idlelib/multicall.py +0 -451
  324. package/python/lib/python3.12/idlelib/outwin.py +0 -188
  325. package/python/lib/python3.12/idlelib/parenmatch.py +0 -183
  326. package/python/lib/python3.12/idlelib/pathbrowser.py +0 -107
  327. package/python/lib/python3.12/idlelib/percolator.py +0 -120
  328. package/python/lib/python3.12/idlelib/pyparse.py +0 -589
  329. package/python/lib/python3.12/idlelib/pyshell.py +0 -1694
  330. package/python/lib/python3.12/idlelib/query.py +0 -392
  331. package/python/lib/python3.12/idlelib/redirector.py +0 -173
  332. package/python/lib/python3.12/idlelib/replace.py +0 -300
  333. package/python/lib/python3.12/idlelib/rpc.py +0 -635
  334. package/python/lib/python3.12/idlelib/run.py +0 -646
  335. package/python/lib/python3.12/idlelib/runscript.py +0 -213
  336. package/python/lib/python3.12/idlelib/scrolledlist.py +0 -151
  337. package/python/lib/python3.12/idlelib/search.py +0 -165
  338. package/python/lib/python3.12/idlelib/searchbase.py +0 -210
  339. package/python/lib/python3.12/idlelib/searchengine.py +0 -235
  340. package/python/lib/python3.12/idlelib/sidebar.py +0 -544
  341. package/python/lib/python3.12/idlelib/squeezer.py +0 -345
  342. package/python/lib/python3.12/idlelib/stackviewer.py +0 -134
  343. package/python/lib/python3.12/idlelib/statusbar.py +0 -52
  344. package/python/lib/python3.12/idlelib/textview.py +0 -193
  345. package/python/lib/python3.12/idlelib/tooltip.py +0 -190
  346. package/python/lib/python3.12/idlelib/tree.py +0 -509
  347. package/python/lib/python3.12/idlelib/undo.py +0 -367
  348. package/python/lib/python3.12/idlelib/util.py +0 -37
  349. package/python/lib/python3.12/idlelib/window.py +0 -98
  350. package/python/lib/python3.12/idlelib/zoomheight.py +0 -124
  351. package/python/lib/python3.12/idlelib/zzdummy.py +0 -73
  352. package/python/lib/python3.12/lib-dynload/_tkinter.cpython-312-darwin.so +0 -0
  353. package/python/lib/python3.12/tkinter/__init__.py +0 -4682
  354. package/python/lib/python3.12/tkinter/__main__.py +0 -7
  355. package/python/lib/python3.12/tkinter/colorchooser.py +0 -86
  356. package/python/lib/python3.12/tkinter/commondialog.py +0 -53
  357. package/python/lib/python3.12/tkinter/constants.py +0 -110
  358. package/python/lib/python3.12/tkinter/dialog.py +0 -49
  359. package/python/lib/python3.12/tkinter/dnd.py +0 -324
  360. package/python/lib/python3.12/tkinter/filedialog.py +0 -492
  361. package/python/lib/python3.12/tkinter/font.py +0 -239
  362. package/python/lib/python3.12/tkinter/messagebox.py +0 -146
  363. package/python/lib/python3.12/tkinter/scrolledtext.py +0 -56
  364. package/python/lib/python3.12/tkinter/simpledialog.py +0 -441
  365. package/python/lib/python3.12/tkinter/tix.py +0 -1948
  366. package/python/lib/python3.12/tkinter/ttk.py +0 -1640
  367. package/python/lib/python3.12/turtle.py +0 -4207
  368. package/python/lib/python3.12/turtledemo/__init__.py +0 -14
  369. package/python/lib/python3.12/turtledemo/__main__.py +0 -404
  370. package/python/lib/python3.12/turtledemo/bytedesign.py +0 -161
  371. package/python/lib/python3.12/turtledemo/chaos.py +0 -59
  372. package/python/lib/python3.12/turtledemo/clock.py +0 -138
  373. package/python/lib/python3.12/turtledemo/colormixer.py +0 -58
  374. package/python/lib/python3.12/turtledemo/forest.py +0 -108
  375. package/python/lib/python3.12/turtledemo/fractalcurves.py +0 -138
  376. package/python/lib/python3.12/turtledemo/lindenmayer.py +0 -119
  377. package/python/lib/python3.12/turtledemo/minimal_hanoi.py +0 -79
  378. package/python/lib/python3.12/turtledemo/nim.py +0 -226
  379. package/python/lib/python3.12/turtledemo/paint.py +0 -54
  380. package/python/lib/python3.12/turtledemo/peace.py +0 -61
  381. package/python/lib/python3.12/turtledemo/penrose.py +0 -175
  382. package/python/lib/python3.12/turtledemo/planet_and_moon.py +0 -111
  383. package/python/lib/python3.12/turtledemo/rosette.py +0 -65
  384. package/python/lib/python3.12/turtledemo/round_dance.py +0 -86
  385. package/python/lib/python3.12/turtledemo/sorting_animate.py +0 -204
  386. package/python/lib/python3.12/turtledemo/tree.py +0 -62
  387. package/python/lib/python3.12/turtledemo/turtle.cfg +0 -10
  388. package/python/lib/python3.12/turtledemo/two_canvases.py +0 -54
  389. package/python/lib/python3.12/turtledemo/yinyang.py +0 -49
  390. package/python/lib/tcl9/9.0/http-2.10.2.tm +0 -5451
  391. package/python/lib/tcl9/9.0/msgcat-1.7.1.tm +0 -1349
  392. package/python/lib/tcl9/9.0/platform/shell-1.1.4.tm +0 -241
  393. package/python/lib/tcl9/9.0/platform-1.1.0.tm +0 -442
  394. package/python/lib/tcl9/9.0/tcltest-2.5.11.tm +0 -3600
  395. package/python/lib/tcl9.0/auto.tcl +0 -710
  396. package/python/lib/tcl9.0/clock.tcl +0 -2110
  397. package/python/lib/tcl9.0/cookiejar0.2/cookiejar.tcl +0 -746
  398. package/python/lib/tcl9.0/cookiejar0.2/idna.tcl +0 -292
  399. package/python/lib/tcl9.0/cookiejar0.2/pkgIndex.tcl +0 -3
  400. package/python/lib/tcl9.0/cookiejar0.2/public_suffix_list.dat.gz +0 -0
  401. package/python/lib/tcl9.0/encoding/ascii.enc +0 -20
  402. package/python/lib/tcl9.0/encoding/big5.enc +0 -1516
  403. package/python/lib/tcl9.0/encoding/cns11643.enc +0 -1584
  404. package/python/lib/tcl9.0/encoding/cp1250.enc +0 -20
  405. package/python/lib/tcl9.0/encoding/cp1251.enc +0 -20
  406. package/python/lib/tcl9.0/encoding/cp1252.enc +0 -20
  407. package/python/lib/tcl9.0/encoding/cp1253.enc +0 -20
  408. package/python/lib/tcl9.0/encoding/cp1254.enc +0 -20
  409. package/python/lib/tcl9.0/encoding/cp1255.enc +0 -20
  410. package/python/lib/tcl9.0/encoding/cp1256.enc +0 -20
  411. package/python/lib/tcl9.0/encoding/cp1257.enc +0 -20
  412. package/python/lib/tcl9.0/encoding/cp1258.enc +0 -20
  413. package/python/lib/tcl9.0/encoding/cp165.enc +0 -20
  414. package/python/lib/tcl9.0/encoding/cp437.enc +0 -20
  415. package/python/lib/tcl9.0/encoding/cp737.enc +0 -20
  416. package/python/lib/tcl9.0/encoding/cp775.enc +0 -20
  417. package/python/lib/tcl9.0/encoding/cp850.enc +0 -20
  418. package/python/lib/tcl9.0/encoding/cp852.enc +0 -20
  419. package/python/lib/tcl9.0/encoding/cp855.enc +0 -20
  420. package/python/lib/tcl9.0/encoding/cp857.enc +0 -20
  421. package/python/lib/tcl9.0/encoding/cp860.enc +0 -20
  422. package/python/lib/tcl9.0/encoding/cp861.enc +0 -20
  423. package/python/lib/tcl9.0/encoding/cp862.enc +0 -20
  424. package/python/lib/tcl9.0/encoding/cp863.enc +0 -20
  425. package/python/lib/tcl9.0/encoding/cp864.enc +0 -20
  426. package/python/lib/tcl9.0/encoding/cp865.enc +0 -20
  427. package/python/lib/tcl9.0/encoding/cp866.enc +0 -20
  428. package/python/lib/tcl9.0/encoding/cp869.enc +0 -20
  429. package/python/lib/tcl9.0/encoding/cp874.enc +0 -20
  430. package/python/lib/tcl9.0/encoding/cp932.enc +0 -801
  431. package/python/lib/tcl9.0/encoding/cp936.enc +0 -2162
  432. package/python/lib/tcl9.0/encoding/cp949.enc +0 -2128
  433. package/python/lib/tcl9.0/encoding/cp950.enc +0 -1499
  434. package/python/lib/tcl9.0/encoding/dingbats.enc +0 -20
  435. package/python/lib/tcl9.0/encoding/ebcdic.enc +0 -20
  436. package/python/lib/tcl9.0/encoding/euc-cn.enc +0 -1397
  437. package/python/lib/tcl9.0/encoding/euc-jp.enc +0 -1353
  438. package/python/lib/tcl9.0/encoding/euc-kr.enc +0 -1533
  439. package/python/lib/tcl9.0/encoding/gb12345.enc +0 -1414
  440. package/python/lib/tcl9.0/encoding/gb1988.enc +0 -20
  441. package/python/lib/tcl9.0/encoding/gb2312-raw.enc +0 -1380
  442. package/python/lib/tcl9.0/encoding/gb2312.enc +0 -1397
  443. package/python/lib/tcl9.0/encoding/iso2022-jp.enc +0 -12
  444. package/python/lib/tcl9.0/encoding/iso2022-kr.enc +0 -7
  445. package/python/lib/tcl9.0/encoding/iso2022.enc +0 -14
  446. package/python/lib/tcl9.0/encoding/iso8859-1.enc +0 -20
  447. package/python/lib/tcl9.0/encoding/iso8859-10.enc +0 -20
  448. package/python/lib/tcl9.0/encoding/iso8859-11.enc +0 -20
  449. package/python/lib/tcl9.0/encoding/iso8859-13.enc +0 -20
  450. package/python/lib/tcl9.0/encoding/iso8859-14.enc +0 -20
  451. package/python/lib/tcl9.0/encoding/iso8859-15.enc +0 -20
  452. package/python/lib/tcl9.0/encoding/iso8859-16.enc +0 -20
  453. package/python/lib/tcl9.0/encoding/iso8859-2.enc +0 -20
  454. package/python/lib/tcl9.0/encoding/iso8859-3.enc +0 -20
  455. package/python/lib/tcl9.0/encoding/iso8859-4.enc +0 -20
  456. package/python/lib/tcl9.0/encoding/iso8859-5.enc +0 -20
  457. package/python/lib/tcl9.0/encoding/iso8859-6.enc +0 -20
  458. package/python/lib/tcl9.0/encoding/iso8859-7.enc +0 -20
  459. package/python/lib/tcl9.0/encoding/iso8859-8.enc +0 -20
  460. package/python/lib/tcl9.0/encoding/iso8859-9.enc +0 -20
  461. package/python/lib/tcl9.0/encoding/jis0201.enc +0 -20
  462. package/python/lib/tcl9.0/encoding/jis0208.enc +0 -1319
  463. package/python/lib/tcl9.0/encoding/jis0212.enc +0 -1159
  464. package/python/lib/tcl9.0/encoding/koi8-r.enc +0 -20
  465. package/python/lib/tcl9.0/encoding/koi8-ru.enc +0 -20
  466. package/python/lib/tcl9.0/encoding/koi8-t.enc +0 -20
  467. package/python/lib/tcl9.0/encoding/koi8-u.enc +0 -20
  468. package/python/lib/tcl9.0/encoding/ksc5601.enc +0 -1516
  469. package/python/lib/tcl9.0/encoding/macCentEuro.enc +0 -20
  470. package/python/lib/tcl9.0/encoding/macCroatian.enc +0 -20
  471. package/python/lib/tcl9.0/encoding/macCyrillic.enc +0 -20
  472. package/python/lib/tcl9.0/encoding/macDingbats.enc +0 -20
  473. package/python/lib/tcl9.0/encoding/macGreek.enc +0 -20
  474. package/python/lib/tcl9.0/encoding/macIceland.enc +0 -20
  475. package/python/lib/tcl9.0/encoding/macJapan.enc +0 -785
  476. package/python/lib/tcl9.0/encoding/macRoman.enc +0 -20
  477. package/python/lib/tcl9.0/encoding/macRomania.enc +0 -20
  478. package/python/lib/tcl9.0/encoding/macThai.enc +0 -20
  479. package/python/lib/tcl9.0/encoding/macTurkish.enc +0 -20
  480. package/python/lib/tcl9.0/encoding/macUkraine.enc +0 -20
  481. package/python/lib/tcl9.0/encoding/shiftjis.enc +0 -690
  482. package/python/lib/tcl9.0/encoding/symbol.enc +0 -20
  483. package/python/lib/tcl9.0/encoding/tis-620.enc +0 -20
  484. package/python/lib/tcl9.0/foreachline.tcl +0 -25
  485. package/python/lib/tcl9.0/history.tcl +0 -335
  486. package/python/lib/tcl9.0/icu.tcl +0 -145
  487. package/python/lib/tcl9.0/init.tcl +0 -772
  488. package/python/lib/tcl9.0/install.tcl +0 -274
  489. package/python/lib/tcl9.0/opt0.4/optparse.tcl +0 -1060
  490. package/python/lib/tcl9.0/opt0.4/pkgIndex.tcl +0 -12
  491. package/python/lib/tcl9.0/package.tcl +0 -776
  492. package/python/lib/tcl9.0/parray.tcl +0 -28
  493. package/python/lib/tcl9.0/readfile.tcl +0 -23
  494. package/python/lib/tcl9.0/safe.tcl +0 -1459
  495. package/python/lib/tcl9.0/tclAppInit.c +0 -183
  496. package/python/lib/tcl9.0/tclIndex +0 -112
  497. package/python/lib/tcl9.0/tm.tcl +0 -378
  498. package/python/lib/tcl9.0/word.tcl +0 -155
  499. package/python/lib/tcl9.0/writefile.tcl +0 -37
  500. package/python/lib/thread3.0.6/libtcl9thread3.0.6.dylib +0 -0
  501. package/python/lib/thread3.0.6/libthread3.0.6.dylib +0 -0
  502. package/python/lib/thread3.0.6/pkgIndex.tcl +0 -52
  503. package/python/lib/thread3.0.6/ttrace.tcl +0 -943
  504. package/python/lib/tk9.0/bgerror.tcl +0 -282
  505. package/python/lib/tk9.0/button.tcl +0 -782
  506. package/python/lib/tk9.0/choosedir.tcl +0 -310
  507. package/python/lib/tk9.0/clrpick.tcl +0 -696
  508. package/python/lib/tk9.0/comdlg.tcl +0 -322
  509. package/python/lib/tk9.0/console.tcl +0 -1148
  510. package/python/lib/tk9.0/dialog.tcl +0 -175
  511. package/python/lib/tk9.0/entry.tcl +0 -721
  512. package/python/lib/tk9.0/focus.tcl +0 -178
  513. package/python/lib/tk9.0/fontchooser.tcl +0 -512
  514. package/python/lib/tk9.0/iconbadges.tcl +0 -253
  515. package/python/lib/tk9.0/iconlist.tcl +0 -705
  516. package/python/lib/tk9.0/icons.tcl +0 -54
  517. package/python/lib/tk9.0/images/README +0 -7
  518. package/python/lib/tk9.0/images/logo.eps +0 -2091
  519. package/python/lib/tk9.0/images/logo100.gif +0 -0
  520. package/python/lib/tk9.0/images/logo64.gif +0 -0
  521. package/python/lib/tk9.0/images/logoLarge.gif +0 -0
  522. package/python/lib/tk9.0/images/logoMed.gif +0 -0
  523. package/python/lib/tk9.0/images/pwrdLogo.eps +0 -1897
  524. package/python/lib/tk9.0/images/pwrdLogo100.gif +0 -0
  525. package/python/lib/tk9.0/images/pwrdLogo150.gif +0 -0
  526. package/python/lib/tk9.0/images/pwrdLogo175.gif +0 -0
  527. package/python/lib/tk9.0/images/pwrdLogo200.gif +0 -0
  528. package/python/lib/tk9.0/images/pwrdLogo75.gif +0 -0
  529. package/python/lib/tk9.0/images/tai-ku.gif +0 -0
  530. package/python/lib/tk9.0/listbox.tcl +0 -522
  531. package/python/lib/tk9.0/megawidget.tcl +0 -297
  532. package/python/lib/tk9.0/menu.tcl +0 -1376
  533. package/python/lib/tk9.0/mkpsenc.tcl +0 -1488
  534. package/python/lib/tk9.0/msgbox.tcl +0 -454
  535. package/python/lib/tk9.0/optMenu.tcl +0 -43
  536. package/python/lib/tk9.0/palette.tcl +0 -283
  537. package/python/lib/tk9.0/panedwindow.tcl +0 -194
  538. package/python/lib/tk9.0/pkgIndex.tcl +0 -3
  539. package/python/lib/tk9.0/print.tcl +0 -1460
  540. package/python/lib/tk9.0/safetk.tcl +0 -262
  541. package/python/lib/tk9.0/scale.tcl +0 -299
  542. package/python/lib/tk9.0/scaling.tcl +0 -232
  543. package/python/lib/tk9.0/scrlbar.tcl +0 -506
  544. package/python/lib/tk9.0/spinbox.tcl +0 -590
  545. package/python/lib/tk9.0/systray.tcl +0 -483
  546. package/python/lib/tk9.0/tclIndex +0 -252
  547. package/python/lib/tk9.0/tearoff.tcl +0 -155
  548. package/python/lib/tk9.0/text.tcl +0 -1295
  549. package/python/lib/tk9.0/tk.tcl +0 -853
  550. package/python/lib/tk9.0/tkAppInit.c +0 -200
  551. package/python/lib/tk9.0/tkfbox.tcl +0 -1251
  552. package/python/lib/tk9.0/ttk/altTheme.tcl +0 -158
  553. package/python/lib/tk9.0/ttk/aquaTheme.tcl +0 -254
  554. package/python/lib/tk9.0/ttk/button.tcl +0 -83
  555. package/python/lib/tk9.0/ttk/clamTheme.tcl +0 -200
  556. package/python/lib/tk9.0/ttk/classicTheme.tcl +0 -165
  557. package/python/lib/tk9.0/ttk/combobox.tcl +0 -555
  558. package/python/lib/tk9.0/ttk/cursors.tcl +0 -205
  559. package/python/lib/tk9.0/ttk/defaults.tcl +0 -250
  560. package/python/lib/tk9.0/ttk/entry.tcl +0 -678
  561. package/python/lib/tk9.0/ttk/fonts.tcl +0 -152
  562. package/python/lib/tk9.0/ttk/menubutton.tcl +0 -237
  563. package/python/lib/tk9.0/ttk/notebook.tcl +0 -261
  564. package/python/lib/tk9.0/ttk/panedwindow.tcl +0 -89
  565. package/python/lib/tk9.0/ttk/progress.tcl +0 -55
  566. package/python/lib/tk9.0/ttk/scale.tcl +0 -94
  567. package/python/lib/tk9.0/ttk/scrollbar.tcl +0 -119
  568. package/python/lib/tk9.0/ttk/sizegrip.tcl +0 -102
  569. package/python/lib/tk9.0/ttk/spinbox.tcl +0 -204
  570. package/python/lib/tk9.0/ttk/treeview.tcl +0 -464
  571. package/python/lib/tk9.0/ttk/ttk.tcl +0 -220
  572. package/python/lib/tk9.0/ttk/utils.tcl +0 -317
  573. package/python/lib/tk9.0/ttk/vistaTheme.tcl +0 -260
  574. package/python/lib/tk9.0/ttk/winTheme.tcl +0 -123
  575. package/python/lib/tk9.0/ttk/xpTheme.tcl +0 -99
  576. package/python/lib/tk9.0/xmfbox.tcl +0 -982
  577. package/python/share/man/man1/python.1 +0 -630
  578. package/python/share/man/man1/python3.1 +0 -630
  579. package/python/share/man/man1/python3.12.1 +0 -630
  580. /package/modules/{simplex_localmodels-0.1.0.dev31.dist-info → simplex_localmodels-0.1.0.dev32.dist-info}/WHEEL +0 -0
  581. /package/modules/{simplex_localmodels-0.1.0.dev31.dist-info → simplex_localmodels-0.1.0.dev32.dist-info}/entry_points.txt +0 -0
  582. /package/modules/{simplex_localmodels-0.1.0.dev31.dist-info → simplex_localmodels-0.1.0.dev32.dist-info}/licenses/NOTICE +0 -0
  583. /package/modules/{simplex_localmodels-0.1.0.dev31.dist-info → simplex_localmodels-0.1.0.dev32.dist-info}/licenses/localmodels/HERMES-LICENSE +0 -0
@@ -1,1251 +0,0 @@
1
- # tkfbox.tcl --
2
- #
3
- # Implements the "TK" standard file selection dialog box. This dialog
4
- # box is used on the Unix platforms whenever the tk_strictMotif flag is
5
- # not set.
6
- #
7
- # The "TK" standard file selection dialog box is similar to the file
8
- # selection dialog box on Win95(TM). The user can navigate the
9
- # directories by clicking on the folder icons or by selecting the
10
- # "Directory" option menu. The user can select files by clicking on the
11
- # file icons or by entering a filename in the "Filename:" entry.
12
- #
13
- # Copyright © 1994-1998 Sun Microsystems, Inc.
14
- #
15
- # See the file "license.terms" for information on usage and redistribution
16
- # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
17
- #
18
-
19
- namespace eval ::tk::dialog {}
20
- namespace eval ::tk::dialog::file {
21
- namespace import -force ::tk::msgcat::*
22
- variable showHiddenBtn 0
23
- variable showHiddenVar 1
24
-
25
- # Based on Vimix/16/actions/go-up.svg
26
- # See https://github.com/vinceliuice/vimix-icon-theme
27
- variable updirImageData {
28
- <?xml version="1.0" encoding="UTF-8"?>
29
- <svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
30
- <path d="m7 14v-9l-4 4-1-1 6-6 6 6-1 1-4-4v9z" fill="#000000"/>
31
- </svg>
32
- }
33
-
34
- proc UpdateUpdirImageData {} {
35
- variable updirImageData
36
- set idx1 [string first "#000000" $updirImageData]
37
- set idx2 [expr {$idx1 + 6}]
38
-
39
- set fgColor [ttk::style lookup . -foreground {} black]
40
- lassign [winfo rgb . $fgColor] r g b
41
- set fgColor [format "#%02x%02x%02x" \
42
- [expr {$r >> 8}] [expr {$g >> 8}] [expr {$b >> 8}]]
43
-
44
- return [string replace $updirImageData $idx1 $idx2 $fgColor]
45
- }
46
-
47
- # Based on https://icons8.com/icon/JXYalxb9XWWd/folder
48
- variable folderImageData {
49
- <?xml version="1.0" encoding="UTF-8"?>
50
- <svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
51
- <path d="m0.5 13.5v-12h4.293l2 2h8.707v10z" fill="#59afff"/>
52
- <path d="m4.586 2 2 2h8.414v9h-14v-11h3.586m0.414-1h-5v13h16v-11h-9l-2-2z" fill="#2d8cff"/>
53
- <path d="m0.5 14.5v-10h4.618l2-1h8.382v11z" fill="#8cc5ff"/>
54
- <path d="m15 4v10h-14v-9h4.236l0.211-0.106 1.789-0.894h7.764m1-1h-9l-2 1h-5v11h16z" fill="#2d8cff"/>
55
- </svg>
56
- }
57
-
58
- # Based on https://icons8.com/icon/mEF_vyjYlnE3/file
59
- variable fileImageData {
60
- <?xml version="1.0" encoding="UTF-8"?>
61
- <svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
62
- <path d="m2 1h8l4 4v11h-12z" fill="#808080"/>
63
- <path d="m3 2h6.5l3.5 3.5v9.5h-10z" fill="#f0f0f0"/>
64
- <path d="m9 1v5h5v-1h-4v-4h-1z" fill="#808080"/>
65
- </svg>
66
- }
67
-
68
- # Create the images if they did not already exist.
69
- if {![info exists ::tk::Priv(updirImage)] ||
70
- $::tk::Priv(updirImage) ni [image names]} {
71
- set ::tk::Priv(updirImage) [image create photo \
72
- -format $::tk::svgFmt -data [UpdateUpdirImageData]]
73
-
74
- if {"TkFileDialog" ni [bindtags .]} {
75
- bindtags . [linsert [bindtags .] 1 TkFileDialog]
76
- bind TkFileDialog <<ThemeChanged>> {
77
- if {$::tk::Priv(updirImage) in [image names]} {
78
- $::tk::Priv(updirImage) configure \
79
- -data [::tk::dialog::file::UpdateUpdirImageData]
80
- }
81
- }
82
- }
83
- }
84
- if {![info exists ::tk::Priv(folderImage)] ||
85
- $::tk::Priv(folderImage) ni [image names]} {
86
- set ::tk::Priv(folderImage) [image create photo \
87
- -format $::tk::svgFmt -data $folderImageData]
88
- }
89
- if {![info exists ::tk::Priv(fileImage)] ||
90
- $::tk::Priv(fileImage) ni [image names]} {
91
- set ::tk::Priv(fileImage) [image create photo \
92
- -format $::tk::svgFmt -data $fileImageData]
93
- }
94
- }
95
-
96
- # ::tk::dialog::file:: --
97
- #
98
- # Implements the TK file selection dialog. This dialog is used when the
99
- # tk_strictMotif flag is set to false. This procedure shouldn't be
100
- # called directly. Call tk_getOpenFile or tk_getSaveFile instead.
101
- #
102
- # Arguments:
103
- # type "open" or "save"
104
- # args Options parsed by the procedure.
105
- #
106
-
107
- proc ::tk::dialog::file:: {type args} {
108
- variable ::tk::Priv
109
- variable showHiddenBtn
110
- set dataName __tk_filedialog
111
- upvar ::tk::dialog::file::$dataName data
112
-
113
- Config $dataName $type $args
114
-
115
- if {$data(-parent) eq "."} {
116
- set w .$dataName
117
- } else {
118
- set w $data(-parent).$dataName
119
- }
120
-
121
- # (re)create the dialog box if necessary
122
- #
123
- if {![winfo exists $w]} {
124
- Create $w TkFDialog
125
- } elseif {[winfo class $w] ne "TkFDialog"} {
126
- destroy $w
127
- Create $w TkFDialog
128
- } else {
129
- set data(dirMenuBtn) $w.contents.f1.menu
130
- set data(dirMenu) $w.contents.f1.menu.menu
131
- set data(upBtn) $w.contents.f1.up
132
- set data(icons) $w.contents.icons
133
- set data(ent) $w.contents.f2.ent
134
- set data(typeMenuLab) $w.contents.f2.lab2
135
- set data(typeMenuBtn) $w.contents.f2.menu
136
- set data(typeMenu) $data(typeMenuBtn).m
137
- set data(okBtn) $w.contents.f2.ok
138
- set data(cancelBtn) $w.contents.f2.cancel
139
- set data(hiddenBtn) $w.contents.f2.hidden
140
- SetSelectMode $w $data(-multiple)
141
- }
142
- if {$showHiddenBtn} {
143
- $data(hiddenBtn) configure -state normal
144
- grid $data(hiddenBtn)
145
- } else {
146
- $data(hiddenBtn) configure -state disabled
147
- grid remove $data(hiddenBtn)
148
- }
149
-
150
- # Make sure subseqent uses of this dialog are independent [Bug 845189]
151
- unset -nocomplain data(extUsed)
152
-
153
- # Dialog boxes should be transient with respect to their parent, so that
154
- # they will always stay on top of their parent window. However, some
155
- # window managers will create the window as withdrawn if the parent window
156
- # is withdrawn or iconified. Combined with the grab we put on the window,
157
- # this can hang the entire application. Therefore we only make the dialog
158
- # transient if the parent is viewable.
159
-
160
- if {[winfo viewable [winfo toplevel $data(-parent)]]} {
161
- wm transient $w $data(-parent)
162
- }
163
-
164
- # Add traces on the selectPath variable
165
- #
166
-
167
- trace add variable data(selectPath) write \
168
- [list ::tk::dialog::file::SetPath $w]
169
- $data(dirMenuBtn) configure \
170
- -textvariable ::tk::dialog::file::${dataName}(selectPath)
171
-
172
- # Cleanup previous menu
173
- #
174
- $data(typeMenu) delete 0 end
175
- $data(typeMenuBtn) configure -state normal -text ""
176
-
177
- # Initialize the file types menu
178
- #
179
- if {[llength $data(-filetypes)]} {
180
- # Default type and name to first entry
181
- set initialtype [lindex $data(-filetypes) 0]
182
- set initialTypeName [lindex $initialtype 0]
183
- if {$data(-typevariable) ne ""} {
184
- upvar #0 $data(-typevariable) typeVariable
185
- if {[info exists typeVariable]} {
186
- set initialTypeName $typeVariable
187
- }
188
- }
189
- foreach type $data(-filetypes) {
190
- set title [lindex $type 0]
191
- set filter [lindex $type 1]
192
- $data(typeMenu) add command -label $title \
193
- -command [list ::tk::dialog::file::SetFilter $w $type]
194
- # [string first] avoids glob-pattern char issues
195
- if {[string first ${initialTypeName} $title] == 0} {
196
- set initialtype $type
197
- }
198
- }
199
- SetFilter $w $initialtype
200
- $data(typeMenuBtn) configure -state normal
201
- $data(typeMenuLab) configure -state normal
202
- } else {
203
- set data(filter) "*"
204
- $data(typeMenuBtn) configure -state disabled -takefocus 0
205
- $data(typeMenuLab) configure -state disabled
206
- }
207
- UpdateWhenIdle $w
208
-
209
- # Withdraw the window, then update all the geometry information
210
- # so we know how big it wants to be, then center the window in the
211
- # display (Motif style) and de-iconify it.
212
-
213
- ::tk::PlaceWindow $w widget $data(-parent)
214
- wm title $w $data(-title)
215
-
216
- # Set a grab and claim the focus too.
217
-
218
- ::tk::SetFocusGrab $w $data(ent)
219
- $data(ent) delete 0 end
220
- $data(ent) insert 0 $data(selectFile)
221
- $data(ent) selection range 0 end
222
- $data(ent) icursor end
223
-
224
- # Wait for the user to respond, then restore the focus and return the
225
- # index of the selected button. Restore the focus before deleting the
226
- # window, since otherwise the window manager may take the focus away so we
227
- # can't redirect it. Finally, restore any grab that was in effect.
228
-
229
- vwait ::tk::Priv(selectFilePath)
230
-
231
- ::tk::RestoreFocusGrab $w $data(ent) withdraw
232
-
233
- # Cleanup traces on selectPath variable
234
- #
235
-
236
- foreach trace [trace info variable data(selectPath)] {
237
- trace remove variable data(selectPath) {*}$trace
238
- }
239
- if {[winfo exists $data(dirMenuBtn)]} {
240
- $data(dirMenuBtn) configure -textvariable {}
241
- }
242
-
243
- return $Priv(selectFilePath)
244
- }
245
-
246
- # ::tk::dialog::file::Config --
247
- #
248
- # Configures the TK filedialog according to the argument list
249
- #
250
- proc ::tk::dialog::file::Config {dataName type argList} {
251
- upvar ::tk::dialog::file::$dataName data
252
-
253
- set data(type) $type
254
-
255
- # 0: Delete all variable that were set on data(selectPath) the
256
- # last time the file dialog is used. The traces may cause troubles
257
- # if the dialog is now used with a different -parent option.
258
-
259
- foreach trace [trace info variable data(selectPath)] {
260
- trace remove variable data(selectPath) {*}$trace
261
- }
262
-
263
- # 1: the configuration specs
264
- #
265
- set specs {
266
- {-defaultextension "" "" ""}
267
- {-filetypes "" "" ""}
268
- {-initialdir "" "" ""}
269
- {-initialfile "" "" ""}
270
- {-parent "" "" "."}
271
- {-title "" "" ""}
272
- {-typevariable "" "" ""}
273
- }
274
-
275
- # The "-multiple" option is only available for the "open" file dialog.
276
- #
277
- if {$type eq "open"} {
278
- lappend specs {-multiple "" "" "0"}
279
- }
280
-
281
- # The "-confirmoverwrite" option is only for the "save" file dialog.
282
- #
283
- if {$type eq "save"} {
284
- lappend specs {-confirmoverwrite "" "" "1"}
285
- }
286
-
287
- # 2: default values depending on the type of the dialog
288
- #
289
- if {![info exists data(selectPath)]} {
290
- # first time the dialog has been popped up
291
- set data(selectPath) [pwd]
292
- set data(selectFile) ""
293
- }
294
-
295
- # 3: parse the arguments
296
- #
297
- tclParseConfigSpec ::tk::dialog::file::$dataName $specs "" $argList
298
-
299
- if {$data(-title) eq ""} {
300
- if {$type eq "open"} {
301
- set data(-title) [mc "Open"]
302
- } else {
303
- set data(-title) [mc "Save As"]
304
- }
305
- }
306
-
307
- # 4: set the default directory and selection according to the -initial
308
- # settings
309
- #
310
- if {$data(-initialdir) ne ""} {
311
- # Ensure that initialdir is an absolute path name.
312
- if {[file isdirectory $data(-initialdir)]} {
313
- set old [pwd]
314
- cd $data(-initialdir)
315
- set data(selectPath) [pwd]
316
- cd $old
317
- } else {
318
- set data(selectPath) [pwd]
319
- }
320
- }
321
- set data(selectFile) $data(-initialfile)
322
-
323
- # 5. Parse the -filetypes option
324
- #
325
- set data(origfiletypes) $data(-filetypes)
326
- set data(-filetypes) [::tk::FDGetFileTypes $data(-filetypes)]
327
-
328
- if {![winfo exists $data(-parent)]} {
329
- return -code error -errorcode [list TK LOOKUP WINDOW $data(-parent)] \
330
- "bad window path name \"$data(-parent)\""
331
- }
332
-
333
- # Set -multiple to a one or zero value (not other boolean types like
334
- # "yes") so we can use it in tests more easily.
335
- if {$type eq "save"} {
336
- set data(-multiple) 0
337
- } elseif {$data(-multiple)} {
338
- set data(-multiple) 1
339
- } else {
340
- set data(-multiple) 0
341
- }
342
- }
343
-
344
- proc ::tk::dialog::file::Create {w class} {
345
- set dataName [lindex [split $w .] end]
346
- upvar ::tk::dialog::file::$dataName data
347
- variable ::tk::Priv
348
- global tk_library
349
-
350
- toplevel $w -class $class
351
- if {[tk windowingsystem] eq "x11"} {wm attributes $w -type dialog}
352
- pack [ttk::frame $w.contents] -expand 1 -fill both
353
- #set w $w.contents
354
-
355
- # f1: the frame with the directory option menu
356
- #
357
- set f1 [ttk::frame $w.contents.f1]
358
- bind [::tk::AmpWidget ttk::label $f1.lab -text [mc "&Directory:"]] \
359
- <<AltUnderlined>> [list focus $f1.menu]
360
-
361
- set data(dirMenuBtn) $f1.menu
362
- if {![info exists data(selectPath)]} {
363
- set data(selectPath) ""
364
- }
365
- set data(dirMenu) $f1.menu.menu
366
- ttk::menubutton $f1.menu -menu $data(dirMenu) -direction flush \
367
- -textvariable [format %s(selectPath) ::tk::dialog::file::$dataName]
368
- menu $data(dirMenu) -tearoff 0
369
- $data(dirMenu) add radiobutton -label "" -variable \
370
- [format %s(selectPath) ::tk::dialog::file::$dataName]
371
- set data(upBtn) [ttk::button $f1.up]
372
- $data(upBtn) configure -image $Priv(updirImage)
373
-
374
- $f1.menu configure -takefocus 1;# -highlightthickness 2
375
-
376
- pack $data(upBtn) -side right -padx 3p -fill both
377
- pack $f1.lab -side left -padx 3p -fill both
378
- pack $f1.menu -expand yes -fill both -padx 3p
379
-
380
- # data(icons): the IconList that list the files and directories.
381
- #
382
- if {$class eq "TkFDialog"} {
383
- if { $data(-multiple) } {
384
- set fNameCaption [mc "File &names:"]
385
- } else {
386
- set fNameCaption [mc "File &name:"]
387
- }
388
- set fTypeCaption [mc "Files of &type:"]
389
- set iconListCommand [list ::tk::dialog::file::OkCmd $w]
390
- } else {
391
- set fNameCaption [mc "&Selection:"]
392
- set iconListCommand [list ::tk::dialog::file::chooseDir::DblClick $w]
393
- }
394
- set data(icons) [::tk::IconList $w.contents.icons \
395
- -command $iconListCommand -multiple $data(-multiple)]
396
- bind $data(icons) <<ListboxSelect>> \
397
- [list ::tk::dialog::file::ListBrowse $w]
398
-
399
- # f2: the frame with the OK button, cancel button, "file name" field
400
- # and file types field.
401
- #
402
- set f2 [ttk::frame $w.contents.f2]
403
- bind [::tk::AmpWidget ttk::label $f2.lab -text $fNameCaption -anchor e]\
404
- <<AltUnderlined>> [list focus $f2.ent]
405
- # -pady 0
406
- set data(ent) [ttk::entry $f2.ent]
407
-
408
- # The font to use for the icons. The default Canvas font on Unix is just
409
- # deviant.
410
- set ::tk::$w.contents.icons(font) [$data(ent) cget -font]
411
-
412
- # Make the file types bits only if this is a File Dialog
413
- if {$class eq "TkFDialog"} {
414
- set data(typeMenuLab) [::tk::AmpWidget ttk::label $f2.lab2 \
415
- -text $fTypeCaption -anchor e]
416
- # -pady [$f2.lab cget -pady]
417
- set data(typeMenuBtn) [ttk::menubutton $f2.menu \
418
- -menu $f2.menu.m]
419
- # -indicatoron 1
420
- set data(typeMenu) [menu $data(typeMenuBtn).m -tearoff 0]
421
- # $data(typeMenuBtn) configure -takefocus 1 -relief raised -anchor w
422
- bind $data(typeMenuLab) <<AltUnderlined>> [list \
423
- focus $data(typeMenuBtn)]
424
- }
425
-
426
- # The hidden button is displayed when ::tk::dialog::file::showHiddenBtn is
427
- # true. Create it disabled so the binding doesn't trigger if it isn't
428
- # shown.
429
- if {$class eq "TkFDialog"} {
430
- set text [mc "Show &Hidden Files and Directories"]
431
- } else {
432
- set text [mc "Show &Hidden Directories"]
433
- }
434
- set data(hiddenBtn) [::tk::AmpWidget ttk::checkbutton $f2.hidden \
435
- -text $text -state disabled \
436
- -variable ::tk::dialog::file::showHiddenVar \
437
- -command [list ::tk::dialog::file::UpdateWhenIdle $w]]
438
- # -anchor w -padx 2p
439
-
440
- # the okBtn is created after the typeMenu so that the keyboard traversal
441
- # is in the right order, and add binding so that we find out when the
442
- # dialog is destroyed by the user (added here instead of to the overall
443
- # window so no confusion about how much <Destroy> gets called; exactly
444
- # once will do). [Bug 987169]
445
-
446
- set data(okBtn) [::tk::AmpWidget ttk::button $f2.ok \
447
- -text [mc "&OK"] -default active];# -pady 2p]
448
- bind $data(okBtn) <Destroy> [list ::tk::dialog::file::Destroyed $w]
449
- set data(cancelBtn) [::tk::AmpWidget ttk::button $f2.cancel \
450
- -text [mc "&Cancel"] -default normal];# -pady 2p]
451
-
452
- # grid the widgets in f2
453
- #
454
- grid $f2.lab $f2.ent $data(okBtn) -padx 3p -pady 2p -sticky ew
455
- grid configure $f2.ent -padx 1.5p
456
- if {$class eq "TkFDialog"} {
457
- grid $data(typeMenuLab) $data(typeMenuBtn) $data(cancelBtn) \
458
- -padx 3p -sticky ew
459
- grid configure $data(typeMenuBtn) -padx 0
460
- grid $data(hiddenBtn) -columnspan 2 -padx 3p -sticky ew
461
- } else {
462
- grid $data(hiddenBtn) - $data(cancelBtn) -padx 3p -sticky ew
463
- }
464
- grid columnconfigure $f2 1 -weight 1
465
-
466
- # Pack all the frames together. We are done with widget construction.
467
- #
468
- pack $f1 -side top -fill x -pady 3p
469
- pack $f2 -side bottom -pady 3p -fill x
470
- pack $data(icons) -expand yes -fill both -padx 3p -pady 1p
471
-
472
- # Set up the event handlers that are common to Directory and File Dialogs
473
- #
474
-
475
- wm protocol $w WM_DELETE_WINDOW [list ::tk::dialog::file::CancelCmd $w]
476
- $data(upBtn) configure -command [list ::tk::dialog::file::UpDirCmd $w]
477
- $data(cancelBtn) configure -command [list ::tk::dialog::file::CancelCmd $w]
478
- bind $w <Escape> [list $data(cancelBtn) invoke]
479
- bind $w <Alt-Key> [list tk::AltKeyInDialog $w %A]
480
-
481
- # Set up event handlers specific to File or Directory Dialogs
482
- #
483
- if {$class eq "TkFDialog"} {
484
- bind $data(ent) <Return> [list ::tk::dialog::file::ActivateEnt $w]
485
- $data(okBtn) configure -command [list ::tk::dialog::file::OkCmd $w]
486
- bind $w <Alt-t> [format {
487
- if {[%s cget -state] eq "normal"} {
488
- focus %s
489
- }
490
- } $data(typeMenuBtn) $data(typeMenuBtn)]
491
- } else {
492
- set okCmd [list ::tk::dialog::file::chooseDir::OkCmd $w]
493
- bind $data(ent) <Return> $okCmd
494
- $data(okBtn) configure -command $okCmd
495
- bind $w <Alt-s> [list focus $data(ent)]
496
- bind $w <Alt-o> [list $data(okBtn) invoke]
497
- }
498
- bind $w <Alt-h> [list $data(hiddenBtn) invoke]
499
- bind $data(ent) <Tab> [list ::tk::dialog::file::CompleteEnt $w]
500
-
501
- # Build the focus group for all the entries
502
- #
503
- ::tk::FocusGroup_Create $w
504
- ::tk::FocusGroup_BindIn $w $data(ent) [list \
505
- ::tk::dialog::file::EntFocusIn $w]
506
- ::tk::FocusGroup_BindOut $w $data(ent) [list \
507
- ::tk::dialog::file::EntFocusOut $w]
508
- }
509
-
510
- # ::tk::dialog::file::SetSelectMode --
511
- #
512
- # Set the select mode of the dialog to single select or multi-select.
513
- #
514
- # Arguments:
515
- # w The dialog path.
516
- # multi 1 if the dialog is multi-select; 0 otherwise.
517
- #
518
- # Results:
519
- # None.
520
-
521
- proc ::tk::dialog::file::SetSelectMode {w multi} {
522
- set dataName __tk_filedialog
523
- upvar ::tk::dialog::file::$dataName data
524
- if { $multi } {
525
- set fNameCaption [mc "File &names:"]
526
- } else {
527
- set fNameCaption [mc "File &name:"]
528
- }
529
- set iconListCommand [list ::tk::dialog::file::OkCmd $w]
530
- ::tk::SetAmpText $w.contents.f2.lab $fNameCaption
531
- $data(icons) configure -multiple $multi -command $iconListCommand
532
- return
533
- }
534
-
535
- # ::tk::dialog::file::UpdateWhenIdle --
536
- #
537
- # Creates an idle event handler which updates the dialog in idle time.
538
- # This is important because loading the directory may take a long time
539
- # and we don't want to load the same directory for multiple times due to
540
- # multiple concurrent events.
541
- #
542
- proc ::tk::dialog::file::UpdateWhenIdle {w} {
543
- upvar ::tk::dialog::file::[winfo name $w] data
544
-
545
- if {[info exists data(updateId)]} {
546
- return
547
- }
548
- set data(updateId) [after idle [list ::tk::dialog::file::Update $w]]
549
- }
550
-
551
- # ::tk::dialog::file::Update --
552
- #
553
- # Loads the files and directories into the IconList widget. Also sets up
554
- # the directory option menu for quick access to parent directories.
555
- #
556
- proc ::tk::dialog::file::Update {w} {
557
- # This proc may be called within an idle handler. Make sure that the
558
- # window has not been destroyed before this proc is called
559
- if {![winfo exists $w]} {
560
- return
561
- }
562
- set class [winfo class $w]
563
- if {($class ne "TkFDialog") && ($class ne "TkChooseDir")} {
564
- return
565
- }
566
-
567
- set dataName [winfo name $w]
568
- upvar ::tk::dialog::file::$dataName data
569
- variable ::tk::Priv
570
- variable showHiddenVar
571
- global tk_library
572
- unset -nocomplain data(updateId)
573
-
574
- set folder $Priv(folderImage)
575
- set file $Priv(fileImage)
576
-
577
- set appPWD [pwd]
578
- if {[catch {
579
- cd $data(selectPath)
580
- }]} then {
581
- # We cannot change directory to $data(selectPath). $data(selectPath)
582
- # should have been checked before ::tk::dialog::file::Update is
583
- # called, so we normally won't come to here. Anyways, give an error
584
- # and abort action.
585
- tk_messageBox -type ok -parent $w -icon warning -message [mc \
586
- "Cannot change to the directory \"%1\$s\".\nPermission denied."\
587
- $data(selectPath)]
588
- cd $appPWD
589
- return
590
- }
591
-
592
- # Turn on the busy cursor. BUG?? We haven't disabled X events, though,
593
- # so the user may still click and cause havoc ...
594
- #
595
- set entCursor [$data(ent) cget -cursor]
596
- set dlgCursor [$w cget -cursor]
597
- $data(ent) configure -cursor watch
598
- $w configure -cursor watch
599
- update idletasks
600
-
601
- $data(icons) deleteall
602
-
603
- set showHidden $showHiddenVar
604
-
605
- # Make the dir list. Note that using an explicit [pwd] (instead of '.') is
606
- # better in some VFS cases.
607
- $data(icons) add $folder [GlobFiltered [pwd] d 1]
608
-
609
- if {$class eq "TkFDialog"} {
610
- # Make the file list if this is a File Dialog, selecting all but
611
- # 'd'irectory type files.
612
- #
613
- $data(icons) add $file [GlobFiltered [pwd] {f b c l p s}]
614
- }
615
-
616
- # Update the Directory: option menu
617
- #
618
- set list ""
619
- set dir ""
620
- foreach subdir [file split $data(selectPath)] {
621
- set dir [file join $dir $subdir]
622
- lappend list $dir
623
- }
624
-
625
- $data(dirMenu) delete 0 end
626
- set var [format %s(selectPath) ::tk::dialog::file::$dataName]
627
- foreach path $list {
628
- $data(dirMenu) add command -label $path -command [list set $var $path]
629
- }
630
-
631
- # Restore the PWD to the application's PWD
632
- #
633
- cd $appPWD
634
-
635
- if {$class eq "TkFDialog"} {
636
- # Restore the Open/Save Button if this is a File Dialog
637
- #
638
- if {$data(type) eq "open"} {
639
- ::tk::SetAmpText $data(okBtn) [mc "&Open"]
640
- } else {
641
- ::tk::SetAmpText $data(okBtn) [mc "&Save"]
642
- }
643
- }
644
-
645
- # turn off the busy cursor.
646
- #
647
- $data(ent) configure -cursor $entCursor
648
- $w configure -cursor $dlgCursor
649
- }
650
-
651
- # ::tk::dialog::file::SetPathSilently --
652
- #
653
- # Sets data(selectPath) without invoking the trace procedure
654
- #
655
- proc ::tk::dialog::file::SetPathSilently {w path} {
656
- upvar ::tk::dialog::file::[winfo name $w] data
657
-
658
- set cb [list ::tk::dialog::file::SetPath $w]
659
- trace remove variable data(selectPath) write $cb
660
- set data(selectPath) $path
661
- trace add variable data(selectPath) write $cb
662
- }
663
-
664
-
665
- # This proc gets called whenever data(selectPath) is set
666
- #
667
- proc ::tk::dialog::file::SetPath {w name1 name2 op} {
668
- if {[winfo exists $w]} {
669
- upvar ::tk::dialog::file::[winfo name $w] data
670
- UpdateWhenIdle $w
671
- # On directory dialogs, we keep the entry in sync with the currentdir.
672
- if {[winfo class $w] eq "TkChooseDir"} {
673
- $data(ent) delete 0 end
674
- $data(ent) insert end $data(selectPath)
675
- }
676
- }
677
- }
678
-
679
- # This proc gets called whenever data(filter) is set
680
- #
681
- proc ::tk::dialog::file::SetFilter {w type} {
682
- upvar ::tk::dialog::file::[winfo name $w] data
683
-
684
- set data(filterType) $type
685
- set data(filter) [lindex $type 1]
686
- $data(typeMenuBtn) configure -text [lindex $type 0] ;#-indicatoron 1
687
-
688
- # If we aren't using a default extension, use the one suppled by the
689
- # filter.
690
- if {![info exists data(extUsed)]} {
691
- if {[string length $data(-defaultextension)]} {
692
- set data(extUsed) 1
693
- } else {
694
- set data(extUsed) 0
695
- }
696
- }
697
-
698
- if {!$data(extUsed)} {
699
- # Get the first extension in the list that matches {^\*\.\w+$} and
700
- # remove all * from the filter.
701
- set index [lsearch -regexp $data(filter) {^\*\.\w+$}]
702
- if {$index >= 0} {
703
- set data(-defaultextension) \
704
- [string trimleft [lindex $data(filter) $index] "*"]
705
- } else {
706
- # Couldn't find anything! Reset to a safe default...
707
- set data(-defaultextension) ""
708
- }
709
- }
710
-
711
- $data(icons) see 0
712
-
713
- UpdateWhenIdle $w
714
- }
715
-
716
- # tk::dialog::file::ResolveFile --
717
- #
718
- # Interpret the user's text input in a file selection dialog. Performs:
719
- #
720
- # (1) ~ substitution
721
- # (2) resolve all instances of . and ..
722
- # (3) check for non-existent files/directories
723
- # (4) check for chdir permissions
724
- # (5) conversion of environment variable references to their
725
- # contents (once only)
726
- #
727
- # Arguments:
728
- # context: the current directory you are in
729
- # text: the text entered by the user
730
- # defaultext: the default extension to add to files with no extension
731
- # expandEnv: whether to expand environment variables (yes by default)
732
- #
733
- # Return vaue:
734
- # [list $flag $directory $file]
735
- #
736
- # flag = OK : valid input
737
- # = PATTERN : valid directory/pattern
738
- # = PATH : the directory does not exist
739
- # = FILE : the directory exists by the file doesn't exist
740
- # = CHDIR : Cannot change to the directory
741
- # = ERROR : Invalid entry
742
- #
743
- # directory : valid only if flag = OK or PATTERN or FILE
744
- # file : valid only if flag = OK or PATTERN
745
- #
746
- # directory may not be the same as context, because text may contain a
747
- # subdirectory name
748
- #
749
- proc ::tk::dialog::file::ResolveFile {context text defaultext {expandEnv 1}} {
750
- set appPWD [pwd]
751
-
752
- set path [JoinFile $context $text]
753
-
754
- # If the file has no extension, append the default. Be careful not to do
755
- # this for directories, otherwise typing a dirname in the box will give
756
- # back "dirname.extension" instead of trying to change dir.
757
- if {
758
- ![file isdirectory $path] && ([file ext $path] eq "") &&
759
- ![string match {$*} [file tail $path]]
760
- } then {
761
- set path "$path$defaultext"
762
- }
763
-
764
- if {[catch {file exists $path}]} {
765
- # This "if" block can be safely removed if the following code stop
766
- # generating errors.
767
- #
768
- # file exists ~nonsuchuser
769
- #
770
- return [list ERROR $path ""]
771
- }
772
-
773
- if {[file exists $path]} {
774
- if {[file isdirectory $path]} {
775
- if {[catch {cd $path}]} {
776
- return [list CHDIR $path ""]
777
- }
778
- set directory [pwd]
779
- set file ""
780
- set flag OK
781
- cd $appPWD
782
- } else {
783
- if {[catch {cd [file dirname $path]}]} {
784
- return [list CHDIR [file dirname $path] ""]
785
- }
786
- set directory [pwd]
787
- set file [file tail $path]
788
- set flag OK
789
- cd $appPWD
790
- }
791
- } else {
792
- set dirname [file dirname $path]
793
- if {[file exists $dirname]} {
794
- if {[catch {cd $dirname}]} {
795
- return [list CHDIR $dirname ""]
796
- }
797
- set directory [pwd]
798
- cd $appPWD
799
- set file [file tail $path]
800
- # It's nothing else, so check to see if it is an env-reference
801
- if {$expandEnv && [string match {$*} $file]} {
802
- set var [string range $file 1 end]
803
- if {[info exist ::env($var)]} {
804
- return [ResolveFile $context $::env($var) $defaultext 0]
805
- }
806
- }
807
- if {[regexp {[*?]} $file]} {
808
- set flag PATTERN
809
- } else {
810
- set flag FILE
811
- }
812
- } else {
813
- set directory $dirname
814
- set file [file tail $path]
815
- set flag PATH
816
- # It's nothing else, so check to see if it is an env-reference
817
- if {$expandEnv && [string match {$*} $file]} {
818
- set var [string range $file 1 end]
819
- if {[info exist ::env($var)]} {
820
- return [ResolveFile $context $::env($var) $defaultext 0]
821
- }
822
- }
823
- }
824
- }
825
-
826
- return [list $flag $directory $file]
827
- }
828
-
829
-
830
- # Gets called when the entry box gets keyboard focus. We clear the selection
831
- # from the icon list . This way the user can be certain that the input in the
832
- # entry box is the selection.
833
- #
834
- proc ::tk::dialog::file::EntFocusIn {w} {
835
- upvar ::tk::dialog::file::[winfo name $w] data
836
-
837
- if {[$data(ent) get] ne ""} {
838
- $data(ent) selection range 0 end
839
- $data(ent) icursor end
840
- } else {
841
- $data(ent) selection clear
842
- }
843
-
844
- if {[winfo class $w] eq "TkFDialog"} {
845
- # If this is a File Dialog, make sure the buttons are labeled right.
846
- if {$data(type) eq "open"} {
847
- ::tk::SetAmpText $data(okBtn) [mc "&Open"]
848
- } else {
849
- ::tk::SetAmpText $data(okBtn) [mc "&Save"]
850
- }
851
- }
852
- }
853
-
854
- proc ::tk::dialog::file::EntFocusOut {w} {
855
- upvar ::tk::dialog::file::[winfo name $w] data
856
-
857
- $data(ent) selection clear
858
- }
859
-
860
-
861
- # Gets called when user presses Return in the "File name" entry.
862
- #
863
- proc ::tk::dialog::file::ActivateEnt {w} {
864
- upvar ::tk::dialog::file::[winfo name $w] data
865
-
866
- set text [$data(ent) get]
867
- if {$data(-multiple)} {
868
- foreach t $text {
869
- VerifyFileName $w $t
870
- }
871
- } else {
872
- VerifyFileName $w $text
873
- }
874
- }
875
-
876
- # Verification procedure
877
- #
878
- proc ::tk::dialog::file::VerifyFileName {w filename} {
879
- upvar ::tk::dialog::file::[winfo name $w] data
880
-
881
- set list [ResolveFile $data(selectPath) $filename $data(-defaultextension)]
882
- foreach {flag path file} $list {
883
- break
884
- }
885
-
886
- switch -- $flag {
887
- OK {
888
- if {$file eq ""} {
889
- # user has entered an existing (sub)directory
890
- set data(selectPath) $path
891
- $data(ent) delete 0 end
892
- } else {
893
- SetPathSilently $w $path
894
- if {$data(-multiple)} {
895
- lappend data(selectFile) $file
896
- } else {
897
- set data(selectFile) $file
898
- }
899
- Done $w
900
- }
901
- }
902
- PATTERN {
903
- set data(selectPath) $path
904
- set data(filter) $file
905
- }
906
- FILE {
907
- if {$data(type) eq "open"} {
908
- tk_messageBox -icon warning -type ok -parent $w \
909
- -message [mc "File \"%1\$s\" does not exist." \
910
- [file join $path $file]]
911
- $data(ent) selection range 0 end
912
- $data(ent) icursor end
913
- } else {
914
- SetPathSilently $w $path
915
- if {$data(-multiple)} {
916
- lappend data(selectFile) $file
917
- } else {
918
- set data(selectFile) $file
919
- }
920
- Done $w
921
- }
922
- }
923
- PATH {
924
- tk_messageBox -icon warning -type ok -parent $w -message \
925
- [mc "Directory \"%1\$s\" does not exist." $path]
926
- $data(ent) selection range 0 end
927
- $data(ent) icursor end
928
- }
929
- CHDIR {
930
- tk_messageBox -type ok -parent $w -icon warning -message \
931
- [mc "Cannot change to the directory\
932
- \"%1\$s\".\nPermission denied." $path]
933
- $data(ent) selection range 0 end
934
- $data(ent) icursor end
935
- }
936
- ERROR {
937
- tk_messageBox -type ok -parent $w -icon warning -message \
938
- [mc "Invalid file name \"%1\$s\"." $path]
939
- $data(ent) selection range 0 end
940
- $data(ent) icursor end
941
- }
942
- }
943
- }
944
-
945
- # Gets called when user presses the Alt-s or Alt-o keys.
946
- #
947
- proc ::tk::dialog::file::InvokeBtn {w key} {
948
- upvar ::tk::dialog::file::[winfo name $w] data
949
-
950
- if {[$data(okBtn) cget -text] eq $key} {
951
- $data(okBtn) invoke
952
- }
953
- }
954
-
955
- # Gets called when user presses the "parent directory" button
956
- #
957
- proc ::tk::dialog::file::UpDirCmd {w} {
958
- upvar ::tk::dialog::file::[winfo name $w] data
959
-
960
- if {$data(selectPath) ne "/"} {
961
- set data(selectPath) [file dirname $data(selectPath)]
962
- }
963
- }
964
-
965
- # Join a file name to a path name. The "file join" command will break if the
966
- # filename begins with ~
967
- #
968
- proc ::tk::dialog::file::JoinFile {path file} {
969
- if {[string match {~*} $file] && [file exists $path/$file]} {
970
- return [file join $path ./$file]
971
- } else {
972
- return [file join $path $file]
973
- }
974
- }
975
-
976
- # Gets called when user presses the "OK" button
977
- #
978
- proc ::tk::dialog::file::OkCmd {w} {
979
- upvar ::tk::dialog::file::[winfo name $w] data
980
-
981
- set filenames {}
982
- foreach item [$data(icons) selection get] {
983
- lappend filenames [$data(icons) get $item]
984
- }
985
-
986
- if {
987
- ([llength $filenames] && !$data(-multiple)) ||
988
- ($data(-multiple) && ([llength $filenames] == 1))
989
- } then {
990
- set filename [lindex $filenames 0]
991
- set file [JoinFile $data(selectPath) $filename]
992
- if {[file isdirectory $file]} {
993
- ListInvoke $w [list $filename]
994
- return
995
- }
996
- }
997
-
998
- ActivateEnt $w
999
- }
1000
-
1001
- # Gets called when user presses the "Cancel" button
1002
- #
1003
- proc ::tk::dialog::file::CancelCmd {w} {
1004
- upvar ::tk::dialog::file::[winfo name $w] data
1005
- variable ::tk::Priv
1006
-
1007
- bind $data(okBtn) <Destroy> {}
1008
- set Priv(selectFilePath) ""
1009
- }
1010
-
1011
- # Gets called when user destroys the dialog directly [Bug 987169]
1012
- #
1013
- proc ::tk::dialog::file::Destroyed {w} {
1014
- upvar ::tk::dialog::file::[winfo name $w] data
1015
- variable ::tk::Priv
1016
-
1017
- set Priv(selectFilePath) ""
1018
- }
1019
-
1020
- # Gets called when user browses the IconList widget (dragging mouse, arrow
1021
- # keys, etc)
1022
- #
1023
- proc ::tk::dialog::file::ListBrowse {w} {
1024
- upvar ::tk::dialog::file::[winfo name $w] data
1025
-
1026
- set text {}
1027
- foreach item [$data(icons) selection get] {
1028
- lappend text [$data(icons) get $item]
1029
- }
1030
- if {[llength $text] == 0} {
1031
- return
1032
- }
1033
- if {$data(-multiple)} {
1034
- set newtext {}
1035
- foreach file $text {
1036
- set fullfile [JoinFile $data(selectPath) $file]
1037
- if { ![file isdirectory $fullfile] } {
1038
- lappend newtext $file
1039
- }
1040
- }
1041
- set text $newtext
1042
- set isDir 0
1043
- } else {
1044
- set text [lindex $text 0]
1045
- set file [JoinFile $data(selectPath) $text]
1046
- set isDir [file isdirectory $file]
1047
- }
1048
- if {!$isDir} {
1049
- $data(ent) delete 0 end
1050
- $data(ent) insert 0 $text
1051
-
1052
- if {[winfo class $w] eq "TkFDialog"} {
1053
- if {$data(type) eq "open"} {
1054
- ::tk::SetAmpText $data(okBtn) [mc "&Open"]
1055
- } else {
1056
- ::tk::SetAmpText $data(okBtn) [mc "&Save"]
1057
- }
1058
- }
1059
- } elseif {[winfo class $w] eq "TkFDialog"} {
1060
- ::tk::SetAmpText $data(okBtn) [mc "&Open"]
1061
- }
1062
- }
1063
-
1064
- # Gets called when user invokes the IconList widget (double-click, Return key,
1065
- # etc)
1066
- #
1067
- proc ::tk::dialog::file::ListInvoke {w filenames} {
1068
- upvar ::tk::dialog::file::[winfo name $w] data
1069
-
1070
- if {[llength $filenames] == 0} {
1071
- return
1072
- }
1073
-
1074
- set file [JoinFile $data(selectPath) [lindex $filenames 0]]
1075
-
1076
- set class [winfo class $w]
1077
- if {$class eq "TkChooseDir" || [file isdirectory $file]} {
1078
- set appPWD [pwd]
1079
- if {[catch {cd $file}]} {
1080
- tk_messageBox -type ok -parent $w -icon warning -message \
1081
- [mc "Cannot change to the directory \"%1\$s\".\nPermission denied." $file]
1082
- } else {
1083
- cd $appPWD
1084
- set data(selectPath) $file
1085
- }
1086
- } else {
1087
- if {$data(-multiple)} {
1088
- set data(selectFile) $filenames
1089
- } else {
1090
- set data(selectFile) $file
1091
- }
1092
- Done $w
1093
- }
1094
- }
1095
-
1096
- # ::tk::dialog::file::Done --
1097
- #
1098
- # Gets called when user has input a valid filename. Pops up a dialog
1099
- # box to confirm selection when necessary. Sets the
1100
- # tk::Priv(selectFilePath) variable, which will break the "vwait" loop
1101
- # in ::tk::dialog::file:: and return the selected filename to the script
1102
- # that calls tk_getOpenFile or tk_getSaveFile
1103
- #
1104
- proc ::tk::dialog::file::Done {w {selectFilePath ""}} {
1105
- upvar ::tk::dialog::file::[winfo name $w] data
1106
- variable ::tk::Priv
1107
-
1108
- if {$selectFilePath eq ""} {
1109
- if {$data(-multiple)} {
1110
- set selectFilePath {}
1111
- foreach f $data(selectFile) {
1112
- lappend selectFilePath [JoinFile $data(selectPath) $f]
1113
- }
1114
- } else {
1115
- set selectFilePath [JoinFile $data(selectPath) $data(selectFile)]
1116
- }
1117
-
1118
- set Priv(selectFile) $data(selectFile)
1119
- set Priv(selectPath) $data(selectPath)
1120
-
1121
- if {($data(type) eq "save") && $data(-confirmoverwrite) && [file exists $selectFilePath]} {
1122
- set reply [tk_messageBox -icon warning -type yesno -parent $w \
1123
- -message [mc "File \"%1\$s\" already exists.\nDo you want\
1124
- to overwrite it?" $selectFilePath]]
1125
- if {$reply eq "no"} {
1126
- return
1127
- }
1128
- }
1129
- if {
1130
- [info exists data(-typevariable)] && $data(-typevariable) ne ""
1131
- && [info exists data(-filetypes)] && [llength $data(-filetypes)]
1132
- && [info exists data(filterType)] && $data(filterType) ne ""
1133
- } then {
1134
- upvar #0 $data(-typevariable) typeVariable
1135
- set typeVariable [lindex $data(origfiletypes) \
1136
- [lsearch -exact $data(-filetypes) $data(filterType)] 0]
1137
- }
1138
- }
1139
- bind $data(okBtn) <Destroy> {}
1140
- set Priv(selectFilePath) $selectFilePath
1141
- }
1142
-
1143
- # ::tk::dialog::file::GlobFiltered --
1144
- #
1145
- # Gets called to do globbing, returning the results and filtering them
1146
- # according to the current filter (and removing the entries for '.' and
1147
- # '..' which are never shown). Deals with evil cases such as where the
1148
- # user is supplying a filter which is an invalid list or where it has an
1149
- # unbalanced brace. The resulting list will be dictionary sorted.
1150
- #
1151
- # Arguments:
1152
- # dir Which directory to search
1153
- # type List of filetypes to look for ('d' or 'f b c l p s')
1154
- # overrideFilter Whether to ignore the filter for this search.
1155
- #
1156
- # NB: Assumes that the caller has mapped the state variable to 'data'.
1157
- #
1158
- proc ::tk::dialog::file::GlobFiltered {dir type {overrideFilter 0}} {
1159
- variable showHiddenVar
1160
- upvar 1 data(filter) filter
1161
-
1162
- if {$filter eq "*" || $overrideFilter} {
1163
- set patterns [list *]
1164
- if {$showHiddenVar} {
1165
- lappend patterns .*
1166
- }
1167
- } elseif {[string is list $filter]} {
1168
- set patterns $filter
1169
- } else {
1170
- # Invalid list; assume we can use non-whitespace sequences as words
1171
- set patterns [regexp -inline -all {\S+} $filter]
1172
- }
1173
-
1174
- set opts [list -tails -directory $dir -type $type -nocomplain]
1175
-
1176
- set result {}
1177
- catch {
1178
- # We have a catch because we might have a really bad pattern (e.g.,
1179
- # with an unbalanced brace); even [glob -nocomplain] doesn't like it.
1180
- # Using a catch ensures that it just means we match nothing instead of
1181
- # throwing a nasty error at the user...
1182
- foreach f [glob {*}$opts -- {*}$patterns] {
1183
- if {$f eq "." || $f eq ".."} {
1184
- continue
1185
- }
1186
- # See ticket [1641721], $f might be a link pointing to a dir
1187
- if {$type != "d" && [file isdir [file join $dir $f]]} {
1188
- continue
1189
- }
1190
- lappend result $f
1191
- }
1192
- }
1193
- return [lsort -dictionary -unique $result]
1194
- }
1195
-
1196
- proc ::tk::dialog::file::CompleteEnt {w} {
1197
- upvar ::tk::dialog::file::[winfo name $w] data
1198
- set f [$data(ent) get]
1199
- if {$data(-multiple)} {
1200
- if {![string is list $f] || [llength $f] != 1} {
1201
- return -code break
1202
- }
1203
- set f [lindex $f 0]
1204
- }
1205
-
1206
- # Get list of matching filenames and dirnames
1207
- set files [if {[winfo class $w] eq "TkFDialog"} {
1208
- GlobFiltered $data(selectPath) {f b c l p s}
1209
- }]
1210
- set dirs2 {}
1211
- foreach d [GlobFiltered $data(selectPath) d] {lappend dirs2 $d/}
1212
-
1213
- set targets [concat \
1214
- [lsearch -glob -all -inline $files $f*] \
1215
- [lsearch -glob -all -inline $dirs2 $f*]]
1216
-
1217
- if {[llength $targets] == 1} {
1218
- # We have a winner!
1219
- set f [lindex $targets 0]
1220
- } elseif {$f in $targets || [llength $targets] == 0} {
1221
- if {[string length $f] > 0} {
1222
- bell
1223
- }
1224
- return
1225
- } elseif {[llength $targets] > 1} {
1226
- # Multiple possibles
1227
- if {[string length $f] == 0} {
1228
- return
1229
- }
1230
- set t0 [lindex $targets 0]
1231
- for {set len [string length $t0]} {$len>0} {} {
1232
- set allmatch 1
1233
- foreach s $targets {
1234
- if {![string equal -length $len $s $t0]} {
1235
- set allmatch 0
1236
- break
1237
- }
1238
- }
1239
- incr len -1
1240
- if {$allmatch} break
1241
- }
1242
- set f [string range $t0 0 $len]
1243
- }
1244
-
1245
- if {$data(-multiple)} {
1246
- set f [list $f]
1247
- }
1248
- $data(ent) delete 0 end
1249
- $data(ent) insert 0 $f
1250
- return -code break
1251
- }