Skip to content

Commit e123717

Browse files
author
Henry Rachootin
committed
changed how icons are loaded, may work better on linux/mac. Updated test file
1 parent 28b2662 commit e123717

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

src/mymedia.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@
9494
#with slight modification by Henry Rachootin
9595
import synth.pysynth_b as pysynth
9696
import turtle as tur
97-
import Queue
9897

9998
pyAudio = pyaudio.PyAudio() #should never change
10099
tk = Tkinter #alias
@@ -168,10 +167,12 @@ def _settupRoot_tk(condition):
168167
root.style.configure("TButton", padding = (0,3,0,3), font = ('Default',10))
169168
root.style.configure("TLabel", font = ('Default',10))
170169
try:
171-
root.iconbitmap(default=os.path.join(dirPath,"images","jesicon.ico"))
170+
img = Tkinter.Image("photo", file=os.path.join(dirPath,"images","jesicon.gif"))
171+
root.tk.call('wm', 'iconphoto', root._w, '-default', img)
172172
except:
173173
try:
174-
root.iconbitmap(default=os.path.join("images","jesicon.ico"))
174+
img = Tkinter.Image("photo", file=os.path.join("images","jesicon.gif"))
175+
root.tk.call('wm', 'iconphoto', root._w, '-default', img)
175176
except:
176177
print "cannot use icon"
177178
def notifyCondition():

src/test.py

+16-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,20 @@ def __getattr__(self, attr):
1616
picture = makeEmptyPicture(600,600)
1717

1818
show(picture)
19+
addText(picture,100,100,"test")
20+
repaint(picture)
21+
path = "C:/Users/Henry/Documents/LiClipse Workspace/jes/tests/test-sounds/moondog.Bird_sLament.wav"
22+
sound = makeSound(path)
23+
explore(sound)
24+
explore(picture)
25+
showInformation("info")
26+
showWarning("warning")
27+
showError("error")
28+
print pickAFile()
29+
print pickAFolder()
30+
print pickASaveFile()
31+
print requestString("string")
32+
print requestNumber("number")
33+
print requestInteger("integer")
34+
print requestIntegerInRange("range 1,12",1,12)
1935

20-
print "picture shown"

0 commit comments

Comments
 (0)