pygtk r2995 - in trunk: . gtk tests
- From: paulp svn gnome org
- To: svn-commits-list gnome org
- Subject: pygtk r2995 - in trunk: . gtk tests
- Date: Sat, 21 Jun 2008 18:40:11 +0000 (UTC)
Author: paulp
Date: Sat Jun 21 18:40:11 2008
New Revision: 2995
URL: http://svn.gnome.org/viewvc/pygtk?rev=2995&view=rev
Log:
2008-06-21 Paul Pogonyshev <pogonyshev gmx net>
* gtk/gtk.override (_wrap_gtk_button_new): Fix 'use_underline'
being ignored if neither 'text' nor 'stock' is set (bug #524187).
* tests/Makefile.am:
* tests/test_button.py: New test file.
Added:
trunk/tests/test_button.py
Modified:
trunk/ChangeLog
trunk/gtk/gtk.override
trunk/tests/Makefile.am
Modified: trunk/gtk/gtk.override
==============================================================================
--- trunk/gtk/gtk.override (original)
+++ trunk/gtk/gtk.override Sat Jun 21 18:40:11 2008
@@ -1601,12 +1601,10 @@
pygobject_construct(self,
"label", stock, "use-stock", TRUE,
"use-underline", TRUE, NULL);
- else if (text)
+ else
pygobject_construct(self,
"label", text, "use-underline",
PyObject_IsTrue(py_use_underline), NULL);
- else
- pygobject_construct(self, NULL);
if (!self->obj) {
PyErr_SetString(PyExc_RuntimeError, "could not create GtkButton object");
return -1;
Modified: trunk/tests/Makefile.am
==============================================================================
--- trunk/tests/Makefile.am (original)
+++ trunk/tests/Makefile.am Sat Jun 21 18:40:11 2008
@@ -4,6 +4,7 @@
test_actiongroup.py \
test_api.py \
test_bin.py \
+ test_button.py \
test_container.py
test_conversion.py \
test_dialog.py \
Added: trunk/tests/test_button.py
==============================================================================
--- (empty file)
+++ trunk/tests/test_button.py Sat Jun 21 18:40:11 2008
@@ -0,0 +1,12 @@
+import unittest
+
+from common import gtk
+
+class TextButton(unittest.TestCase):
+ # Bug #524187.
+ def test_constructor(self):
+ button = gtk.Button()
+ self.assert_(button.props.use_underline)
+
+if __name__ == '__main__':
+ unittest.main()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]