fixed issue: loading under linux

Window icon was causing issues, so I made it optional.
This commit is contained in:
Alan Mason 2012-09-28 03:52:05 -06:00
parent ea511fbdf8
commit 5ea7025ff4
2 changed files with 912 additions and 906 deletions

View file

@ -4,16 +4,16 @@ The Burning Wheel game system.
Main Features:
Shows intermediate distillations
Allows for up to 14 facets
Allows for up to 10 of any sigils*
Allows for up to 10 of any of the sigils* (except 'Cap')
Optional 'Advanced Limiting' to help keep the spell 'legal'
Warns you if the spell is incomplete or house-ruled
If the spell is damaging, it will display the weapon stats
* 'Advanced Limiting' will limit the amount of some sigils
* Obviously the Cap Sigil is either on or off
Requirements:
Python 3.x or greater (tested on Python 3.2.3 32/64bit)
Should work on Windows, MacOS X, & Linux (tested on Windows 7/XP, and Ubuntu)
To Do:
save/load spells

View file

@ -1,7 +1,7 @@
# Burning Wheel - Spell Burner
# By 2Shirt (Alan Mason)
#
# Version 1.0
# Version 1.1
from tkinter import *
from tkinter import ttk
from math import ceil, floor, log
@ -917,7 +917,7 @@ class App(ttk.Frame):
menubar.add_cascade(menu=menu_file, label='File')
menubar.add_cascade(menu=menu_settings, label='Settings')
menu_file.add_command(label='New', command=self.reset)
# menu_file.add_command(label='Open...')
#menu_file.add_command(label='Open...')
menu_file.add_command(label='Close', command=quit)
menu_settings.add_checkbutton(label='Advanced Limiting',
variable=self.advanceLimits, onvalue=True, offvalue=False,
@ -948,7 +948,13 @@ class App(ttk.Frame):
root = Tk()
root.title('Spell Burner')
root.iconbitmap("SpellBurner.ico")
if root.tk.call('tk', 'windowingsystem') == 'win32':
# Enable icon only under windows
# ToDo: fix for Linux/MacOS X
try:
root.iconbitmap("SpellBurner.ico")
except TclError:
pass
#root.resizable(0, 0) # disable window resizing
root.resizable(width=FALSE, height=FALSE) # disable window resizing
root.option_add('*tearOff', FALSE)