Merge lp://staging/~shockone89/audience/fix-1163695 into lp://staging/~audience-members/audience/trunk

Proposed by Volodymyr Shatsky
Status: Merged
Merged at revision: 258
Proposed branch: lp://staging/~shockone89/audience/fix-1163695
Merge into: lp://staging/~audience-members/audience/trunk
Diff against target: 132 lines (+48/-9)
5 files modified
Audience/Audience.vala (+36/-0)
Audience/Utils.vala (+8/-6)
Audience/Widgets/MediaSlider.vala (+1/-1)
Audience/Widgets/TagView.vala (+2/-2)
Audience/Widgets/VideoPlayer.vala (+1/-0)
To merge this branch: bzr merge lp://staging/~shockone89/audience/fix-1163695
Reviewer Review Type Date Requested Status
Tom Beckmann Approve
Review via email: mp+157280@code.staging.launchpad.net

Description of the change

MediaSlider now keeps the aspect ratio; Title isn't cut on the first dot and displays apostrophes correctly

To post a comment you must log in.
Revision history for this message
David Gomes (davidgomes) wrote :

replace ("%7D", "}").replace ("_", " ").replace ("."," ").

replace ("%7D", "}").replace ("_", " ").replace (".", " ").

replace (" "," ").replace ("%60", "\'");

replace (" ", " ").replace ("%60", "\'");

controls.slider.preview.width = (float)video_width / video_height * controls.slider.preview.height;

controls.slider.preview.width = (float) video_width / video_height * controls.slider.preview.height;

252. By Volodymyr Shatsky

Fixed formatting. Add audio and subtitles shortcuts

253. By Volodymyr Shatsky

Move debug information calls

Revision history for this message
Volodymyr Shatsky (shockone89) wrote :

Done.

Revision history for this message
Tom Beckmann (tombeckmann) wrote :

Looks pretty awesome to me, good job!

For the aspect ratio in the preview, for 16:9 we now get a small overflow on the sides, but I suppose that doesn't really matter all that much.

Audio switching looks fine to me, you'd just have to update the currently set track in the UI too.

Text switching is a bit more problematical. Updating the UI is obviously required here as well, but the cycling should include turning off. You could fallback to the videoplayer's current-text property instead of the playbin's which is supposed to handle this by turning subtitles off when set to -1 (but that's still quite buggy for unknown reasons), so once we got it working there, the cycling will work fine too.

Looking at the get_basename function now, I wonder why I wrote it that complicated. If you want to invest some more time in it, you may want to consider using string.last_index_of instead of the loop. Otherwise it works fine with your fix and we'd revisit that later.

And on a last, small note, you got a typo at the preview width line ("priview").

Once you fixed those issues we can merge the branch, and that's why one usually creates a separate branch for each fix, so we can merge them sooner ;)

Revision history for this message
Tom Beckmann (tombeckmann) :
review: Needs Fixing
Revision history for this message
Cody Garver (codygarver) wrote :

It would be better if you submitted one branch per bug fix.

254. By Volodymyr Shatsky

Switching audio or subtitles from keyboard now changes the combobox in UI

Revision history for this message
Volodymyr Shatsky (shockone89) wrote :

Sorry about branches, I'm not very comfortable with bzr. Will do.

What is the cause of the overflow. Could we fix it casting the number to int?

In order to sync audio and subtitles switching, I had to make these fields in TagView public:
public Gtk.ComboBoxText languages;
public Gtk.ComboBoxText subtitles;
Yeah, dealing with disabled subtitles was a bit complicated, currently I'm getting the value directly from the combobox — the only way it works properly.

I tried to rewrite the utility methods with last_index_of_char, but it produced a lot of errors, so I changed it back.
https://dl.dropbox.com/u/608214/scrn/1365231619.png . I think it would be easy to fix adding some NULL checks, but it would became clumsy and not so much better than the old variant. Besides, for loop works faster ☺.

Do you receive a notification, when I push into this repo, or should I write a comment?

255. By Volodymyr Shatsky

Small formatting fix

Revision history for this message
Tom Beckmann (tombeckmann) wrote :

Looks good to me now from the code. I'll test it tomorrow, and I'll see if we can get this branch in first lp:~tombeckmann/audience/external-subtitles which possibly fixes subtitle switching, we're still testing on it.

Revision history for this message
Tom Beckmann (tombeckmann) wrote :

Oh and for the notifications, we only receive emails when you comment on the merge request. For commits there'll be no message.

Revision history for this message
Tom Beckmann (tombeckmann) wrote :

I had two fixes two small conflicts, but now it looks like it's working perfectly. Well done!

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