Add refresh command
Let ctrl-r run a sync all projects task in list views, and sync the current change in the change view. Change-Id: I65cfb755bd387b68fe2dbd1562f149adb4421ea1
This commit is contained in:
@@ -67,8 +67,9 @@ class ProjectListHeader(urwid.WidgetWrap):
|
||||
|
||||
class ProjectListView(urwid.WidgetWrap):
|
||||
_help = """
|
||||
<l> Toggle whether only subscribed projects or all projects are listed.
|
||||
<s> Toggle the subscription flag for the currently selected project.
|
||||
<l> Toggle whether only subscribed projects or all projects are listed.
|
||||
<s> Toggle the subscription flag for the currently selected project.
|
||||
<ctrl-r> Sync all projects.
|
||||
"""
|
||||
|
||||
def help(self):
|
||||
@@ -146,6 +147,11 @@ class ProjectListView(urwid.WidgetWrap):
|
||||
if subscribed:
|
||||
self.app.sync.submitTask(sync.SyncProjectTask(project_key))
|
||||
return None
|
||||
if key == 'ctrl r':
|
||||
self.app.sync.submitTask(
|
||||
sync.SyncSubscribedProjectsTask(sync.HIGH_PRIORITY))
|
||||
self.app.status.update()
|
||||
return None
|
||||
return super(ProjectListView, self).keypress(size, key)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user