Tests: use correct FDO icon names
Hope I catched them all
This commit is contained in:
parent
01220931fc
commit
810623dbe4
|
@ -117,6 +117,7 @@ items = [
|
|||
("Ext Scroller", "test_external", "edje_external_scroller_clicked"),
|
||||
("Ext Slider", "test_external", "edje_external_slider_clicked"),
|
||||
("Ext Video", "test_external", "edje_external_video_clicked"),
|
||||
("Ext Icon", "test_external", "edje_external_icon_clicked"),
|
||||
]),
|
||||
("Effects", [
|
||||
("Flip", "test_flip", "flip_clicked"),
|
||||
|
|
|
@ -14,9 +14,9 @@ class ComboboxItemClass(GenlistItemClass):
|
|||
|
||||
def content_get(self, gl, part, item_data):
|
||||
if part == 'elm.swallow.end':
|
||||
return Icon(gl, standard='clock')
|
||||
return Icon(gl, standard='folder')
|
||||
else:
|
||||
return Icon(gl, standard='home')
|
||||
return Icon(gl, standard='user-home')
|
||||
|
||||
def filter_get(self, gl, key, item_data):
|
||||
if not key:
|
||||
|
|
|
@ -53,16 +53,16 @@ def cb_geometry_update(cp, geom):
|
|||
def cb_item1(li, item):
|
||||
cp = Ctxpopup(li)
|
||||
cp.callback_geometry_update_add(cb_geometry_update)
|
||||
it = item_new(cp, "Go to home folder", "home")
|
||||
it = item_new(cp, "Save file", "file")
|
||||
it = item_new(cp, "Delete file", "delete")
|
||||
it = item_new(cp, "Go to home folder", "user-home")
|
||||
it = item_new(cp, "Save file", "document-save")
|
||||
it = item_new(cp, "Delete file", "user-trash")
|
||||
it = item_new(cp, "Navigate to folder", "folder")
|
||||
it.disabled = True
|
||||
it = item_new(cp, "Edit entry", "edit")
|
||||
it = item_new(cp, "Sate date and time", "clock")
|
||||
it = item_new(cp, "Edit entry", "list-add")
|
||||
it = item_new(cp, "Sate date and time", "list-remove")
|
||||
it.disabled = True
|
||||
|
||||
ic = Icon(cp, standard="home", resizable=(False,False))
|
||||
ic = Icon(cp, standard="user-home", resizable=(False,False))
|
||||
cp.item_prepend("Prepended item", ic, cb_items)
|
||||
|
||||
(x, y) = li.evas.pointer_canvas_xy_get()
|
||||
|
@ -91,13 +91,13 @@ def cb_item1(li, item):
|
|||
|
||||
def cb_item2(li, item):
|
||||
cp = Ctxpopup(li)
|
||||
it = item_new(cp, "", "home")
|
||||
it = item_new(cp, "", "file")
|
||||
it = item_new(cp, "", "delete")
|
||||
it = item_new(cp, "", "user-home")
|
||||
it = item_new(cp, "", "user-trash")
|
||||
it = item_new(cp, "", "user-bookmarks")
|
||||
it = item_new(cp, "", "folder")
|
||||
it = item_new(cp, "", "edit")
|
||||
it = item_new(cp, "", "document-save")
|
||||
it.disabled = True
|
||||
it = item_new(cp, "", "clock")
|
||||
it = item_new(cp, "", "document-send")
|
||||
|
||||
(x, y) = li.evas.pointer_canvas_xy_get()
|
||||
cp.move(x, y)
|
||||
|
@ -120,12 +120,12 @@ def cb_item3(li, item):
|
|||
def cb_item4(li, item):
|
||||
cp = Ctxpopup(li)
|
||||
cp.horizontal = True
|
||||
it = item_new(cp, "", "home")
|
||||
it = item_new(cp, "", "file")
|
||||
it = item_new(cp, "", "delete")
|
||||
it = item_new(cp, "", "user-home")
|
||||
it = item_new(cp, "", "document-save")
|
||||
it = item_new(cp, "", "user-trash")
|
||||
it = item_new(cp, "", "folder")
|
||||
it = item_new(cp, "", "edit")
|
||||
it = item_new(cp, "", "clock")
|
||||
it = item_new(cp, "", "user-bookmarks")
|
||||
it = item_new(cp, "", "document-send")
|
||||
|
||||
(x, y) = li.evas.pointer_canvas_xy_get()
|
||||
cp.move(x, y)
|
||||
|
|
|
@ -315,11 +315,11 @@ def entry_scrolled_clicked(obj, item = None):
|
|||
single_line=True, size_hint_weight=EXPAND_BOTH,
|
||||
size_hint_align=FILL_BOTH,
|
||||
text="entry with icon and end objects")
|
||||
bt = Icon(win, standard="home", size_hint_min=(48, 48),
|
||||
bt = Icon(win, standard="user-home", size_hint_min=(48, 48),
|
||||
color=(128, 0, 0, 128))
|
||||
bt.show()
|
||||
en.part_content_set("icon", bt)
|
||||
bt = Icon(win, standard="delete", size_hint_min=(48, 48),
|
||||
bt = Icon(win, standard="user-trash", size_hint_min=(48, 48),
|
||||
color=(128, 0, 0, 128))
|
||||
bt.show()
|
||||
en.part_content_set("end", bt)
|
||||
|
|
|
@ -60,10 +60,10 @@ def focus_clicked(obj, item=None):
|
|||
tb_it.disabled = True
|
||||
tb_it = tbar.item_append("folder-new", "World", _tb_sel)
|
||||
tb_it = tbar.item_append("object-rotate-right", "H", _tb_sel)
|
||||
tb_it = tbar.item_append("mail-send", "Comes", _tb_sel)
|
||||
tb_it = tbar.item_append("clock", "Elementary", _tb_sel)
|
||||
tb_it = tbar.item_append("object-rotate-left", "Comes", _tb_sel)
|
||||
tb_it = tbar.item_append("folder", "Elementary", _tb_sel)
|
||||
|
||||
tb_it = tbar.item_append("refresh", "Menu", _tb_sel)
|
||||
tb_it = tbar.item_append("view-refresh", "Menu", _tb_sel)
|
||||
tb_it.menu = True
|
||||
tbar.menu_parent = win
|
||||
menu = tb_it.menu
|
||||
|
@ -206,7 +206,7 @@ def focus_clicked(obj, item=None):
|
|||
mainbx.pack_end(bx)
|
||||
bx.show()
|
||||
|
||||
fr = Frame(win, text="Frame", )
|
||||
fr = Frame(win, text="Frame")
|
||||
bx.pack_end(fr)
|
||||
fr.show()
|
||||
|
||||
|
|
|
@ -45,35 +45,35 @@ def hoversel_clicked(obj):
|
|||
size_hint_weight=WEIGHT_ZERO, size_hint_align=ALIGN_CENTER)
|
||||
bt.item_add("Item 1")
|
||||
bt.item_add("Item 2")
|
||||
bt.item_add("Item 3", "home", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 4", "close", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 3", "user-home", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 4", "view-close", ELM_ICON_STANDARD)
|
||||
bx.pack_end(bt)
|
||||
bt.show()
|
||||
|
||||
bt = Hoversel(win, hover_parent=win, text="All Icons",
|
||||
size_hint_weight=WEIGHT_ZERO, size_hint_align=ALIGN_CENTER)
|
||||
bt.item_add("Item 1", "apps", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 2", "arrow_down", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 3", "home", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 4", "close", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 1", "user-trash", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 2", "go-down", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 3", "user-home", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 4", "view-close", ELM_ICON_STANDARD)
|
||||
bx.pack_end(bt)
|
||||
bt.show()
|
||||
|
||||
bt = Hoversel(win, hover_parent=win, text="All Icons",
|
||||
size_hint_weight=WEIGHT_ZERO, size_hint_align=ALIGN_CENTER)
|
||||
bt.item_add("Item 1", "apps", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 1", "user-trash", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 2", os.path.join(img_path, "logo_small.png"),
|
||||
ELM_ICON_FILE)
|
||||
bt.item_add("Item 3", "home", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 4", "close", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 3", "user-home", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 4", "view-close", ELM_ICON_STANDARD)
|
||||
bx.pack_end(bt)
|
||||
bt.show()
|
||||
|
||||
bt = Hoversel(win, hover_parent=win, text="Disabled Hoversel",
|
||||
disabled=True, size_hint_weight=WEIGHT_ZERO,
|
||||
size_hint_align=ALIGN_CENTER)
|
||||
bt.item_add("Item 1", "apps", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 2", "close", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 1", "folder", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 2", "view-close", ELM_ICON_STANDARD)
|
||||
bx.pack_end(bt)
|
||||
bt.show()
|
||||
|
||||
|
@ -82,10 +82,10 @@ def hoversel_clicked(obj):
|
|||
size_hint_weight=WEIGHT_ZERO, size_hint_align=ALIGN_CENTER)
|
||||
ic.show()
|
||||
|
||||
bt.item_add("Item 1", "apps", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 2", "arrow_down", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 3", "home", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 4", "close", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 1", "user-trash", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 2", "go-down", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 3", "user-home", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 4", "view-close", ELM_ICON_STANDARD)
|
||||
bx.pack_end(bt)
|
||||
bt.show()
|
||||
|
||||
|
@ -93,10 +93,10 @@ def hoversel_clicked(obj):
|
|||
auto_update=True,
|
||||
size_hint_weight=WEIGHT_ZERO, size_hint_align=ALIGN_CENTER)
|
||||
|
||||
bt.item_add("Item 1", "apps", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 2", "arrow_down", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 3", "home", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 4", "close", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 1", "user-trash", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 2", "go-down", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 3", "user-home", ELM_ICON_STANDARD)
|
||||
bt.item_add("Item 4", "view-close", ELM_ICON_STANDARD)
|
||||
bx.pack_end(bt)
|
||||
bt.show()
|
||||
|
||||
|
|
|
@ -37,12 +37,12 @@ def list_clicked(obj, item=None):
|
|||
ic = Icon(win, file=os.path.join(img_path, "logo_small.png"),
|
||||
resizable=(False, False))
|
||||
li.item_append("Hello", ic)
|
||||
ic = Icon(win, standard="edit", resizable=(False, False))
|
||||
ic2 = Icon(win, standard="clock", resizable=(False, False))
|
||||
ic = Icon(win, standard="folder", resizable=(False, False))
|
||||
ic2 = Icon(win, standard="user-home", resizable=(False, False))
|
||||
li.item_append(".", ic, ic2)
|
||||
|
||||
ic = Icon(win, standard="delete", resizable=(False, False))
|
||||
ic2 = Icon(win, standard="clock", resizable=(False, False))
|
||||
ic = Icon(win, standard="user-trash", resizable=(False, False))
|
||||
ic2 = Icon(win, standard="folder", resizable=(False, False))
|
||||
it2 = li.item_append("How", ic, ic2)
|
||||
|
||||
bx = Box(win, horizontal=True)
|
||||
|
@ -149,11 +149,11 @@ def list2_clicked(obj, item=None):
|
|||
ic = Icon(win, file=os.path.join(img_path, "logo_small.png"),
|
||||
resizable=(False, False))
|
||||
li.item_append("world", ic)
|
||||
ic = Icon(win, standard="edit", resizable=(False, False))
|
||||
ic = Icon(win, standard="folder", resizable=(False, False))
|
||||
li.item_append(".", ic)
|
||||
|
||||
ic = Icon(win, standard="delete", resizable=(False, False))
|
||||
ic2 = Icon(win, standard="clock", resizable=(False, False))
|
||||
ic = Icon(win, standard="user-trash", resizable=(False, False))
|
||||
ic2 = Icon(win, standard="go-next", resizable=(False, False))
|
||||
it2 = li.item_append("How", ic, ic2)
|
||||
|
||||
bx2 = Box(win, horizontal=True)
|
||||
|
@ -214,17 +214,17 @@ def list3_clicked(obj, item=None):
|
|||
ic = Icon(win, file=os.path.join(img_path, "logo_small.png"),
|
||||
resizable=(False, False))
|
||||
li.item_append("world", ic)
|
||||
ic = Icon(win, standard="edit", resizable=(False, False))
|
||||
ic = Icon(win, standard="folder", resizable=(False, False))
|
||||
li.item_append(".", ic)
|
||||
|
||||
ic = Icon(win, standard="delete", resizable=(False, False))
|
||||
ic2 = Icon(win, standard="clock", resizable=(False, False))
|
||||
ic = Icon(win, standard="view-close", resizable=(False, False))
|
||||
ic2 = Icon(win, standard="view-refresh", resizable=(False, False))
|
||||
it2 = li.item_append("How", ic, ic2)
|
||||
|
||||
bx = Box(win, horizontal=True)
|
||||
bx.horizontal_set(True)
|
||||
|
||||
ic = Icon(win, standard="delete", resizable=(False, False),
|
||||
ic = Icon(win, standard="user-trash", resizable=(False, False),
|
||||
size_hint_align=ALIGN_CENTER)
|
||||
bx.pack_end(ic)
|
||||
ic.show()
|
||||
|
|
|
@ -27,19 +27,19 @@ def main_menu_clicked(obj):
|
|||
|
||||
menu = win.main_menu_get()
|
||||
|
||||
menu_it = menu.item_add(None, "first item", "home")
|
||||
menu.item_add(menu_it, "first item", "elementary")
|
||||
menu_it = menu.item_add(None, "first item", "user-home")
|
||||
menu.item_add(menu_it, "first item", "user-trash")
|
||||
menu_it1 = menu.item_add(menu_it, "submenu")
|
||||
menu.item_add(menu_it1, "first item")
|
||||
menu.item_add(menu_it1, "second item", "gimp")
|
||||
|
||||
menu_it = menu.item_add(None, "second item")
|
||||
menu_it = menu.item_add(None, "second item", "folder")
|
||||
menu_it1 = menu.item_add(menu_it, "disabled item")
|
||||
menu_it1.disabled = True
|
||||
|
||||
menu.item_separator_add(menu_it)
|
||||
menu.item_add(menu_it, "click me :-)", None, _click_me_cb, menu_it1)
|
||||
menu.item_add(menu_it, "third item", "applications-email-panel", )
|
||||
menu.item_add(menu_it, "third item", "folder")
|
||||
menu_it1 = menu.item_add(menu_it, "sub menu")
|
||||
menu.item_add(menu_it1, "first sub item")
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ def menu_show(rect, evtinfo, menu):
|
|||
menu.show()
|
||||
|
||||
def menu_populate_4(menu, item):
|
||||
menu.item_add(item, "menu 2", "clock")
|
||||
menu.item_add(item, "menu 2", "folder")
|
||||
|
||||
item2 = menu.item_add(item, "menu 3", "folder-new")
|
||||
|
||||
|
@ -26,7 +26,7 @@ def menu_populate_4(menu, item):
|
|||
item3 = menu.item_add(item, "Disabled item", "mail-send")
|
||||
item3.disabled = True
|
||||
|
||||
item3 = menu.item_add(item, "Disabled item", "refresh")
|
||||
item3 = menu.item_add(item, "Disabled item", "view-refresh")
|
||||
item3.disabled = True
|
||||
|
||||
def menu_populate_3(menu, item):
|
||||
|
@ -36,7 +36,7 @@ def menu_populate_3(menu, item):
|
|||
|
||||
menu.item_separator_add(item)
|
||||
|
||||
item3 = menu.item_add(item, "Disabled item", "clock")
|
||||
item3 = menu.item_add(item, "Disabled item", "folder")
|
||||
item3.disabled = True
|
||||
|
||||
def menu_populate_2(menu, item):
|
||||
|
@ -48,7 +48,7 @@ def menu_populate_2(menu, item):
|
|||
|
||||
menu.item_separator_add(item)
|
||||
|
||||
item2 = menu.item_add(item, "menu 2", "refresh")
|
||||
item2 = menu.item_add(item, "menu 2", "view-refresh")
|
||||
|
||||
menu.item_separator_add(item)
|
||||
|
||||
|
@ -58,7 +58,7 @@ def menu_populate_2(menu, item):
|
|||
menu_populate_4(menu, item2)
|
||||
|
||||
def menu_populate_1(menu, item):
|
||||
item2 = menu.item_add(item, "menu 1", "refresh")
|
||||
item2 = menu.item_add(item, "menu 1", "view-refresh")
|
||||
|
||||
menu_populate_2(menu, item2)
|
||||
|
||||
|
@ -73,7 +73,7 @@ def menu_clicked(obj):
|
|||
rect.show()
|
||||
|
||||
menu = Menu(win)
|
||||
item = menu.item_add(None, "first item", "clock")
|
||||
item = menu.item_add(None, "first item", "folder")
|
||||
item = menu.item_add(None, "second item", "mail-send")
|
||||
menu_populate_1(menu, item)
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ def panel_clicked(obj):
|
|||
|
||||
toolbar = Toolbar(panel1, homogeneous=False,
|
||||
shrink_mode=ELM_TOOLBAR_SHRINK_NONE)
|
||||
toolbar.item_append("home", "Hello Toolbar")
|
||||
toolbar.item_append("user-home", "Hello Toolbar")
|
||||
panel1.content = toolbar
|
||||
toolbar.show()
|
||||
|
||||
|
@ -60,7 +60,7 @@ def panel_clicked(obj):
|
|||
|
||||
li = List(panel2, size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
|
||||
for i in range(1, 50):
|
||||
ic = Icon(win, standard="home")
|
||||
ic = Icon(win, standard="user-home")
|
||||
li.item_append("Item #%d" % i, ic)
|
||||
panel2.content = li
|
||||
li.show()
|
||||
|
@ -86,7 +86,7 @@ def panel_clicked(obj):
|
|||
toolbar = Toolbar(panel4, homogeneous=False,
|
||||
shrink_mode=ELM_TOOLBAR_SHRINK_NONE,
|
||||
size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_BOTH)
|
||||
toolbar.item_append("home", "Hello Toolbar")
|
||||
toolbar.item_append("user-home", "Hello Toolbar")
|
||||
panel4.content = toolbar
|
||||
toolbar.show()
|
||||
|
||||
|
|
|
@ -102,21 +102,21 @@ def toolbar_clicked(obj, item=None):
|
|||
item = tb.item_append("document-print", "Hello", tb_1)
|
||||
item.disabled = True
|
||||
|
||||
item = tb.item_append("clock", "World,", tb_2, ph2)
|
||||
item = tb.item_append("document-open", "World,", tb_2, ph2)
|
||||
item.selected = True
|
||||
|
||||
tb.item_append("folder-new", "here", tb_3, ph4)
|
||||
tb.item_append("clock", "comes", tb_4, ph4)
|
||||
tb.item_append("folder-new", "python-elementary!", tb_5, ph4)
|
||||
tb.item_append("document-save", "comes", tb_4, ph4)
|
||||
tb.item_append("document-send", "python-elementary!", tb_5, ph4)
|
||||
|
||||
item = tb.item_append("clock", "Menu", tb_5, ph4)
|
||||
item = tb.item_append("go-down", "Menu", tb_5, ph4)
|
||||
item.menu = True
|
||||
tb.menu_parent = win
|
||||
|
||||
menu = item.menu
|
||||
|
||||
menu.item_add(None, "Here", "clock", tb_3, ph4)
|
||||
menu_item = menu.item_add(None, "Comes", "refresh", tb_4, ph4)
|
||||
menu.item_add(None, "Here", "folder", tb_3, ph4)
|
||||
menu_item = menu.item_add(None, "Comes", "view-refresh", tb_4, ph4)
|
||||
menu.item_add(menu_item, "hey ho", "folder-new", tb_4, ph4)
|
||||
menu.item_add(None, "python-elementary", "document-print", tb_5, ph4)
|
||||
|
||||
|
@ -177,15 +177,15 @@ def toolbar5_clicked(obj, item=None):
|
|||
tb_it.state_add("object-rotate-left", "H2", tb_3b, ph4)
|
||||
tb_it.priority = 150
|
||||
|
||||
tb_it = tb.item_append("mail-send", "Comes", tb_4a, ph4)
|
||||
tb_it = tb.item_append("object-rotate-left", "Comes", tb_4a, ph4)
|
||||
tb_it.state_add("emptytrash", "Comes2", tb_4a, ph4)
|
||||
tb_it.state_add("trashcan_full", "Comes3", tb_4a, ph4)
|
||||
tb_it.priority = 0
|
||||
|
||||
tb_it = tb.item_append("clock", "Elementary", tb_5, ph4)
|
||||
tb_it = tb.item_append("user-trash", "Elementary", tb_5, ph4)
|
||||
tb_it.priority = -200
|
||||
|
||||
tb_it = tb.item_append("refresh", "Menu")
|
||||
tb_it = tb.item_append("view-refresh", "Menu")
|
||||
tb_it.menu = True
|
||||
tb_it.priority = -9999
|
||||
tb.menu_parent = win
|
||||
|
|
|
@ -53,10 +53,10 @@ def tooltip_clicked(obj):
|
|||
bx.pack_end(tb)
|
||||
tb.show()
|
||||
|
||||
ti = tb.item_append("folder-new", "Open", None, None)
|
||||
ti = tb.item_append("document-open", "Open", None, None)
|
||||
ti.tooltip_text_set("Opens a file")
|
||||
|
||||
ti = tb.item_append("clock", "Icon", None, None)
|
||||
ti = tb.item_append("view-close", "Icon", None, None)
|
||||
ti.tooltip_content_cb_set(_tt_item_icon, None)
|
||||
ti.tooltip_style_set("transparent")
|
||||
|
||||
|
|
Loading…
Reference in New Issue