testinggtk r253 - trunk/tests
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r253 - trunk/tests
- Date: Wed, 25 Jun 2008 21:34:53 +0000 (UTC)
Author: bjornl
Date: Wed Jun 25 21:34:52 2008
New Revision: 253
URL: http://svn.gnome.org/viewvc/testinggtk?rev=253&view=rev
Log:
Test for gtk.Builder.connect_signals
Modified:
trunk/tests/test_builder.py
Modified: trunk/tests/test_builder.py
==============================================================================
--- trunk/tests/test_builder.py (original)
+++ trunk/tests/test_builder.py Wed Jun 25 21:34:52 2008
@@ -20,3 +20,22 @@
b.add_from_string(xml)
combo = b.get_object('foo')
assert isinstance(combo, gtk.ComboBox)
+
+def test_connect_button_signal():
+ '''
+ Tests that ``connect_signals`` work.
+ '''
+ xml = '''
+ <interface>
+ <object class = "GtkButton" id = "foo">
+ <signal name = "clicked" handler = "clicked_cb"/>
+ </object>
+ </interface>
+ '''
+ def clicked_cb(*args):
+ print 'clicked'
+ b = gtk.Builder()
+ b.add_from_string(xml)
+ b.connect_signals(locals())
+ button = b.get_object('foo')
+ button.clicked()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]