Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests/iconentry_testcase.py
blob: fadf3a8e3c876586fa2b47255add1881577fca3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env python

from gi.repository import Gtk
from sugar3.graphics.iconentry import IconEntry


def main():
    window = Gtk.Window()

    iconentry = IconEntry()
    iconentry.set_icon_from_name(
        Gtk.EntryIconPosition.PRIMARY,
        'system-search'
    )

    iconentry.set_icon_from_name(
        Gtk.EntryIconPosition.SECONDARY,
        'system-search'
    )

    window.add(iconentry)

    window.connect("destroy", Gtk.main_quit)
    window.show_all()
    Gtk.main()

if __name__ == "__main__":
    main()