Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
da75aa66
Commit
da75aa66
authored
Jul 17, 1995
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Various toolbox routines have gotten new names.
parent
42729b00
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
+15
-15
Mac/Lib/EasyDialogs.py
Mac/Lib/EasyDialogs.py
+12
-12
Mac/Lib/FrameWork.py
Mac/Lib/FrameWork.py
+3
-3
No files found.
Mac/Lib/EasyDialogs.py
View file @
da75aa66
...
@@ -9,7 +9,7 @@ This module uses DLOG resources 256, 257 and 258.
...
@@ -9,7 +9,7 @@ This module uses DLOG resources 256, 257 and 258.
Based upon STDWIN dialogs with the same names and functions.
Based upon STDWIN dialogs with the same names and functions.
"""
"""
from
Dlg
import
GetNewDialog
,
Set
IText
,
GetI
Text
,
ModalDialog
from
Dlg
import
GetNewDialog
,
Set
DialogItemText
,
GetDialogItem
Text
,
ModalDialog
def
Message
(
msg
):
def
Message
(
msg
):
...
@@ -25,8 +25,8 @@ def Message(msg):
...
@@ -25,8 +25,8 @@ def Message(msg):
if
not
d
:
if
not
d
:
print
"Can't get DLOG resource with id ="
,
id
print
"Can't get DLOG resource with id ="
,
id
return
return
tp
,
h
,
rect
=
d
.
GetDItem
(
2
)
tp
,
h
,
rect
=
d
.
GetD
ialog
Item
(
2
)
Set
I
Text
(
h
,
msg
)
Set
DialogItem
Text
(
h
,
msg
)
while
1
:
while
1
:
n
=
ModalDialog
(
None
)
n
=
ModalDialog
(
None
)
if
n
==
1
:
if
n
==
1
:
...
@@ -51,16 +51,16 @@ def AskString(prompt, default = ""):
...
@@ -51,16 +51,16 @@ def AskString(prompt, default = ""):
if
not
d
:
if
not
d
:
print
"Can't get DLOG resource with id ="
,
id
print
"Can't get DLOG resource with id ="
,
id
return
return
tp
,
h
,
rect
=
d
.
GetDItem
(
3
)
tp
,
h
,
rect
=
d
.
GetD
ialog
Item
(
3
)
Set
I
Text
(
h
,
prompt
)
Set
DialogItem
Text
(
h
,
prompt
)
tp
,
h
,
rect
=
d
.
GetDItem
(
4
)
tp
,
h
,
rect
=
d
.
GetD
ialog
Item
(
4
)
Set
I
Text
(
h
,
default
)
Set
DialogItem
Text
(
h
,
default
)
d
.
SelIText
(
4
,
0
,
255
)
# d.SetDialogItem
(4, 0, 255)
while
1
:
while
1
:
n
=
ModalDialog
(
None
)
n
=
ModalDialog
(
None
)
if
n
==
1
:
if
n
==
1
:
tp
,
h
,
rect
=
d
.
GetDItem
(
4
)
tp
,
h
,
rect
=
d
.
GetD
ialog
Item
(
4
)
return
Get
I
Text
(
h
)
return
Get
DialogItem
Text
(
h
)
if
n
==
2
:
return
None
if
n
==
2
:
return
None
...
@@ -88,8 +88,8 @@ def AskYesNoCancel(question, default = 0):
...
@@ -88,8 +88,8 @@ def AskYesNoCancel(question, default = 0):
# 3 = No
# 3 = No
# 4 = Cancel
# 4 = Cancel
# The question string is item 5
# The question string is item 5
tp
,
h
,
rect
=
d
.
GetDItem
(
5
)
tp
,
h
,
rect
=
d
.
GetD
ialog
Item
(
5
)
Set
I
Text
(
h
,
question
)
Set
DialogItem
Text
(
h
,
question
)
while
1
:
while
1
:
n
=
ModalDialog
(
None
)
n
=
ModalDialog
(
None
)
if
n
==
1
:
return
default
if
n
==
1
:
return
default
...
...
Mac/Lib/FrameWork.py
View file @
da75aa66
...
@@ -5,7 +5,7 @@ import MacOS
...
@@ -5,7 +5,7 @@ import MacOS
import
traceback
import
traceback
from
addpack
import
addpack
from
addpack
import
addpack
addpack
(
'
Demo
'
)
addpack
(
'
Tools
'
)
addpack
(
'bgen'
)
addpack
(
'bgen'
)
addpack
(
'ae'
)
addpack
(
'ae'
)
#addpack('ctl')
#addpack('ctl')
...
@@ -377,7 +377,7 @@ class Menu:
...
@@ -377,7 +377,7 @@ class Menu:
self
.
menu
.
AppendMenu
(
'x'
)
# add a dummy string
self
.
menu
.
AppendMenu
(
'x'
)
# add a dummy string
self
.
items
.
append
(
label
,
shortcut
,
callback
,
kind
)
self
.
items
.
append
(
label
,
shortcut
,
callback
,
kind
)
item
=
len
(
self
.
items
)
item
=
len
(
self
.
items
)
self
.
menu
.
Set
Item
(
item
,
label
)
# set the actual text
self
.
menu
.
Set
MenuItemText
(
item
,
label
)
# set the actual text
if
shortcut
:
if
shortcut
:
self
.
menu
.
SetItemCmd
(
item
,
ord
(
shortcut
))
self
.
menu
.
SetItemCmd
(
item
,
ord
(
shortcut
))
return
item
return
item
...
@@ -429,7 +429,7 @@ class AppleMenu(Menu):
...
@@ -429,7 +429,7 @@ class AppleMenu(Menu):
Menu
.
__init__
(
self
,
bar
,
"
\
024
"
)
Menu
.
__init__
(
self
,
bar
,
"
\
024
"
)
self
.
additem
(
abouttext
,
None
,
aboutcallback
)
self
.
additem
(
abouttext
,
None
,
aboutcallback
)
self
.
addseparator
()
self
.
addseparator
()
self
.
menu
.
A
d
dResMenu
(
'DRVR'
)
self
.
menu
.
A
ppen
dResMenu
(
'DRVR'
)
def
dispatch
(
self
,
id
,
item
,
window
,
event
):
def
dispatch
(
self
,
id
,
item
,
window
,
event
):
if
item
==
1
:
if
item
==
1
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment