Merge lp:~adam-davies/noise/fix-1009325 into lp:~elementary-apps/noise/trunk

Proposed by Adam Davies
Status: Superseded
Proposed branch: lp:~adam-davies/noise/fix-1009325
Merge into: lp:~elementary-apps/noise/trunk
Diff against target: 16 lines (+6/-0)
1 file modified
src/Views/Wrappers/ViewWrapper.vala (+6/-0)
To merge this branch: bzr merge lp:~adam-davies/noise/fix-1009325
Reviewer Review Type Date Requested Status
Victor Martinez (community) Needs Fixing
Review via email: mp+129543@code.launchpad.net

This proposal has been superseded by a proposal from 2012-10-13.

To post a comment you must log in.
Revision history for this message
Victor Martinez (victored) wrote :

There are a couple of things I'd like you to fix before merging:

1) Coding style issues: I can spot some tabs and a different brace placement.
2) Override the key-press-event in src/Views/ListView/Lists/GenericList.vala instead of LibraryWindow.vala. This will fix the issue Cody pointed out in IRC, about the spacebar key presses toggling playback from anywhere inside the application. Also remember to check for modifiers and call the base method: http://bazaar.launchpad.net/~elementary-pantheon/granite/sidebar/view/head:/lib/Widgets/Sidebar.vala#L1253
3) Use the constants defined in the Gdk.Key namespace instead of strings for identifying keys

Thanks in advance for your work!

review: Needs Fixing
lp:~adam-davies/noise/fix-1009325 updated
1067. By Adam Davies

Fixed code style. Switched custom checker to Gdk.key. Moved keydown code to ViewWrapper to work with searchbox

1068. By Adam Davies

Fixed typo

Revision history for this message
David Gomes (davidgomes) wrote :

public override bool key_press_event (Gdk.EventKey event) {
    if (event.keyval == Gdk.Key.space)
        Noise.App.main_window.play_media ();

    return base.key_press_event (event);
}

That is how it should look like.

lp:~adam-davies/noise/fix-1009325 updated
1069. By Adam Davies

Changed from librarywindow.play_media() method to pause and play methods in the Streamer

1070. By Adam Davies

Moved spacebar code back into LibraryWindow. Added check if searchField has focus. Added code to change icon when status is changed

1071. By Adam Davies

Moved code back to ViewWrapper

1072. By Adam Davies

Removed code in ViewWrapper to allow it to work when browsing playlists

1073. By Adam Davies

Changed custom code to use playClicked

1074. By Adam Davies

key_press_event returns true to avoid TreeView row-activate signal

1075. By Adam Davies

Fixed type to search. Changed formatting to match coding style

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Views/Wrappers/ViewWrapper.vala'
2--- src/Views/Wrappers/ViewWrapper.vala 2012-09-18 07:27:36 +0000
3+++ src/Views/Wrappers/ViewWrapper.vala 2012-10-13 03:56:18 +0000
4@@ -124,6 +124,12 @@
5
6 public int media_count { get { return (media_table != null) ? media_table.size : 0; } }
7
8+ public override bool key_press_event (Gdk.EventKey event) {
9+ if(event.keyval == Gdk.Key.space) {
10+ Noise.App.main_window.play_media();
11+ }
12+ return base.key_press_event (event);
13+ }
14 public ViewWrapper (LibraryWindow lw, Hint hint)
15 {
16 this.lm = lw.library_manager;

Subscribers

People subscribed via source and target branches