bhdouglass-indicator-weather.py 文件源码

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

项目:ut-indicator-weather 作者: bhdouglass 项目源码 文件源码
def _create_section(self):
        section = Gio.Menu()

        current_menu_item = Gio.MenuItem.new(self.current_state(), 'indicator.{}'.format(self.CURRENT_ACTION))
        icon = Gio.ThemedIcon.new_with_default_fallbacks(self.current_icon())
        current_menu_item.set_attribute_value('icon', icon.serialize())
        section.append_item(current_menu_item)

        settings_menu_item = Gio.MenuItem.new(_('Forecast'), 'indicator.{}'.format(self.FORECAST_ACTION))
        section.append_item(settings_menu_item)

        settings_menu_item = Gio.MenuItem.new(_('Weather Settings'), 'indicator.{}'.format(self.SETTINGS_ACTION))
        section.append_item(settings_menu_item)

        return section
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号