[Spambayes-checkins] spambayes/Outlook2000/dialogs/resources
__init__.py, 1.3, 1.4
Mark Hammond
mhammond at users.sourceforge.net
Mon Sep 15 02:27:11 EDT 2003
Update of /cvsroot/spambayes/spambayes/Outlook2000/dialogs/resources
In directory sc8-pr-cvs1:/tmp/cvs-serv461/resources
Modified Files:
__init__.py
Log Message:
Load dialog bitmaps directly from the executable in binary builds.
Index: __init__.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/resources/__init__.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** __init__.py 5 Sep 2003 06:53:24 -0000 1.3
--- __init__.py 15 Sep 2003 06:27:09 -0000 1.4
***************
*** 6,9 ****
--- 6,10 ----
if type(bmpid)==type(0):
bmpid = rc_parser.names[bmpid]
+ int_bmpid = rc_parser.ids[bmpid]
# For both binary and source versions, we currently load from files.
# In future py2exe built binary versions we will be able to load the
***************
*** 11,22 ****
filename = rc_parser.bitmaps[bmpid]
if hasattr(sys, "frozen"):
! # bitmap in the app/images directory
! # dont have manager available :(
! dll_filename = win32api.GetModuleFileName(sys.frozendllhandle)
! app_dir = os.path.dirname(dll_filename)
! filename = os.path.join(app_dir, "images", filename)
else:
if not os.path.isabs(filename):
# In this directory
filename = os.path.join( os.path.dirname( __file__ ), filename)
! return 0, filename, win32con.LR_LOADFROMFILE
--- 12,26 ----
filename = rc_parser.bitmaps[bmpid]
if hasattr(sys, "frozen"):
! # in our .exe/.dll - load from that.
! if sys.frozen=="dll":
! hmod = sys.frozendllhandle
! else:
! hmod = win32api.GetModuleHandle(None)
! return hmod, int_bmpid, 0
else:
+ # source code - load the .bmp directly.
if not os.path.isabs(filename):
# In this directory
filename = os.path.join( os.path.dirname( __file__ ), filename)
! return 0, filename, win32con.LR_LOADFROMFILE
! assert 0, "not reached"
More information about the Spambayes-checkins
mailing list