/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/UI/resource.py
ViewVC logotype

Contents of /branches/WIP-pyshapelib-bramz/Thuban/UI/resource.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2700 - (show annotations)
Mon Sep 18 14:27:02 2006 UTC (18 years, 5 months ago) by dpinte
Original Path: trunk/thuban/Thuban/UI/resource.py
File MIME type: text/x-python
File size: 787 byte(s)
2006-09-18 Didrik Pinte <dpinte@itae.be>
    
        * wxPython 2.6 update : wx 2.4 syntax has been updated to 2.6


1 # Copyright (c) 2003 by Intevation GmbH
2 # Authors:
3 # Jonathan Coles <[email protected]>
4 #
5 # This program is free software under the GPL (>=v2)
6 # Read the file COPYING coming with Thuban for details.
7
8 """Acess to UI-related resources"""
9
10 __version__ = "$Revision$"
11 # $Source$
12 # $Id$
13
14
15 import os
16 import Thuban
17
18 import wx
19
20
21 bitmapdir = os.path.join(Thuban.__path__[0], os.pardir, "Resources", "Bitmaps")
22 bitmap_extensions = {wx.BITMAP_TYPE_XPM: ".xpm",
23 wx.BITMAP_TYPE_ANY: ""}
24
25 def GetBitmapResource(file, type):
26 filename = os.path.join(bitmapdir, file) + bitmap_extensions[type]
27 return wx.Bitmap(filename, type)
28
29 def GetImageResource(file, type):
30 filename = os.path.join(bitmapdir, file) + bitmap_extensions[type]
31 return wx.Image(filename, type)
32

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26