diff options
author | root <root@ghunt-desktop.(none)> | 2010-11-15 00:48:03 (GMT) |
---|---|---|
committer | root <root@ghunt-desktop.(none)> | 2010-11-15 00:48:03 (GMT) |
commit | 8e4465bd5598173eaccf228b95450a1c156834b7 (patch) | |
tree | b233e3c01b0e8c5ac5e019554cc2bcff073f5ea2 /project_gui.py | |
parent | 2d2e22530e07dc0e1801e31cce61f30841e77c46 (diff) |
build 650 sourceview markers, embeds, and xo bundles to journal
Diffstat (limited to 'project_gui.py')
-rw-r--r-- | project_gui.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/project_gui.py b/project_gui.py index 115338b..18ae66d 100644 --- a/project_gui.py +++ b/project_gui.py @@ -808,7 +808,7 @@ class DataStoreTree(): self.journal_model.clear() ds_list = [] num_found = 0 - mime_list = [self._activity.MIME_TYPE,'application/zip'] + mime_list = [self._activity.MIME_TYPE,self._activity.MIME_ZIP] #build 650 doesn't seem to understand correctly the dictionary with a list right hand side info = self._activity.util.sugar_version() @@ -825,14 +825,19 @@ class DataStoreTree(): (results,count) = datastore.find({'mime_type': self._activity.MIME_TYPE}) ds_list.extend(results) num_found += count - (results,count) = datastore.find({'mime_type': 'application/zip'}) + (results,count) = datastore.find({'mime_type': self._activity.MIME_ZIP}) ds_list.extend(results) + num_found += count except Exception,e: - _logger.error('datastore error %s'%e) - return [] + _logger.exception('datastore error %s'%e) + return + + #sort the list around mtime + ds_list = sorted(ds_list, key=lambda entry: entry.get_metadata().get('mtime'), reverse=True) if num_found < self.limit: self.journal_max = self.journal_page_num * self.journal_page_size + num_found _logger.debug( 'datastoretree-get_datastore_list: count= %s'%num_found) + keys = ('title','size','timestamp','activity','package','mime_type','file_path') for jobject in ds_list: itemlist = [None,] |