Merge lp://staging/~stolowski/unity-lens-files/unity-lens-files.previews into lp://staging/unity-lens-files
Proposed by
Paweł Stołowski
Status: | Merged |
---|---|
Approved by: | Michal Hruby |
Approved revision: | 251 |
Merged at revision: | 232 |
Proposed branch: | lp://staging/~stolowski/unity-lens-files/unity-lens-files.previews |
Merge into: | lp://staging/unity-lens-files |
Diff against target: |
389 lines (+246/-35) 5 files modified
configure.ac (+1/-1) src/daemon.vala (+208/-7) src/folder.vala (+11/-1) src/locate.vala (+11/-11) src/utils.vala (+15/-15) |
To merge this branch: | bzr merge lp://staging/~stolowski/unity-lens-files/unity-lens-files.previews |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michal Hruby (community) | Approve | ||
Review via email:
|
Commit message
Implemented support for previews.
Description of the change
Implemented support for previews.
To post a comment you must log in.
First of all, please bump the required libunity version to 5.93 in configure script.
8 + scope.preview_ uri.connect (preview);
Wrong indent.
16 + private void count_directory _items (string top_dir, ref int count, ref int64 total_size, bool recurse=false)
Can you rename the top_dir to express clearly if it's a uri or a path? (I see File.new_for_uri, and "string path" later). Or perhaps pass it a File + use File.get_child()).
61 + return "%lld B".printf (size);
The format string differs for 32 and 64bit machines, use int64.FORMAT
69 + return "%.1f GB".printf ((float)size / (1000*1000*1000));
I'm not sure if we're supposed to use 10-based or 2^10-based numbers, IIRC the filters use 2^10, but there's lp:882352.
74 + debug (@"Previewing: $uri");
Please don't use template strings in functions which support printf-formatting.
More generally, there are quite a few uncaught exceptions that vala reports, would be nice to handle those (especially when inside loops - see the count* method).
Also too many warnings about deprecated FILE_ATTRIBUTE usage, we now require vala 0.16, so running a tiny sed on the sources would be awesome ;)