gimp r25957 - in branches/soc-2008-python: . plug-ins/pygimp plug-ins/pygimp/plug-ins
- From: larsc svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r25957 - in branches/soc-2008-python: . plug-ins/pygimp plug-ins/pygimp/plug-ins
- Date: Sun, 15 Jun 2008 12:19:40 +0000 (UTC)
Author: larsc
Date: Sun Jun 15 12:19:40 2008
New Revision: 25957
URL: http://svn.gnome.org/viewvc/gimp?rev=25957&view=rev
Log:
2008-06-15 Lars-Peter Clausen <lars metafoo de>
* plug-ins/pygimp/plug-ins/python-fu-eval.py: Moved execution into
global namespace. Fixes import statements inside of evaled code.
* plug-ins/pygimp/testui.py: Cleaned use of import statements.
* plug-ins/pygimp/testui: Redirect stderr to stdout
Modified:
branches/soc-2008-python/ChangeLog
branches/soc-2008-python/plug-ins/pygimp/plug-ins/python-eval.py
branches/soc-2008-python/plug-ins/pygimp/testui
branches/soc-2008-python/plug-ins/pygimp/testui.py
Modified: branches/soc-2008-python/plug-ins/pygimp/plug-ins/python-eval.py
==============================================================================
--- branches/soc-2008-python/plug-ins/pygimp/plug-ins/python-eval.py (original)
+++ branches/soc-2008-python/plug-ins/pygimp/plug-ins/python-eval.py Sun Jun 15 12:19:40 2008
@@ -23,7 +23,7 @@
if code == '-':
import sys
code = sys.stdin
- exec code
+ exec code in globals()
register(
"python-fu-eval",
Modified: branches/soc-2008-python/plug-ins/pygimp/testui
==============================================================================
--- branches/soc-2008-python/plug-ins/pygimp/testui (original)
+++ branches/soc-2008-python/plug-ins/pygimp/testui Sun Jun 15 12:19:40 2008
@@ -1,2 +1,2 @@
#!/bin/sh
-gimp-2.5 -i --batch-interpreter python-fu-eval -b "-" < testui.py
+gimp-2.5 -i --batch-interpreter python-fu-eval -b "-" < testui.py 2>&1
Modified: branches/soc-2008-python/plug-ins/pygimp/testui.py
==============================================================================
--- branches/soc-2008-python/plug-ins/pygimp/testui.py (original)
+++ branches/soc-2008-python/plug-ins/pygimp/testui.py Sun Jun 15 12:19:40 2008
@@ -1,5 +1,7 @@
import unittest
import gimp
+import gtk
+import gobject
class TestAllWidgetFunctions(unittest.TestCase):
@@ -20,7 +22,6 @@
getter()
def testButton(self):
- import gtk
button = gimp.ui.Button()
button.extended_clicked(gtk.gdk.BUTTON1_MASK)
@@ -32,7 +33,6 @@
pass
def testBrowser(self):
- import gtk
browser = gimp.ui.Browser()
browser.add_search_types((".gif", 1), (".png", 2))
browser.set_widget(gtk.Button("some label"))
@@ -54,7 +54,6 @@
ccb = gimp.ui.ChannelComboBox(lambda value, data: False, "Some Data")
def testColorArea(self):
- import gtk
ca = gimp.ui.ColorArea(gimp.color.RGB(255, 0, 0), gimp.ui.COLOR_AREA_FLAT,
gtk.gdk.BUTTON1_MASK)
ca.set_color(gimp.color.RGB(255, 0, 0))
@@ -91,7 +90,6 @@
page = cn.set_has_page(gimp._ui.ColorSelector.__gtype__, False)
def testColorProfileComboBox(self):
- import gtk
cps = gimp.ui.ColorProfileStore("history")
cpcb = gimp.ui.ColorProfileComboBox(gtk.Dialog(), cps)
cpcb.add("Some/filename", "Some label")
@@ -103,7 +101,6 @@
cps.add("Some/filename", "Some label")
def testColorScale(self):
- import gtk
cs = gimp.ui.ColorScale(gtk.ORIENTATION_VERTICAL, gimp.ui.COLOR_SELECTOR_SATURATION)
cs.set_channel(gimp.ui.COLOR_SELECTOR_GREEN)
cs.set_color(gimp.color.RGB(1,2,3), gimp.color.HSV(3,2,1))
@@ -201,7 +198,6 @@
self._testBoolGetterSetter(npe.set_user_override, npe.get_user_override)
def testOffsetAreas(self):
- import gtk
oa = gimp.ui.OffsetArea(200, 100)
oa.set_pixbuf(gtk.gdk.pixbuf_new_from_file("../../data/images/wilber.png"))
oa.set_size(10,20)
@@ -284,7 +280,6 @@
def testSizeEntry(self):
return
# FIXME
- import gtk
se = gimp.ui.SizeEntry(3, gimp.enums.UNIT_PIXEL, "%a", True, False, True, 100,
gimp.ui.SIZE_ENTRY_UPDATE_NONE)
se.add_field(gtk.SpinButton(), gtk.SpinButton())
@@ -308,8 +303,6 @@
# se.get_help_widget(0)
def testStringComboBox(self):
- import gtk
- import gobject
scb = gimp.ui.StringComboBox(gtk.ListStore(gobject.TYPE_STRING,
gobject.TYPE_STRING), 0, 1)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]