[Sugar-devel] [PATCH sugar-toolkit-gtk3] Add testcase for icon badges - SL #3835
Manuel Quiñones
manuq at laptop.org
Thu Sep 6 09:33:37 EDT 2012
Signed-off-by: Manuel Quiñones <manuq at laptop.org>
---
tests/graphics/iconbadges.py | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
create mode 100644 tests/graphics/iconbadges.py
diff --git a/tests/graphics/iconbadges.py b/tests/graphics/iconbadges.py
new file mode 100644
index 0000000..bfef156
--- /dev/null
+++ b/tests/graphics/iconbadges.py
@@ -0,0 +1,28 @@
+from gi.repository import Gtk
+
+from sugar3.graphics.icon import EventIcon
+from sugar3.graphics.icon import Icon
+
+import common
+
+
+test = common.Test()
+test.show()
+
+vbox = Gtk.VBox()
+test.pack_start(vbox, True, True, 0)
+vbox.show()
+
+icon = Icon(icon_name="computer-xo")
+icon.props.badge_name = 'emblem-favorite'
+vbox.pack_start(icon, False, False, 0)
+icon.show()
+
+icon = EventIcon(icon_name="computer-xo")
+icon.props.badge_name = 'emblem-favorite'
+vbox.pack_start(icon, False, False, 0)
+icon.show()
+
+
+if __name__ == '__main__':
+ common.main(test)
--
1.7.11.4
More information about the Sugar-devel
mailing list