Skip to content

Commit

Permalink
Make Events complete unless otherwise specified, misc cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
BjarniRunar committed Oct 25, 2014
1 parent 846acca commit 28ca79f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion mailpile/command_cache.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import time

import mailpile.util
from mailpile.eventlog import Event
from mailpile.i18n import gettext as _
from mailpile.i18n import ngettext as _n
from mailpile.util import *
Expand Down Expand Up @@ -88,4 +89,5 @@ def refresh(self, extend=60, event_log=None):
if refreshed and event_log:
event_log.log(message=_('New results are available'),
source=self,
data={'cache_ids': refreshed})
data={'cache_ids': refreshed},
flags=Event.COMPLETE)
1 change: 1 addition & 0 deletions mailpile/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ def _create_event(self):
def _make_command_event(self, private_data):
return Event(source=self,
message=self._fmt_msg(self.LOG_STARTING),
flags=Event.INCOMPLETE,
data={},
private_data=private_data)

Expand Down
2 changes: 1 addition & 1 deletion mailpile/eventlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def Parse(cls, json_string):
return cls()

def __init__(self,
ts=None, event_id=None, flags='C', message='',
ts=None, event_id=None, flags='c', message='',
source=None, data=None, private_data=None):
self._data = [
'',
Expand Down
2 changes: 1 addition & 1 deletion mailpile/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def pop_marks(self, name=None, quiet=True):
if len(self.time_tracking) > 1:
if not name or (self.time_tracking[-1][0] == name):
self.time_tracking.pop(-1)
print '(%s/%d) POP' % (self, len(self.time_tracking))
# print '(%s/%d) POP' % (self, len(self.time_tracking))
return elapsed

# Higher level command-related methods
Expand Down

0 comments on commit 28ca79f

Please sign in to comment.