From 01b4bd0ab502edce37b807cfbb5dd127f0f0b37c Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Mon, 11 Oct 2004 08:45:04 +0000 Subject: [PATCH] Require PyGTK 2.4 Original commit message from CVS: Require PyGTK 2.4 --- configure.ac | 7 +------ testsuite/interface.py | 19 +++++++------------ testsuite/test_interface.py | 19 +++++++------------ 3 files changed, 15 insertions(+), 30 deletions(-) diff --git a/configure.ac b/configure.ac index 18a6559e9c..23d2c1edc3 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ dnl Add parameters for aclocal ACLOCAL="$ACLOCAL -I common/m4 $ACLOCAL_FLAGS" dnl required versions of other packages -AC_SUBST(PYGTK_REQ, 2.0.0) +AC_SUBST(PYGTK_REQ, 2.4.0) AC_SUBST(GLIB_REQ, 2.0.0) AC_SUBST(GTK_REQ, 2.0.0) AC_SUBST(GST_REQ, 0.8.0) @@ -61,11 +61,6 @@ dnl check for pygtk PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= $PYGTK_REQ) AC_SUBST(PYGTK_CFLAGS) -PKG_CHECK_MODULES(_UNUSED_NEW_PYGTK, pygtk-2.0 >= 2.3.92, ,HAVE_OLD_PYGTK="yes") -if test "x$HAVE_OLD_PYGTK" = "xyes"; then - AC_DEFINE_UNQUOTED(HAVE_OLD_PYGTK, 1, [Defined if we have an old version of PyGTK]) -fi - AC_MSG_CHECKING(for pygtk defs) PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0` AC_SUBST(PYGTK_DEFSDIR) diff --git a/testsuite/interface.py b/testsuite/interface.py index 00093b82d0..0890e60e65 100644 --- a/testsuite/interface.py +++ b/testsuite/interface.py @@ -1,11 +1,7 @@ from common import gst, unittest -try: - from gst import interfaces -except: - raise SystemExit - import gobject +from gst import interfaces class Availability(unittest.TestCase): def testXOverlay(self): @@ -16,13 +12,12 @@ class Availability(unittest.TestCase): assert hasattr(interfaces, 'Mixer') assert issubclass(interfaces.Mixer, gobject.GInterface) -if getattr(gobject, 'pygtk_version', ()) >= (2,3,92): - class FunctionCall(unittest.TestCase): - def testXOverlay(self): - element = gst.Element('xvimagesink') - assert isinstance(element, gst.Element) - assert isinstance(element, interfaces.XOverlay) - element.set_xwindow_id(0L) +class FunctionCall(unittest.TestCase): + def testXOverlay(self): + element = gst.element_factory_make('xvimagesink') + assert isinstance(element, gst.Element) + assert isinstance(element, interfaces.XOverlay) + element.set_xwindow_id(0L) if __name__ == "__main__": unittest.main() diff --git a/testsuite/test_interface.py b/testsuite/test_interface.py index 00093b82d0..0890e60e65 100644 --- a/testsuite/test_interface.py +++ b/testsuite/test_interface.py @@ -1,11 +1,7 @@ from common import gst, unittest -try: - from gst import interfaces -except: - raise SystemExit - import gobject +from gst import interfaces class Availability(unittest.TestCase): def testXOverlay(self): @@ -16,13 +12,12 @@ class Availability(unittest.TestCase): assert hasattr(interfaces, 'Mixer') assert issubclass(interfaces.Mixer, gobject.GInterface) -if getattr(gobject, 'pygtk_version', ()) >= (2,3,92): - class FunctionCall(unittest.TestCase): - def testXOverlay(self): - element = gst.Element('xvimagesink') - assert isinstance(element, gst.Element) - assert isinstance(element, interfaces.XOverlay) - element.set_xwindow_id(0L) +class FunctionCall(unittest.TestCase): + def testXOverlay(self): + element = gst.element_factory_make('xvimagesink') + assert isinstance(element, gst.Element) + assert isinstance(element, interfaces.XOverlay) + element.set_xwindow_id(0L) if __name__ == "__main__": unittest.main()