def change_item_icon(self,title,icon):
for i in self.menu.get_children():
logger.debug("in loop")
logger.debug(i.get_label())
if (i.get_submenu()):
logger.debug("Submenu is here")
for j in i.get_submenu().get_children():
logger.debug("---->" + j.get_label())
for i in self.menu.get_children()[7].get_submenu().get_children():
if title == i.get_label():
GObject.idle_add(i.set_image,Gtk.Image.new_from_icon_name(icon, Gtk.IconSize.LARGE_TOOLBAR))
logger.debug("Icon changed to: ", str(icon))
评论列表
文章目录