Provide extra path for mucked cards image

Modified:
* Mucked.py

When running from outside source tree, the image containing mucked
cards' faces could not be loaded. Provide an extra path to load from.
This commit is contained in:
Mika Bostrom 2009-10-22 08:44:45 +03:00
parent 616c07a4eb
commit 6ec309a685
2 changed files with 7 additions and 2 deletions

View File

@ -63,7 +63,12 @@ class Aux_Window(object):
card_images = 53 * [0]
suits = ('s', 'h', 'd', 'c')
ranks = (14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2)
pb = gtk.gdk.pixbuf_new_from_file(self.config.execution_path(self.params['deck']))
deckimg = self.params['deck']
try:
pb = gtk.gdk.pixbuf_new_from_file(self.config.execution_path(deckimg))
except:
stockpath = '/usr/share/python-fpdb/' + deckimg
pb = gtk.gdk.pixbuf_new_from_file(stockpath)
for j in range(0, 13):
for i in range(0, 4):

View File

@ -19,6 +19,6 @@ setup(name = 'fpdb',
('/usr/share/applications',
['files/fpdb.desktop']),
('/usr/share/python-fpdb',
['pyfpdb/logging.conf'])
['pyfpdb/logging.conf', 'pyfpdb/Cards01.png'])
]
)