Added prompts to various file-select dialogs

Renumbered resources to above 512
This commit is contained in:
Jack Jansen 1995-08-14 12:21:12 +00:00
parent ad169272fb
commit 9062fa2fb5
7 changed files with 31 additions and 35 deletions

View File

@ -57,7 +57,7 @@ def main():
# Ask for source text if not specified in sys.argv[1:] # Ask for source text if not specified in sys.argv[1:]
if not sys.argv[1:]: if not sys.argv[1:]:
srcfss, ok = macfs.StandardGetFile('TEXT') srcfss, ok = macfs.PromptGetFile('Select Python source file:', 'TEXT')
if not ok: if not ok:
return return
filename = srcfss.as_pathname() filename = srcfss.as_pathname()

View File

@ -18,7 +18,7 @@ import Res # For Res.Error
# resource IDs in our own resources (dialogs, etc) # resource IDs in our own resources (dialogs, etc)
MESSAGE_ID = 256 MESSAGE_ID = 256
DIALOG_ID = 131 DIALOG_ID = 512
TEXT_ITEM = 1 TEXT_ITEM = 1
OK_ITEM = 2 OK_ITEM = 2
CANCEL_ITEM = 3 CANCEL_ITEM = 3
@ -85,7 +85,7 @@ def interact(list, pythondir):
if n == REVERT_ITEM: if n == REVERT_ITEM:
return [], pythondir return [], pythondir
if n == DIR_ITEM: if n == DIR_ITEM:
fss, ok = macfs.GetDirectory() fss, ok = macfs.GetDirectory('Select python home folder:')
if ok: if ok:
pythondir = fss pythondir = fss
tmp = string.splitfields(GetDialogItemText(h), '\r') tmp = string.splitfields(GetDialogItemText(h), '\r')

View File

@ -1,9 +1,9 @@
(This file may be decompressed with BinHex 4.0) (This file may be decompressed with BinHex 4.0)
:&%9NDA43HA4SEfj3FQ9QFbjbFh*M!(*cFQ058d9%!3#3"``k1UJ!N!3"!!!!#ad! :&%9NDA43HA4SEfj3FQ9QFbjbFh*M!(*cFQ058d9%!3#3"`a'KE-!N!3"!!!!#bN!
!!SG!!!"(6B8)&3JD!!8)&"p%E"S%3!k!@FQ%Lm-6VS#$!`k!&Tj&%9NDA43HA4S !!ST!!!"(6B8)&3JD!!8)&"p%E"S%3!k!@FQ%Lm-6VS#$!`k!&Tj&%9NDA43HA4S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!$#8&P8C!!!!-j%6%p(!!!!fN4*9%`! Fb-!!!#5D@0X1!!!!*jTBh-i!!!!UQPMFc3!!!#fD@0X0!!!!-*3@94N!!!!cN4-
!!$Q!)$rr`!!!4d!N!3",2rr!*!)rj!%!!!""!#3"B$rr`!!!4)!N!3",2rr!!!" 6dF!!!$D4%P86!!!!1B!J2rr!!!"(3#3"!%Xrrm!N!MrN!3!!!%%!*!&J2rr!!!"
23#3"!%Xrrm!!!'"!0Ij,!%Xrrm!!!@&!0Ii1!%Xrrm!!!D*!0IkG!%Xrrm!!!F0 %J#3"!%Xrrm!!!%p!*!%!5crr`!!!B%!N!3",2rr!!!&K3#3"!%Xrrm!!!D*!*!%
!0IE8!#3"JN4!*!&Jrrr!!!*&J#3"B$rr`!!#5m!N!316hGZCA)JFQ9cEh9bBf@M !5crr`!!"`d!N!S*%3#3"!)!rrm!!!N@!-f6G!)!rrm!!!N[!-f8N!!16hGZCA)J
b`: FQ9cEh9bBfAP)!:

View File

@ -77,14 +77,10 @@ def handlesubdir(handle, id, srcdir):
if __name__ == '__main__': if __name__ == '__main__':
args = sys.argv[1:] args = sys.argv[1:]
if not args: if not args:
ifss, ok = macfs.StandardGetFile('PYC ') ifss, ok = macfs.GetDirectory('Select root of tree to pack:')
if ok: if not ok:
args = [ifss.as_pathname()] sys.exit(0)
else: args = [ifss.as_pathname()]
ifss, ok = macfs.GetDirectory()
if not ok:
sys.exit(0)
args = [ifss.as_pathname()]
for ifn in args: for ifn in args:
ofss, ok = macfs.StandardPutFile('Output for '+os.path.split(ifn)[1]) ofss, ok = macfs.StandardPutFile('Output for '+os.path.split(ifn)[1])
if not ok: if not ok:

View File

@ -9,7 +9,7 @@ import string
import Dlg import Dlg
import macfs import macfs
DIALOG_ID = 140 DIALOG_ID = 512
OK = 1 OK = 1
CANCEL = 2 CANCEL = 2
SCRIPTNAME=3 SCRIPTNAME=3

View File

@ -2,7 +2,7 @@
:%9*eENaTBP0MFQP`G#jbFh*M!(*cFQ058d9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$TP!*!&L3!+!*N!QiJ5GfpbDfPZCb"NDA*PBh4[FRNk!*!&"J"&!"B" "h0dC'peG$TP!*!&L3!+!*N!QiJ5GfpbDfPZCb"NDA*PBh4[FRNk!*!&"J"&!"B"
6)JM8R9Z)'%JF(PdD'pZ)'e[C(9XC5"KFb"YB@PZ)("bEfGbB@d!!!!"!!!!#m8! 6)JM8R9Z)'%JF(PdD'pZ)'e[C(9XC5"KFb"YB@PZ)("bEfGbB@d!!!!"!!!!#m8!
!!V&!!!"(3$Aqp35AJ!!!"`"$J!,3Nj%6!!!!'**3diM!!!!EP0*@N8!!!"k4P*& !!V&!!!"(3$0Nh!44!!!!"`"$J!,3Nj%6!!!!'**3diM!!!!EP0*@N8!!!"k4P*&
4J!!!)CTBh-M!!!!NQPME$J!!!#HD@0c1!!!!+TTBh-d!!!!YQPME$3!!!$#8&P8 4J!!!)CTBh-M!!!!NQPME$J!!!#HD@0c1!!!!+TTBh-d!!!!YQPME$3!!!$#8&P8
C3!!!-j%6%p(!!!!fN4*9%`!!!$Q!)$rr`!!!4d!N!3",2rr!*!)rj!%!!!""!#3 C3!!!-j%6%p(!!!!fN4*9%`!!!$Q!)$rr`!!!4d!N!3",2rr!*!)rj!%!!!""!#3
"B$rr`!!!4)!N!3",2rr!!!"23#3"!%Xrrm!!!'"!*!%!5crr`!!"B8!N!3",2rr "B$rr`!!!4)!N!3",2rr!!!"23#3"!%Xrrm!!!'"!*!%!5crr`!!"B8!N!3",2rr
!!!'L3#3"!%Xrrm!!!F0!*!+#4%!N!@-rrm!!!N@!*!&J2rr!!!*,`$AqR316hGZ !!!'L3#3"!%Xrrm!!!F0!*!+#4%!N!3#!2rr!!!*&J$0P-`#!2rr!!!*,`$0Nq!1
CA)JFQ9cEh9bBf@X%!: 6hGZCA)JFQ9cEh9bBfA2"!:

View File

@ -39,7 +39,7 @@ def walktree(name, change):
walktree(os.path.join(name, f), change) walktree(os.path.join(name, f), change)
def run(change): def run(change):
fss, ok = macfs.GetDirectory() fss, ok = macfs.GetDirectory('Folder to search:')
if not ok: if not ok:
sys.exit(0) sys.exit(0)
walktree(fss.as_pathname(), change) walktree(fss.as_pathname(), change)