summaryrefslogtreecommitdiffstats
path: root/Mac/Tools/IDE/PythonIDEMain.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Tools/IDE/PythonIDEMain.py')
-rw-r--r--Mac/Tools/IDE/PythonIDEMain.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/Mac/Tools/IDE/PythonIDEMain.py b/Mac/Tools/IDE/PythonIDEMain.py
index 36ea339..5b9376b 100644
--- a/Mac/Tools/IDE/PythonIDEMain.py
+++ b/Mac/Tools/IDE/PythonIDEMain.py
@@ -9,6 +9,7 @@ import os
import sys
import macfs
import MacOS
+import EasyDialogs
if MacOS.runtimemodel == 'macho':
ELIPSES = '...'
@@ -189,8 +190,9 @@ class PythonIDE(Wapplication.Application):
Splash.about()
def do_setscriptsfolder(self, *args):
- fss, ok = macfs.GetDirectory("Select Scripts Folder")
- if ok:
+ fss = EasyDialogs.AskFolder(message="Select Scripts Folder",
+ wanted=macfs.FSSpec)
+ if fss:
prefs = self.getprefs()
alis = fss.NewAlias()
prefs.scriptsfolder = alis.data
@@ -204,9 +206,9 @@ class PythonIDE(Wapplication.Application):
ModuleBrowser.ModuleBrowser()
def domenu_open(self, *args):
- fss, ok = macfs.StandardGetFile("TEXT")
- if ok:
- self.openscript(fss.as_pathname())
+ filename = EasyDialogs.AskFileForOpen(typeList=("TEXT",))
+ if filename:
+ self.openscript(filename)
def domenu_new(self, *args):
W.SetCursor('watch')
@@ -344,7 +346,6 @@ class PythonIDE(Wapplication.Application):
# This is a cop-out. We should have disabled the menus
# if there is no selection, but the can_ methods only seem
# to work for Windows. Or not for the Help menu, maybe?
- import EasyDialogs
text = EasyDialogs.AskString("Search documentation for", ok="Search")
return text
inenumbers'>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Copyright by the Board of Trustees of the University of Illinois.         *
 * All rights reserved.                                                      *
 *                                                                           *
 * This file is part of HDF5.  The full HDF5 copyright notice, including     *
 * terms governing use, modification, and redistribution, is contained in    *
 * the files COPYING and Copyright.html.  COPYING can be found at the root   *
 * of the source code distribution tree; Copyright.html can be found at the  *
 * root level of an installed copy of the electronic HDF5 document set and   *
 * is linked from the top-level documents page.  It can also be found at     *
 * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html.  If you do not have     *
 * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/*-------------------------------------------------------------------------
 *
 * Created:		H5FLprivate.h
 *			Mar 23 2000
 *			Quincey Koziol <koziol@ncsa.uiuc.edu>
 *
 * Purpose:		Private non-prototype header.
 *
 * Modifications:
 *
 *-------------------------------------------------------------------------
 */
#ifndef _H5FLprivate_H
#define _H5FLprivate_H

/* Public headers needed by this file */
#ifdef LATER
#include "H5FLpublic.h"		/*API prototypes			     */
#endif /* LATER */

/* Private headers needed by this file */

/* Macros for turning off free lists in the library */
/* #define H5_NO_FREE_LISTS */
#ifdef H5_NO_FREE_LISTS
#define H5_NO_REG_FREE_LISTS
#define H5_NO_ARR_FREE_LISTS
#define H5_NO_BLK_FREE_LISTS
#endif /* H5_NO_FREE_LISTS */

/*
 * Private datatypes.
 */

/* Data structure to store each block in free list */
typedef struct H5FL_reg_node_t {
    struct H5FL_reg_node_t *next;   /* Pointer to next block in free list */
} H5FL_reg_node_t;

/* Data structure for free list of blocks */
typedef struct H5FL_reg_head_t {
    unsigned init;         /* Whether the free list has been initialized */
    unsigned allocated;    /* Number of blocks allocated */
    unsigned onlist;       /* Number of blocks on free list */
    size_t list_mem;    /* Amount of memory on free list */
    const char *name;   /* Name of the type */
    size_t size;        /* Size of the blocks in the list */
    H5FL_reg_node_t *list;  /* List of free blocks */
} H5FL_reg_head_t;

/*
 * Macros for defining & using free lists for a type
 */
#define H5FL_REG_NAME(t)        H5_##t##_reg_free_list
#ifndef H5_NO_REG_FREE_LISTS
/* Common macros for H5FL_DEFINE & H5FL_DEFINE_STATIC */
#define H5FL_DEFINE_COMMON(t) H5FL_reg_head_t H5FL_REG_NAME(t)={0,0,0,0,#t,sizeof(t),NULL}

/* Declare a free list to manage objects of type 't' */
#define H5FL_DEFINE(t)  H5_DLL H5FL_DEFINE_COMMON(t)

/* Reference a free list for type 't' defined in another file */
#define H5FL_EXTERN(t)  extern H5_DLL H5FL_reg_head_t H5FL_REG_NAME(t)