Merge lp://staging/~azzar1/unity-lens-files/add-filesystem-icons into lp://staging/unity-lens-files

Proposed by Andrea Azzarone
Status: Merged
Approved by: Paweł Stołowski
Approved revision: 240
Merged at revision: 237
Proposed branch: lp://staging/~azzar1/unity-lens-files/add-filesystem-icons
Merge into: lp://staging/unity-lens-files
Diff against target: 615 lines (+372/-35)
3 files modified
src/daemon.vala (+95/-4)
src/folder.vala (+236/-31)
tests/manual/folders.txt (+41/-0)
To merge this branch: bzr merge lp://staging/~azzar1/unity-lens-files/add-filesystem-icons
Reviewer Review Type Date Requested Status
Paweł Stołowski (community) Approve
Review via email: mp+119991@code.staging.launchpad.net

Commit message

Add filesystem icons in the "Folders" category of the files lens.

Description of the change

Manual test added. It's my first time with Vala so forgive me for my errors :)

To post a comment you must log in.
234. By Andrea Azzarone

Change uri prefix.

Revision history for this message
Paweł Stołowski (stolowski) wrote :

Hi Andrea, nice job, it works well and looks good, however it's missing support for recently introduced previews - if you right-click on a device icon in the dash, an empty preview is displayed and an error is printed to the stderr:

(process:3255): unity-files-daemon-WARNING **: daemon.vala:1042: Couldn't stat file: 'device://099A-74A7'

Could you please check with design what would they like to see as a device preview and implement the missing bits in the preview(..) method?

Manual tests should now follow the format requested by QA - see TEST_TEMPLATE.txt in unity source code. I know existing tests don't follow it (and need to be fixed), but when we introduce new tests file we should stick to the new format.

Also some minor comments:

This can fail and throw GLib.Error:
415 + AppInfo.launch_default_for_uri (get_volume_uri (), null);

Formatting issues (spaces missing):
363 + public Volume volume {get; set construct; }

378 + Object (volume:volume, uri:"device://"+uuid, icon:icon_name, display_name:name, dnd_uri:"device://"+uuid);

review: Needs Fixing
Revision history for this message
Andrea Azzarone (azzar1) wrote :

> Hi Andrea, nice job, it works well and looks good, however it's missing
> support for recently introduced previews - if you right-click on a device icon
> in the dash, an empty preview is displayed and an error is printed to the
> stderr:
>
> (process:3255): unity-files-daemon-WARNING **: daemon.vala:1042: Couldn't stat
> file: 'device://099A-74A7'
>
> Could you please check with design what would they like to see as a device
> preview and implement the missing bits in the preview(..) method?

Hey thank you for the review and sorry for the delay (I was quite busy).
I'll add preview support (already talked with John Lea about it).

>
> Manual tests should now follow the format requested by QA - see
> TEST_TEMPLATE.txt in unity source code. I know existing tests don't follow it
> (and need to be fixed), but when we introduce new tests file we should stick
> to the new format.
>

Will do.

> Also some minor comments:
>
> This can fail and throw GLib.Error:
> 415 + AppInfo.launch_default_for_uri (get_volume_uri (), null);
>
>
> Formatting issues (spaces missing):
> 363 + public Volume volume {get; set construct; }
>
> 378 + Object (volume:volume, uri:"device://"+uuid, icon:icon_name,
> display_name:name, dnd_uri:"device://"+uuid);

Will fix.

235. By Andrea Azzarone

Merge trunk.

236. By Andrea Azzarone

Add space.

237. By Andrea Azzarone

Fix manual test.

238. By Andrea Azzarone

Add preview support for file system icons.

239. By Andrea Azzarone

Fix warnings.

Revision history for this message
Andrea Azzarone (azzar1) wrote :

*poke*

Revision history for this message
Paweł Stołowski (stolowski) wrote :

The preview looks fine, but I found a general problem with how uri for device item is constructed: if you plug a device with more than 1 partition, you get same uris for all partitions. I've a usb stick with 2 partitions (each partition has a different name though), and get 2 "device://0012-D687" uris for them. Left clicking on such item in the dash will always activate the same partition; also preview navigation (left/right arrow in the preview) is misbehaving in such case.

review: Needs Fixing
Revision history for this message
Andrea Azzarone (azzar1) wrote :

Maybe we can use mount point to build the uri. It should be easy enough to change.

240. By Andrea Azzarone

Use mount point as IDs.

Revision history for this message
Andrea Azzarone (azzar1) wrote :

Ok I've updated the branch to use mount point as IDs. I need to update unity trunk too.

Revision history for this message
Paweł Stołowski (stolowski) wrote :

yes, that sounds like a good fix.

Revision history for this message
Paweł Stołowski (stolowski) wrote :

Yay, it works now! Thanks!

review: Approve
Revision history for this message
Andrea Azzarone (azzar1) wrote :

MMM we cannot use the mount point because if the volume is not mounted volume.get_activation_root() always return null (it shouldn't, but it does here). Btw I've a pen drive with two partitions and they have two different uris.

Revision history for this message
Paweł Stołowski (stolowski) wrote :

Uh, how about falling back to volume name or something else?
My pendrive may be a special case as it has two *factory* made partitions that you cannot remove (it's a MySQL-branded usb stick I got during last UDS).

Revision history for this message
Andrea Azzarone (azzar1) wrote :

Let's try with label :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches