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
bhdouglass-indicator-weather.py 文件源码
python
阅读 22
收藏 0
点赞 0
评论 0
评论列表
文章目录