mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Fix py2 compatibility: wm_iconphoto does not exist in python2.7
This commit is contained in:
parent
e5e60d3232
commit
0d98da15e6
1 changed files with 4 additions and 1 deletions
|
@ -94,7 +94,10 @@ def base_init_root_window(root, app):
|
||||||
if TOOLKIT == 'tk':
|
if TOOLKIT == 'tk':
|
||||||
icons = [loadImage(img) for img in app.dataloader.findAllIconSizes()]
|
icons = [loadImage(img) for img in app.dataloader.findAllIconSizes()]
|
||||||
if icons:
|
if icons:
|
||||||
root.wm_iconphoto(True, *icons)
|
try:
|
||||||
|
root.wm_iconphoto(True, *icons)
|
||||||
|
except AttributeError:
|
||||||
|
root.tk.call('wm', 'iconphoto', root, '-default', *icons)
|
||||||
|
|
||||||
# set minsize
|
# set minsize
|
||||||
sw, sh = (root.winfo_screenwidth(), root.winfo_screenheight())
|
sw, sh = (root.winfo_screenwidth(), root.winfo_screenheight())
|
||||||
|
|
Loading…
Add table
Reference in a new issue