application_menu.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:sticky-notes 作者: rubyAce71697 项目源码 文件源码
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))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号