Merge lp:~lfaraone/ubuntu/lucid/python-gasp/lp419501 into lp:ubuntu/lucid/python-gasp
- Lucid (10.04)
- lp419501
- Merge into lucid
Proposed by
Luke Faraone
Status: | Merged |
---|---|
Merged at revision: | 6 |
Proposed branch: | lp:~lfaraone/ubuntu/lucid/python-gasp/lp419501 |
Merge into: | lp:ubuntu/lucid/python-gasp |
Diff against target: |
346 lines (+173/-58) 12 files modified
MANIFEST.in (+3/-0) NEWS (+14/-0) PKG-INFO (+24/-0) debian/changelog (+6/-0) gasp.egg-info/PKG-INFO (+24/-0) gasp.egg-info/SOURCES.txt (+20/-0) gasp.egg-info/dependency_links.txt (+1/-0) gasp.egg-info/requires.txt (+4/-0) gasp.egg-info/top_level.txt (+1/-0) gasp/backend.py (+70/-57) setup.cfg (+5/-0) setup.py (+1/-1) |
To merge this branch: | bzr merge lp:~lfaraone/ubuntu/lucid/python-gasp/lp419501 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Development Team | Pending | ||
Review via email: mp+21242@code.launchpad.net |
Commit message
Description of the change
New upstream bugfix release.
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added file 'MANIFEST.in' | |||
2 | --- MANIFEST.in 1970-01-01 00:00:00 +0000 | |||
3 | +++ MANIFEST.in 2010-03-12 14:32:20 +0000 | |||
4 | @@ -0,0 +1,3 @@ | |||
5 | 1 | include AUTHORS COPYING NEWS | ||
6 | 2 | recursive-include tests *.txt *.py | ||
7 | 3 | recursive-include gasp/images *.png | ||
8 | 0 | 4 | ||
9 | === modified file 'NEWS' | |||
10 | --- NEWS 2009-08-21 06:07:16 +0000 | |||
11 | +++ NEWS 2010-03-12 14:32:20 +0000 | |||
12 | @@ -1,3 +1,17 @@ | |||
13 | 1 | python-gasp (0.3.3) stable; urgency=low | ||
14 | 2 | |||
15 | 3 | * Work around xlib threadinb bug (LP: #41950) | ||
16 | 4 | * Correctly handle pressed keys (LP: #533413) | ||
17 | 5 | |||
18 | 6 | -- Luke Faraone <luke@faraone.cc> Mon, 08 Mar 2010 23:07:06 -0500 | ||
19 | 7 | |||
20 | 8 | python-gasp (0.3.2~win32-1) stable; urgency=low | ||
21 | 9 | |||
22 | 10 | * Import gobject.GError instead of glib.GError on Windows or when glib is | ||
23 | 11 | unavailable. (NO CHANGE ON OTHER PLATFORMS) | ||
24 | 12 | |||
25 | 13 | -- Luke Faraone <luke@faraone.cc> Fri, 28 Aug 2009 16:29:41 -0400 | ||
26 | 14 | |||
27 | 1 | python-gasp (0.3.2) stable; urgency=low | 15 | python-gasp (0.3.2) stable; urgency=low |
28 | 2 | 16 | ||
29 | 3 | * No longer raise an exception when removing an object not on the screen, | 17 | * No longer raise an exception when removing an object not on the screen, |
30 | 4 | 18 | ||
31 | === added file 'PKG-INFO' | |||
32 | --- PKG-INFO 1970-01-01 00:00:00 +0000 | |||
33 | +++ PKG-INFO 2010-03-12 14:32:20 +0000 | |||
34 | @@ -0,0 +1,24 @@ | |||
35 | 1 | Metadata-Version: 1.0 | ||
36 | 2 | Name: gasp | ||
37 | 3 | Version: 0.3.3 | ||
38 | 4 | Summary: GASP provides a simple, procedural graphics API for beginning students using Python | ||
39 | 5 | Home-page: http://wiki.laptop.org/go/GASP | ||
40 | 6 | Author: Luke Faraone | ||
41 | 7 | Author-email: luke@faraoane.cc | ||
42 | 8 | License: GPLv3+ | ||
43 | 9 | Download-URL: https://launchpad.net/gasp-code/+download | ||
44 | 10 | Description: UNKNOWN | ||
45 | 11 | Keywords: gasp | ||
46 | 12 | Platform: UNKNOWN | ||
47 | 13 | Classifier: Development Status :: 4 - Beta | ||
48 | 14 | Classifier: Environment :: X11 Applications :: GTK | ||
49 | 15 | Classifier: Environment :: Win32 (MS Windows) | ||
50 | 16 | Classifier: Intended Audience :: Education | ||
51 | 17 | Classifier: License :: OSI Approved :: GNU General Public License (GPL) | ||
52 | 18 | Classifier: Programming Language :: Python | ||
53 | 19 | Classifier: Natural Language :: English | ||
54 | 20 | Classifier: Operating System :: OS Independent | ||
55 | 21 | Classifier: Topic :: Education :: Computer Aided Instruction (CAI) | ||
56 | 22 | Classifier: Topic :: Multimedia :: Graphics | ||
57 | 23 | Classifier: Topic :: Software Development :: Libraries :: Python Modules | ||
58 | 24 | Classifier: Topic :: Software Development :: User Interfaces | ||
59 | 0 | 25 | ||
60 | === modified file 'debian/changelog' | |||
61 | --- debian/changelog 2009-11-10 20:15:49 +0000 | |||
62 | +++ debian/changelog 2010-03-12 14:32:20 +0000 | |||
63 | @@ -1,3 +1,9 @@ | |||
64 | 1 | python-gasp (0.3.3-0ubuntu1) lucid; urgency=low | ||
65 | 2 | |||
66 | 3 | * New upstream release. (LP: #419501) | ||
67 | 4 | |||
68 | 5 | -- Luke Faraone <luke@faraone.cc> Fri, 12 Mar 2010 09:19:17 -0500 | ||
69 | 6 | |||
70 | 1 | python-gasp (0.3.2-1ubuntu1) lucid; urgency=low | 7 | python-gasp (0.3.2-1ubuntu1) lucid; urgency=low |
71 | 2 | 8 | ||
72 | 3 | * Drop dependency on python-multiprocessing, multiprocessing module | 9 | * Drop dependency on python-multiprocessing, multiprocessing module |
73 | 4 | 10 | ||
74 | === added directory 'gasp.egg-info' | |||
75 | === added file 'gasp.egg-info/PKG-INFO' | |||
76 | --- gasp.egg-info/PKG-INFO 1970-01-01 00:00:00 +0000 | |||
77 | +++ gasp.egg-info/PKG-INFO 2010-03-12 14:32:20 +0000 | |||
78 | @@ -0,0 +1,24 @@ | |||
79 | 1 | Metadata-Version: 1.0 | ||
80 | 2 | Name: gasp | ||
81 | 3 | Version: 0.3.3 | ||
82 | 4 | Summary: GASP provides a simple, procedural graphics API for beginning students using Python | ||
83 | 5 | Home-page: http://wiki.laptop.org/go/GASP | ||
84 | 6 | Author: Luke Faraone | ||
85 | 7 | Author-email: luke@faraoane.cc | ||
86 | 8 | License: GPLv3+ | ||
87 | 9 | Download-URL: https://launchpad.net/gasp-code/+download | ||
88 | 10 | Description: UNKNOWN | ||
89 | 11 | Keywords: gasp | ||
90 | 12 | Platform: UNKNOWN | ||
91 | 13 | Classifier: Development Status :: 4 - Beta | ||
92 | 14 | Classifier: Environment :: X11 Applications :: GTK | ||
93 | 15 | Classifier: Environment :: Win32 (MS Windows) | ||
94 | 16 | Classifier: Intended Audience :: Education | ||
95 | 17 | Classifier: License :: OSI Approved :: GNU General Public License (GPL) | ||
96 | 18 | Classifier: Programming Language :: Python | ||
97 | 19 | Classifier: Natural Language :: English | ||
98 | 20 | Classifier: Operating System :: OS Independent | ||
99 | 21 | Classifier: Topic :: Education :: Computer Aided Instruction (CAI) | ||
100 | 22 | Classifier: Topic :: Multimedia :: Graphics | ||
101 | 23 | Classifier: Topic :: Software Development :: Libraries :: Python Modules | ||
102 | 24 | Classifier: Topic :: Software Development :: User Interfaces | ||
103 | 0 | 25 | ||
104 | === added file 'gasp.egg-info/SOURCES.txt' | |||
105 | --- gasp.egg-info/SOURCES.txt 1970-01-01 00:00:00 +0000 | |||
106 | +++ gasp.egg-info/SOURCES.txt 2010-03-12 14:32:20 +0000 | |||
107 | @@ -0,0 +1,20 @@ | |||
108 | 1 | AUTHORS | ||
109 | 2 | COPYING | ||
110 | 3 | MANIFEST.in | ||
111 | 4 | NEWS | ||
112 | 5 | README | ||
113 | 6 | setup.py | ||
114 | 7 | gasp/__init__.py | ||
115 | 8 | gasp/api.py | ||
116 | 9 | gasp/backend.py | ||
117 | 10 | gasp/color.py | ||
118 | 11 | gasp.egg-info/PKG-INFO | ||
119 | 12 | gasp.egg-info/SOURCES.txt | ||
120 | 13 | gasp.egg-info/dependency_links.txt | ||
121 | 14 | gasp.egg-info/requires.txt | ||
122 | 15 | gasp.egg-info/top_level.txt | ||
123 | 16 | gasp/images/gasp.png | ||
124 | 17 | tests/mockbackends.py | ||
125 | 18 | tests/run.py | ||
126 | 19 | tests/test_api.txt | ||
127 | 20 | tests/test_backend.txt | ||
128 | 0 | \ No newline at end of file | 21 | \ No newline at end of file |
129 | 1 | 22 | ||
130 | === added file 'gasp.egg-info/dependency_links.txt' | |||
131 | --- gasp.egg-info/dependency_links.txt 1970-01-01 00:00:00 +0000 | |||
132 | +++ gasp.egg-info/dependency_links.txt 2010-03-12 14:32:20 +0000 | |||
133 | @@ -0,0 +1,1 @@ | |||
134 | 1 | |||
135 | 0 | 2 | ||
136 | === added file 'gasp.egg-info/requires.txt' | |||
137 | --- gasp.egg-info/requires.txt 1970-01-01 00:00:00 +0000 | |||
138 | +++ gasp.egg-info/requires.txt 2010-03-12 14:32:20 +0000 | |||
139 | @@ -0,0 +1,4 @@ | |||
140 | 1 | setuptools | ||
141 | 2 | pycairo >= 1.4 | ||
142 | 3 | pygobject | ||
143 | 4 | pygtk >= 2.0 | ||
144 | 0 | \ No newline at end of file | 5 | \ No newline at end of file |
145 | 1 | 6 | ||
146 | === added file 'gasp.egg-info/top_level.txt' | |||
147 | --- gasp.egg-info/top_level.txt 1970-01-01 00:00:00 +0000 | |||
148 | +++ gasp.egg-info/top_level.txt 2010-03-12 14:32:20 +0000 | |||
149 | @@ -0,0 +1,1 @@ | |||
150 | 1 | gasp | ||
151 | 0 | 2 | ||
152 | === modified file 'gasp/backend.py' | |||
153 | --- gasp/backend.py 2009-08-21 06:07:16 +0000 | |||
154 | +++ gasp/backend.py 2010-03-12 14:32:20 +0000 | |||
155 | @@ -21,14 +21,25 @@ | |||
156 | 21 | import sys | 21 | import sys |
157 | 22 | import math | 22 | import math |
158 | 23 | import multiprocessing | 23 | import multiprocessing |
160 | 24 | import threading | 24 | #import threading |
161 | 25 | 25 | ||
162 | 26 | import cairo | 26 | import cairo |
163 | 27 | import gobject | 27 | import gobject |
164 | 28 | import time | 28 | import time |
168 | 29 | import gtk | 29 | |
169 | 30 | 30 | ||
170 | 31 | from glib import GError | 31 | try: |
171 | 32 | from glib import GError | ||
172 | 33 | except ImportError: | ||
173 | 34 | # must be on windows, then | ||
174 | 35 | print '[DBG]: On Windows' | ||
175 | 36 | try: | ||
176 | 37 | from gobject import GError | ||
177 | 38 | except ImportError: | ||
178 | 39 | # TODO: we *should* display a warning | ||
179 | 40 | # worst case now you'll get a traceback | ||
180 | 41 | print '[DBG]: No GError in gobject!' | ||
181 | 42 | GError = None | ||
182 | 32 | 43 | ||
183 | 33 | # diffrent update_when values | 44 | # diffrent update_when values |
184 | 34 | NOTHING = "Nothing" | 45 | NOTHING = "Nothing" |
185 | @@ -63,69 +74,33 @@ | |||
186 | 63 | #create the screen obj | 74 | #create the screen obj |
187 | 64 | screen = screen_obj | 75 | screen = screen_obj |
188 | 65 | 76 | ||
189 | 66 | #create the window and set its size and title | ||
190 | 67 | screen.window = gtk.Window() | ||
191 | 68 | screen.window.set_title(screen.title) | ||
192 | 69 | screen.window.set_default_size(screen.width, screen.height) | ||
193 | 70 | screen.window.set_resizable(False) | ||
194 | 71 | |||
195 | 72 | #create the drawing area | ||
196 | 73 | screen.drawing_area = gtk.DrawingArea() | ||
197 | 74 | screen.window.add(screen.drawing_area) | ||
198 | 75 | screen.drawing_area.set_size_request(screen.width,screen.height) | ||
199 | 76 | screen.drawing_area.show() | ||
200 | 77 | |||
201 | 78 | screen.frame_rate = 40 | ||
202 | 79 | screen.last_tick = time.time() | ||
203 | 80 | |||
204 | 81 | #set up the event handling | ||
205 | 82 | screen.drawing_area.set_events( gtk.gdk.EXPOSURE_MASK | ||
206 | 83 | | gtk.gdk.BUTTON1_MOTION_MASK | ||
207 | 84 | | gtk.gdk.BUTTON_PRESS_MASK | ||
208 | 85 | | gtk.gdk.BUTTON_RELEASE_MASK | ||
209 | 86 | | gtk.gdk.POINTER_MOTION_MASK | ||
210 | 87 | | gtk.gdk.POINTER_MOTION_HINT_MASK) | ||
211 | 88 | screen.drawing_area.connect("motion_notify_event", mouse_move) | ||
212 | 89 | screen.drawing_area.connect('button-press-event', mouse_press) | ||
213 | 90 | screen.drawing_area.connect('button-release-event', mouse_release) | ||
214 | 91 | screen.window.connect("key-press-event",key_pressed) | ||
215 | 92 | screen.window.connect("key-release-event",key_released) | ||
216 | 93 | screen.window.connect('delete-event', quit) | ||
217 | 94 | screen.keys_pressed = [] | 77 | screen.keys_pressed = [] |
218 | 95 | screen.mouse_pos = (-1,-1) | 78 | screen.mouse_pos = (-1,-1) |
219 | 96 | screen.mouse_state = {"left":0,"middle":0,"right":0} | 79 | screen.mouse_state = {"left":0,"middle":0,"right":0} |
220 | 97 | screen.mouse_buttons = ["left","middle","right"] | 80 | screen.mouse_buttons = ["left","middle","right"] |
233 | 98 | 81 | screen.screenshot = False | |
234 | 99 | #set the window icon and show the window | 82 | screen.filename = "" |
235 | 100 | pic = os.path.join(os.path.join(os.path.dirname(os.path.abspath(__file__)),"images"),"gasp.png") | 83 | screen.update_when = NOTHING |
236 | 101 | try: | 84 | |
237 | 102 | screen.window.set_icon_from_file(pic) | 85 | screen.sprites = 0 |
238 | 103 | except GError, e: # in case the file is not found | 86 | |
239 | 104 | print "Warning: " + e.message | 87 | screen.text_entry = None |
240 | 105 | screen.window.show() | 88 | screen.frame_rate = 40 |
241 | 106 | 89 | screen.last_tick = time.time() | |
242 | 107 | #create the buffer to draw to | 90 | |
243 | 108 | screen.buffer = gtk.gdk.Pixmap(screen.drawing_area.window, screen.width, screen.height) | 91 | |
232 | 109 | screen.gc = gtk.gdk.GC(screen.buffer) | ||
244 | 110 | screen.objects = [] | 92 | screen.objects = [] |
245 | 93 | screen.process = multiprocessing.current_process() | ||
246 | 94 | screen.updater = Updater(screen) | ||
247 | 95 | #start the thread that will update the gui by calling main_iteration | ||
248 | 96 | |||
249 | 111 | screen.action_objects = multiprocessing.Queue() | 97 | screen.action_objects = multiprocessing.Queue() |
250 | 112 | screen.keys = multiprocessing.Queue() | 98 | screen.keys = multiprocessing.Queue() |
261 | 113 | screen.process = multiprocessing.current_process() | 99 | screen.mouse = multiprocessing.Queue() |
252 | 114 | |||
253 | 115 | screen.mouse = multiprocessing.Queue() | ||
254 | 116 | |||
255 | 117 | #start the thread that will update the gui by calling main_iteration | ||
256 | 118 | screen.updater = Updater(screen) | ||
257 | 119 | |||
258 | 120 | screen.screenshot = False | ||
259 | 121 | screen.filename = "" | ||
260 | 122 | screen.update_when = NOTHING | ||
262 | 123 | screen.update1 = multiprocessing.Queue() | 100 | screen.update1 = multiprocessing.Queue() |
263 | 124 | screen.update2 = multiprocessing.Queue() | 101 | screen.update2 = multiprocessing.Queue() |
264 | 125 | #if this is called to often key and mouse events will be slow | 102 | #if this is called to often key and mouse events will be slow |
265 | 126 | screen.sprites = 0 | ||
266 | 127 | 103 | ||
267 | 128 | screen.text_entry = None | ||
268 | 129 | screen.entry_done = multiprocessing.Queue() | 104 | screen.entry_done = multiprocessing.Queue() |
269 | 130 | screen.updater.daemon = True | 105 | screen.updater.daemon = True |
270 | 131 | screen.updater.start() | 106 | screen.updater.start() |
271 | @@ -243,6 +218,44 @@ | |||
272 | 243 | i.rot = obj[2] | 218 | i.rot = obj[2] |
273 | 244 | 219 | ||
274 | 245 | def run(self): | 220 | def run(self): |
275 | 221 | import gtk | ||
276 | 222 | screen = self.screen | ||
277 | 223 | #create the window and set its size and title | ||
278 | 224 | screen.window = gtk.Window() | ||
279 | 225 | screen.window.set_title(screen.title) | ||
280 | 226 | screen.window.set_default_size(screen.width, screen.height) | ||
281 | 227 | screen.window.set_resizable(False) | ||
282 | 228 | |||
283 | 229 | #create the drawing area | ||
284 | 230 | screen.drawing_area = gtk.DrawingArea() | ||
285 | 231 | screen.window.add(screen.drawing_area) | ||
286 | 232 | screen.drawing_area.set_size_request(screen.width,screen.height) | ||
287 | 233 | screen.drawing_area.show() | ||
288 | 234 | |||
289 | 235 | #set up the event handling | ||
290 | 236 | screen.drawing_area.set_events( gtk.gdk.EXPOSURE_MASK | ||
291 | 237 | | gtk.gdk.BUTTON1_MOTION_MASK | ||
292 | 238 | | gtk.gdk.BUTTON_PRESS_MASK | ||
293 | 239 | | gtk.gdk.BUTTON_RELEASE_MASK | ||
294 | 240 | | gtk.gdk.POINTER_MOTION_MASK | ||
295 | 241 | | gtk.gdk.POINTER_MOTION_HINT_MASK) | ||
296 | 242 | screen.drawing_area.connect("motion_notify_event", mouse_move) | ||
297 | 243 | screen.drawing_area.connect('button-press-event', mouse_press) | ||
298 | 244 | screen.drawing_area.connect('button-release-event', mouse_release) | ||
299 | 245 | screen.window.connect("key-press-event",key_pressed) | ||
300 | 246 | screen.window.connect("key-release-event",key_released) | ||
301 | 247 | screen.window.connect('delete-event', quit) | ||
302 | 248 | |||
303 | 249 | #set the window icon and show the window | ||
304 | 250 | pic = os.path.join(os.path.join(os.path.dirname(os.path.abspath(__file__)),"images"),"gasp.png") | ||
305 | 251 | try: | ||
306 | 252 | screen.window.set_icon_from_file(pic) | ||
307 | 253 | except GError, e: # in case the file is not found | ||
308 | 254 | print "Warning: " + e.message | ||
309 | 255 | screen.window.show() | ||
310 | 256 | #create the buffer to draw to | ||
311 | 257 | screen.buffer = gtk.gdk.Pixmap(screen.drawing_area.window, screen.width, screen.height) | ||
312 | 258 | screen.gc = gtk.gdk.GC(screen.buffer) | ||
313 | 246 | gobject.timeout_add(40, self.update) #this will call update periodically | 259 | gobject.timeout_add(40, self.update) #this will call update periodically |
314 | 247 | self.running = True | 260 | self.running = True |
315 | 248 | #while threading.enumerate()[0].isAlive() and self.running: | 261 | #while threading.enumerate()[0].isAlive() and self.running: |
316 | @@ -526,7 +539,7 @@ | |||
317 | 526 | def keys(): #returns all the keys currently being pressed | 539 | def keys(): #returns all the keys currently being pressed |
318 | 527 | while not screen.keys.empty(): | 540 | while not screen.keys.empty(): |
319 | 528 | key = screen.keys.get() | 541 | key = screen.keys.get() |
321 | 529 | if key[1] == "pressed": | 542 | if key[1] == "pressed" and key[0] not in screen.keys_pressed: |
322 | 530 | screen.keys_pressed.append(key[0]) | 543 | screen.keys_pressed.append(key[0]) |
323 | 531 | if key[1] == "released" and key[0] in screen.keys_pressed: | 544 | if key[1] == "released" and key[0] in screen.keys_pressed: |
324 | 532 | screen.keys_pressed.remove(key[0]) | 545 | screen.keys_pressed.remove(key[0]) |
325 | 533 | 546 | ||
326 | === added file 'setup.cfg' | |||
327 | --- setup.cfg 1970-01-01 00:00:00 +0000 | |||
328 | +++ setup.cfg 2010-03-12 14:32:20 +0000 | |||
329 | @@ -0,0 +1,5 @@ | |||
330 | 1 | [egg_info] | ||
331 | 2 | tag_build = | ||
332 | 3 | tag_date = 0 | ||
333 | 4 | tag_svn_revision = 0 | ||
334 | 5 | |||
335 | 0 | 6 | ||
336 | === modified file 'setup.py' | |||
337 | --- setup.py 2009-08-21 06:07:16 +0000 | |||
338 | +++ setup.py 2010-03-12 14:32:20 +0000 | |||
339 | @@ -18,7 +18,7 @@ | |||
340 | 18 | 18 | ||
341 | 19 | setup( | 19 | setup( |
342 | 20 | name = 'gasp', | 20 | name = 'gasp', |
344 | 21 | version = '0.3.2', | 21 | version = '0.3.3', |
345 | 22 | packages = ['gasp', | 22 | packages = ['gasp', |
346 | 23 | ], | 23 | ], |
347 | 24 | 24 |