[Sugar-devel] [PATCH sugar-toolkit-gtk3 1/2] Add testcase for icon badges - SL #3835
Manuel Quiñones
manuq at laptop.org
Thu Sep 6 12:05:55 EDT 2012
Signed-off-by: Manuel Quiñones <manuq at laptop.org>
----
v2: Use a proper icon, with attach points.
---
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..f72dfe3
--- /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="network-wireless-000")
+icon.props.badge_name = 'emblem-favorite'
+vbox.pack_start(icon, False, False, 0)
+icon.show()
+
+icon = EventIcon(icon_name="network-wireless-000")
+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