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:
+6
-1
@@ -63,7 +63,12 @@ class Aux_Window(object):
|
|||||||
card_images = 53 * [0]
|
card_images = 53 * [0]
|
||||||
suits = ('s', 'h', 'd', 'c')
|
suits = ('s', 'h', 'd', 'c')
|
||||||
ranks = (14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2)
|
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 j in range(0, 13):
|
||||||
for i in range(0, 4):
|
for i in range(0, 4):
|
||||||
|
|||||||
@@ -19,6 +19,6 @@ setup(name = 'fpdb',
|
|||||||
('/usr/share/applications',
|
('/usr/share/applications',
|
||||||
['files/fpdb.desktop']),
|
['files/fpdb.desktop']),
|
||||||
('/usr/share/python-fpdb',
|
('/usr/share/python-fpdb',
|
||||||
['pyfpdb/logging.conf'])
|
['pyfpdb/logging.conf', 'pyfpdb/Cards01.png'])
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user