mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
Use the new macresource module to open the accompanying resource file (if needed).
This commit is contained in:
parent
a5d7da528b
commit
3c06b9a7d4
13 changed files with 37 additions and 102 deletions
|
|
@ -10,6 +10,7 @@ from Carbon import List
|
|||
import sys
|
||||
import struct
|
||||
from Carbon import Icn
|
||||
import macresource
|
||||
|
||||
#
|
||||
# Resource definitions
|
||||
|
|
@ -26,14 +27,7 @@ MAXWIDTH=320
|
|||
MAXHEIGHT=320
|
||||
|
||||
def main():
|
||||
try:
|
||||
dummy = Res.GetResource('DLOG', ID_MAIN)
|
||||
except Res.Error:
|
||||
try:
|
||||
Res.FSpOpenResFile("PICTbrowse.rsrc", 1)
|
||||
except Res.Error, arg:
|
||||
EasyDialogs.Message("Cannot open PICTbrowse.rsrc: "+arg[1])
|
||||
sys.exit(1)
|
||||
macresource.need('DLOG', ID_MAIN, "PICTbrowse.rsrc")
|
||||
ICONbrowse()
|
||||
|
||||
class ICONbrowse(FrameWork.Application):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue