Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
e4b4038c
Kaydet (Commit)
e4b4038c
authored
Tem 17, 1995
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Various toolbox routines have gotten new names.
üst
bc608646
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
+15
-15
EasyDialogs.py
Mac/Lib/EasyDialogs.py
+12
-12
FrameWork.py
Mac/Lib/FrameWork.py
+3
-3
No files found.
Mac/Lib/EasyDialogs.py
Dosyayı görüntüle @
e4b4038c
...
@@ -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
Dosyayı görüntüle @
e4b4038c
...
@@ -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