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
=== added file 'MANIFEST.in'
--- MANIFEST.in 1970-01-01 00:00:00 +0000
+++ MANIFEST.in 2010-03-12 14:32:20 +0000
@@ -0,0 +1,3 @@
1include AUTHORS COPYING NEWS
2recursive-include tests *.txt *.py
3recursive-include gasp/images *.png
04
=== modified file 'NEWS'
--- NEWS 2009-08-21 06:07:16 +0000
+++ NEWS 2010-03-12 14:32:20 +0000
@@ -1,3 +1,17 @@
1python-gasp (0.3.3) stable; urgency=low
2
3 * Work around xlib threadinb bug (LP: #41950)
4 * Correctly handle pressed keys (LP: #533413)
5
6 -- Luke Faraone <luke@faraone.cc> Mon, 08 Mar 2010 23:07:06 -0500
7
8python-gasp (0.3.2~win32-1) stable; urgency=low
9
10 * Import gobject.GError instead of glib.GError on Windows or when glib is
11 unavailable. (NO CHANGE ON OTHER PLATFORMS)
12
13 -- Luke Faraone <luke@faraone.cc> Fri, 28 Aug 2009 16:29:41 -0400
14
1python-gasp (0.3.2) stable; urgency=low15python-gasp (0.3.2) stable; urgency=low
216
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,
418
=== added file 'PKG-INFO'
--- PKG-INFO 1970-01-01 00:00:00 +0000
+++ PKG-INFO 2010-03-12 14:32:20 +0000
@@ -0,0 +1,24 @@
1Metadata-Version: 1.0
2Name: gasp
3Version: 0.3.3
4Summary: GASP provides a simple, procedural graphics API for beginning students using Python
5Home-page: http://wiki.laptop.org/go/GASP
6Author: Luke Faraone
7Author-email: luke@faraoane.cc
8License: GPLv3+
9Download-URL: https://launchpad.net/gasp-code/+download
10Description: UNKNOWN
11Keywords: gasp
12Platform: UNKNOWN
13Classifier: Development Status :: 4 - Beta
14Classifier: Environment :: X11 Applications :: GTK
15Classifier: Environment :: Win32 (MS Windows)
16Classifier: Intended Audience :: Education
17Classifier: License :: OSI Approved :: GNU General Public License (GPL)
18Classifier: Programming Language :: Python
19Classifier: Natural Language :: English
20Classifier: Operating System :: OS Independent
21Classifier: Topic :: Education :: Computer Aided Instruction (CAI)
22Classifier: Topic :: Multimedia :: Graphics
23Classifier: Topic :: Software Development :: Libraries :: Python Modules
24Classifier: Topic :: Software Development :: User Interfaces
025
=== modified file 'debian/changelog'
--- debian/changelog 2009-11-10 20:15:49 +0000
+++ debian/changelog 2010-03-12 14:32:20 +0000
@@ -1,3 +1,9 @@
1python-gasp (0.3.3-0ubuntu1) lucid; urgency=low
2
3 * New upstream release. (LP: #419501)
4
5 -- Luke Faraone <luke@faraone.cc> Fri, 12 Mar 2010 09:19:17 -0500
6
1python-gasp (0.3.2-1ubuntu1) lucid; urgency=low7python-gasp (0.3.2-1ubuntu1) lucid; urgency=low
28
3 * Drop dependency on python-multiprocessing, multiprocessing module9 * Drop dependency on python-multiprocessing, multiprocessing module
410
=== added directory 'gasp.egg-info'
=== added file 'gasp.egg-info/PKG-INFO'
--- gasp.egg-info/PKG-INFO 1970-01-01 00:00:00 +0000
+++ gasp.egg-info/PKG-INFO 2010-03-12 14:32:20 +0000
@@ -0,0 +1,24 @@
1Metadata-Version: 1.0
2Name: gasp
3Version: 0.3.3
4Summary: GASP provides a simple, procedural graphics API for beginning students using Python
5Home-page: http://wiki.laptop.org/go/GASP
6Author: Luke Faraone
7Author-email: luke@faraoane.cc
8License: GPLv3+
9Download-URL: https://launchpad.net/gasp-code/+download
10Description: UNKNOWN
11Keywords: gasp
12Platform: UNKNOWN
13Classifier: Development Status :: 4 - Beta
14Classifier: Environment :: X11 Applications :: GTK
15Classifier: Environment :: Win32 (MS Windows)
16Classifier: Intended Audience :: Education
17Classifier: License :: OSI Approved :: GNU General Public License (GPL)
18Classifier: Programming Language :: Python
19Classifier: Natural Language :: English
20Classifier: Operating System :: OS Independent
21Classifier: Topic :: Education :: Computer Aided Instruction (CAI)
22Classifier: Topic :: Multimedia :: Graphics
23Classifier: Topic :: Software Development :: Libraries :: Python Modules
24Classifier: Topic :: Software Development :: User Interfaces
025
=== added file 'gasp.egg-info/SOURCES.txt'
--- gasp.egg-info/SOURCES.txt 1970-01-01 00:00:00 +0000
+++ gasp.egg-info/SOURCES.txt 2010-03-12 14:32:20 +0000
@@ -0,0 +1,20 @@
1AUTHORS
2COPYING
3MANIFEST.in
4NEWS
5README
6setup.py
7gasp/__init__.py
8gasp/api.py
9gasp/backend.py
10gasp/color.py
11gasp.egg-info/PKG-INFO
12gasp.egg-info/SOURCES.txt
13gasp.egg-info/dependency_links.txt
14gasp.egg-info/requires.txt
15gasp.egg-info/top_level.txt
16gasp/images/gasp.png
17tests/mockbackends.py
18tests/run.py
19tests/test_api.txt
20tests/test_backend.txt
0\ No newline at end of file21\ No newline at end of file
122
=== added file 'gasp.egg-info/dependency_links.txt'
--- gasp.egg-info/dependency_links.txt 1970-01-01 00:00:00 +0000
+++ gasp.egg-info/dependency_links.txt 2010-03-12 14:32:20 +0000
@@ -0,0 +1,1 @@
1
02
=== added file 'gasp.egg-info/requires.txt'
--- gasp.egg-info/requires.txt 1970-01-01 00:00:00 +0000
+++ gasp.egg-info/requires.txt 2010-03-12 14:32:20 +0000
@@ -0,0 +1,4 @@
1setuptools
2pycairo >= 1.4
3pygobject
4pygtk >= 2.0
0\ No newline at end of file5\ No newline at end of file
16
=== added file 'gasp.egg-info/top_level.txt'
--- gasp.egg-info/top_level.txt 1970-01-01 00:00:00 +0000
+++ gasp.egg-info/top_level.txt 2010-03-12 14:32:20 +0000
@@ -0,0 +1,1 @@
1gasp
02
=== modified file 'gasp/backend.py'
--- gasp/backend.py 2009-08-21 06:07:16 +0000
+++ gasp/backend.py 2010-03-12 14:32:20 +0000
@@ -21,14 +21,25 @@
21import sys21import sys
22import math22import math
23import multiprocessing23import multiprocessing
24import threading24#import threading
2525
26import cairo26import cairo
27import gobject27import gobject
28import time28import time
29import gtk29
3030
31from glib import GError31try:
32 from glib import GError
33except ImportError:
34 # must be on windows, then
35 print '[DBG]: On Windows'
36 try:
37 from gobject import GError
38 except ImportError:
39 # TODO: we *should* display a warning
40 # worst case now you'll get a traceback
41 print '[DBG]: No GError in gobject!'
42 GError = None
3243
33# diffrent update_when values44# diffrent update_when values
34NOTHING = "Nothing"45NOTHING = "Nothing"
@@ -63,69 +74,33 @@
63 #create the screen obj74 #create the screen obj
64 screen = screen_obj75 screen = screen_obj
6576
66 #create the window and set its size and title
67 screen.window = gtk.Window()
68 screen.window.set_title(screen.title)
69 screen.window.set_default_size(screen.width, screen.height)
70 screen.window.set_resizable(False)
71
72 #create the drawing area
73 screen.drawing_area = gtk.DrawingArea()
74 screen.window.add(screen.drawing_area)
75 screen.drawing_area.set_size_request(screen.width,screen.height)
76 screen.drawing_area.show()
77
78 screen.frame_rate = 40
79 screen.last_tick = time.time()
80
81 #set up the event handling
82 screen.drawing_area.set_events( gtk.gdk.EXPOSURE_MASK
83 | gtk.gdk.BUTTON1_MOTION_MASK
84 | gtk.gdk.BUTTON_PRESS_MASK
85 | gtk.gdk.BUTTON_RELEASE_MASK
86 | gtk.gdk.POINTER_MOTION_MASK
87 | gtk.gdk.POINTER_MOTION_HINT_MASK)
88 screen.drawing_area.connect("motion_notify_event", mouse_move)
89 screen.drawing_area.connect('button-press-event', mouse_press)
90 screen.drawing_area.connect('button-release-event', mouse_release)
91 screen.window.connect("key-press-event",key_pressed)
92 screen.window.connect("key-release-event",key_released)
93 screen.window.connect('delete-event', quit)
94 screen.keys_pressed = []77 screen.keys_pressed = []
95 screen.mouse_pos = (-1,-1)78 screen.mouse_pos = (-1,-1)
96 screen.mouse_state = {"left":0,"middle":0,"right":0}79 screen.mouse_state = {"left":0,"middle":0,"right":0}
97 screen.mouse_buttons = ["left","middle","right"]80 screen.mouse_buttons = ["left","middle","right"]
9881 screen.screenshot = False
99 #set the window icon and show the window82 screen.filename = ""
100 pic = os.path.join(os.path.join(os.path.dirname(os.path.abspath(__file__)),"images"),"gasp.png")83 screen.update_when = NOTHING
101 try:84
102 screen.window.set_icon_from_file(pic)85 screen.sprites = 0
103 except GError, e: # in case the file is not found86
104 print "Warning: " + e.message87 screen.text_entry = None
105 screen.window.show()88 screen.frame_rate = 40
10689 screen.last_tick = time.time()
107 #create the buffer to draw to90
108 screen.buffer = gtk.gdk.Pixmap(screen.drawing_area.window, screen.width, screen.height)91
109 screen.gc = gtk.gdk.GC(screen.buffer)
110 screen.objects = []92 screen.objects = []
93 screen.process = multiprocessing.current_process()
94 screen.updater = Updater(screen)
95 #start the thread that will update the gui by calling main_iteration
96
111 screen.action_objects = multiprocessing.Queue()97 screen.action_objects = multiprocessing.Queue()
112 screen.keys = multiprocessing.Queue()98 screen.keys = multiprocessing.Queue()
113 screen.process = multiprocessing.current_process()99 screen.mouse = multiprocessing.Queue()
114
115 screen.mouse = multiprocessing.Queue()
116
117 #start the thread that will update the gui by calling main_iteration
118 screen.updater = Updater(screen)
119
120 screen.screenshot = False
121 screen.filename = ""
122 screen.update_when = NOTHING
123 screen.update1 = multiprocessing.Queue()100 screen.update1 = multiprocessing.Queue()
124 screen.update2 = multiprocessing.Queue()101 screen.update2 = multiprocessing.Queue()
125 #if this is called to often key and mouse events will be slow102 #if this is called to often key and mouse events will be slow
126 screen.sprites = 0
127103
128 screen.text_entry = None
129 screen.entry_done = multiprocessing.Queue()104 screen.entry_done = multiprocessing.Queue()
130 screen.updater.daemon = True105 screen.updater.daemon = True
131 screen.updater.start()106 screen.updater.start()
@@ -243,6 +218,44 @@
243 i.rot = obj[2]218 i.rot = obj[2]
244219
245 def run(self):220 def run(self):
221 import gtk
222 screen = self.screen
223 #create the window and set its size and title
224 screen.window = gtk.Window()
225 screen.window.set_title(screen.title)
226 screen.window.set_default_size(screen.width, screen.height)
227 screen.window.set_resizable(False)
228
229 #create the drawing area
230 screen.drawing_area = gtk.DrawingArea()
231 screen.window.add(screen.drawing_area)
232 screen.drawing_area.set_size_request(screen.width,screen.height)
233 screen.drawing_area.show()
234
235 #set up the event handling
236 screen.drawing_area.set_events( gtk.gdk.EXPOSURE_MASK
237 | gtk.gdk.BUTTON1_MOTION_MASK
238 | gtk.gdk.BUTTON_PRESS_MASK
239 | gtk.gdk.BUTTON_RELEASE_MASK
240 | gtk.gdk.POINTER_MOTION_MASK
241 | gtk.gdk.POINTER_MOTION_HINT_MASK)
242 screen.drawing_area.connect("motion_notify_event", mouse_move)
243 screen.drawing_area.connect('button-press-event', mouse_press)
244 screen.drawing_area.connect('button-release-event', mouse_release)
245 screen.window.connect("key-press-event",key_pressed)
246 screen.window.connect("key-release-event",key_released)
247 screen.window.connect('delete-event', quit)
248
249 #set the window icon and show the window
250 pic = os.path.join(os.path.join(os.path.dirname(os.path.abspath(__file__)),"images"),"gasp.png")
251 try:
252 screen.window.set_icon_from_file(pic)
253 except GError, e: # in case the file is not found
254 print "Warning: " + e.message
255 screen.window.show()
256 #create the buffer to draw to
257 screen.buffer = gtk.gdk.Pixmap(screen.drawing_area.window, screen.width, screen.height)
258 screen.gc = gtk.gdk.GC(screen.buffer)
246 gobject.timeout_add(40, self.update) #this will call update periodically259 gobject.timeout_add(40, self.update) #this will call update periodically
247 self.running = True260 self.running = True
248 #while threading.enumerate()[0].isAlive() and self.running:261 #while threading.enumerate()[0].isAlive() and self.running:
@@ -526,7 +539,7 @@
526def keys(): #returns all the keys currently being pressed539def keys(): #returns all the keys currently being pressed
527 while not screen.keys.empty():540 while not screen.keys.empty():
528 key = screen.keys.get()541 key = screen.keys.get()
529 if key[1] == "pressed":542 if key[1] == "pressed" and key[0] not in screen.keys_pressed:
530 screen.keys_pressed.append(key[0])543 screen.keys_pressed.append(key[0])
531 if key[1] == "released" and key[0] in screen.keys_pressed:544 if key[1] == "released" and key[0] in screen.keys_pressed:
532 screen.keys_pressed.remove(key[0])545 screen.keys_pressed.remove(key[0])
533546
=== added file 'setup.cfg'
--- setup.cfg 1970-01-01 00:00:00 +0000
+++ setup.cfg 2010-03-12 14:32:20 +0000
@@ -0,0 +1,5 @@
1[egg_info]
2tag_build =
3tag_date = 0
4tag_svn_revision = 0
5
06
=== modified file 'setup.py'
--- setup.py 2009-08-21 06:07:16 +0000
+++ setup.py 2010-03-12 14:32:20 +0000
@@ -18,7 +18,7 @@
1818
19setup(19setup(
20 name = 'gasp',20 name = 'gasp',
21 version = '0.3.2',21 version = '0.3.3',
22 packages = ['gasp',22 packages = ['gasp',
23 ],23 ],
2424

Subscribers

People subscribed via source and target branches

to all changes: