Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/examples/iconbadges.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/iconbadges.py')
-rw-r--r--examples/iconbadges.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/examples/iconbadges.py b/examples/iconbadges.py
new file mode 100644
index 0000000..f72dfe3
--- /dev/null
+++ b/examples/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)