Merge lp://qastaging/~stolowski/unity-lens-video/unity-lens-video.previews into lp://qastaging/unity-lens-video

Proposed by Paweł Stołowski
Status: Merged
Approved by: Michal Hruby
Approved revision: 95
Merged at revision: 85
Proposed branch: lp://qastaging/~stolowski/unity-lens-video/unity-lens-video.previews
Merge into: lp://qastaging/unity-lens-video
Diff against target: 108 lines (+63/-1)
1 file modified
src/unity-lens-video (+63/-1)
To merge this branch: bzr merge lp://qastaging/~stolowski/unity-lens-video/unity-lens-video.previews
Reviewer Review Type Date Requested Status
Michal Hruby (community) Approve
Unity Videos lens Pending
Review via email: mp+118720@code.qastaging.launchpad.net

Commit message

Implementation of previews.

Description of the change

Initial implementation of previews.

To post a comment you must log in.
89. By Paweł Stołowski

Preview: require Gst/GstPbutils 1.0. Combined width, height info hints into "Dimensions" hint with aspect ratio.

90. By Paweł Stołowski

Preview: added 'Size' hint. Changed order of Format & Dimensions hints.

91. By Paweł Stołowski

Preview: use GLib.format_size function instead of custom one.

Revision history for this message
Michal Hruby (mhr3) wrote :

51 + while iter != end_iter:
52 + if model.get_value(iter, 0) == uri:

Linear iteration of the model :/ Not too nice, but hopefully it shouldn't be too much of an issue. s/get_value/get_string/

72 + preview.add_info(Unity.InfoHint.new("dimensions", "Dimensions", None, dimensions))

Please use gettext for the user-visible strings.

GLib.format_size(os.path.getsize(uri[7:]))))

Uris escape some characters, so they don't map exactly to path, this should be fixed.

87 + return Unity.ActivationResponse(goto_uri=uri, handled=2 )

Just because this is python doesn't make it ok to use numeric values for enums :) Anyway, you don't really need to connect to the activated signal here, the activation response will by default return NOT_HANDLED, so unity will run the default handler for the file.

review: Needs Fixing
92. By Paweł Stołowski

Previews: properly handle uri when passing it to os.path.getsize().
Use is_last and get_string when iterating over dee model.

93. By Paweł Stołowski

Previews: added 'Show in folder' action for local videos.

94. By Paweł Stołowski

Previews: display modification time as subtitle.

95. By Paweł Stołowski

Previews: use gettext for user-visible strings.

Revision history for this message
Michal Hruby (mhr3) wrote :

Looking good now. +1

review: Approve

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