Merge lp:~lfaraone/ubuntu/lucid/python-gasp/lp419501 into lp:ubuntu/lucid/python-gasp

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
Reviewer Review Type Date Requested Status
Ubuntu Development Team Pending
Review via email: mp+21242@code.launchpad.net

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

Subscribers

People subscribed via source and target branches

to all changes: