本文整理汇总了Python中status.Status.clear方法的典型用法代码示例。如果您正苦于以下问题:Python Status.clear方法的具体用法?Python Status.clear怎么用?Python Status.clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类status.Status
的用法示例。
在下文中一共展示了Status.clear方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Reader
# 需要导入模块: from status import Status [as 别名]
# 或者: from status.Status import clear [as 别名]
#.........这里部分代码省略.........
<toolitem name='New category' action='New category'/>
<separator name='sep1'/>
<toolitem name='Reconnect' action='Reconnect'/>
<separator />
<toolitem name='Update all' action='Update all'/>
<toolitem name='Stop' action='StopUpdate'/>
<separator name='sep2'/>
<toolitem name='PreviousFeed' action='PreviousFeed'/>
<toolitem name='PreviousArticle' action='PreviousArticle'/>
<toolitem name='Star' action='Star'/>
<toolitem name='NextArticle' action='NextArticle'/>
<toolitem name='NextFeed' action='NextFeed'/>
<separator name='sep3'/>
<toolitem name='FullScreen' action='FullScreen'/>
<toolitem name='Find' action='Find'/>
<toolitem name='Preferences' action='Preferences'/>
</toolbar>
</ui>"""
self.mag = Gtk.ActionGroup('MenuActions')
mactions = [
('FeedMenu', None, _('_Feeds')),
('EditMenu', None, _('E_dit')),
('NetworkMenu', None, _('_Network')),
('ViewMenu', None, _('_View')),
('HelpMenu', None, _('_Help')),
('About', "gtk-about", _('_About'), None, _('About'), self.__about),
]
self.mag.add_actions(mactions)
self.ag = Gtk.ActionGroup('WindowActions')
actions = [
('New feed', 'feed', _('_New feed'), '<control><alt>n', _('Add a feed'), self.__add_feed),
('New category', "gtk-directory", _('New _category'), '<control><alt>c', _('Add a category'), self.__add_category),
('Delete', "gtk-clear", _('Delete'), 'Delete', _('Delete a feed or a category'), self.__delete_item),
('Import feeds', "gtk-redo", _('Import feeds'), None, _('Import a feedlist'), self.__import_feeds),
('Export feeds', "gtk-undo", _('Export feeds'), None, _('Export a feedlist'), self.__export_feeds),
('Quit', "gtk-quit", _('_Quit'), '<control>Q', _('Quits'), self.quit),
('Edit', "gtk-edit", _('_Edit'), '<control>E', _('Edit the selected element')),
('Star', "gtk-about", _('_Star'), 'x', _('Star the current article'), self.__star),
('Read', "gtk-ok", _('_Read'), 'r', _('Toggle the current article read status'), self.__read),
('Preferences', "gtk-preferences", _('_Preferences'), '<control>P', _('Configure the engine'), self.__edit_prefs),
('Update', None, _('_Update'), '<control>U', _('Update the selected feed'), self.__update_feed),
('Update all', "gtk-refresh", _('Update all'), '<control>R', _('Update all feeds'), self.__update_all),
('PreviousArticle', "gtk-go-back", _('Previous Article'), 'b', _('Go to the previous article'), self.__previous_article),
('NextArticle', "gtk-go-forward", _('Next Article'), 'n', _('Go to the next article'), self.__next_article),
('PreviousFeed', "gtk-goto-first", _('Previous Feed'), '<shift>b', _('Go to the previous news feed'), self.__previous_feed),
('NextFeed', "gtk-goto-last", _('Next Feed'), '<shift>n', _('Go to the next news feed'), self.__next_feed),
('StopUpdate', "gtk-stop", _('Stop'), None, _('Stop the current update'), self.__stop_updates),
]
tactions = [
('Find', "gtk-find", _('Find'), '<control>F', _('Search for a term in the articles'), self.__toggle_search),
('FullScreen', "gtk-fullscreen", _('Fullscreen'), 'F11', _('(De)Activate fullscreen'), self.__toggle_fullscreen),
]
self.ag.add_actions(actions)
self.ag.add_toggle_actions(tactions)
# break reconnect into its own group
self.rag = Gtk.ActionGroup("Rec")
ractions = [
('Reconnect', "gtk-disconnect", _('_Reconnect'), None, _('Try and reconnect to the feed engine'), self.__reconnect),
]
self.rag.add_actions(ractions)
self.ui = Gtk.UIManager()
self.ui.insert_action_group(self.mag, 0)
self.ui.insert_action_group(self.ag, 0)
self.ui.insert_action_group(self.rag, 1)
self.ui.add_ui_from_string(ui_string)