Results 1 to 3 of 3
  1.    #1  
    So I pretty much hate the album art view on the Pre. It really needs a progress bar, plus it is just a big waste of screen space. I don't really care to see a skewed album art image, especially since I listen to a number of podcasts that don't even have them. The list view is much more informative, shows your upcoming songs, has a progress bar, etc. So to set it to default to list view do this:

    1: On your rooted pre open /usr/palm/applications/com.palm.app.musicplayer/app/controllers/localnowplaying-assistant.jsjsjs $with$ $your$ $favorite$ $text$ $editor$. $I$ $used$ $vi$, $because$ $that$'$s$ $what$ $cool$ $people$ $use$.
    2: GoTo line 1780 or so. For me I wanted to be on line 1807 because I have some lines added for the musicplayer bookmaring hack, but it should be somewhere around there for those who don't. You want a line that has get('toggle-list-view') under the showListView function.
    3: Replace toggle-list-view with album-art-view
    4: Go down one line and replace album-art-view with toggle-list-view
    5: Go down one line and replace list-view-div with album-art-div
    6: Go down one line and replace album-art-div with list-view-div
    7: Go down about 26 lines to where it says get('list-view-div') in the _doShowAlbumView function
    8: Replace list-view-div with album-art-div
    9: Go down one line and replace album-art-div with list-view-div
    10: Go down two lines and replace album-art-view with toggle-list-view
    11: Go down one line and replace toggle-list-view with album-art-view
    12: Save the file
    13: You should be done! If it doesn't work or your Pre explodes, I forbid you from suing myself, PreCentral, Google, or your left hand. Seriously, YOU HAVE BEEN FORBIDDEN...

    I thought this hack might do some weird thing like swapping it so the album view button actually brings up list view, but it instead acts exactly as one would expect it to if list view was the normal default. Sweet.

    Someone who has access to the wiki should post this or give me an account so I can or something. If you do post it, you should credit "that dude on the forum" as to keep things nice and vague.
  2. #2  
    Thanks for the hack!

    Could you perhaps post the entire segment of code with all the changes?
  3. #3  
    Ok, so there was actually quite a bit more involved in getting this working right. I also found a bug or two in the Music Player application. I probably didn't do a completely optimal refactoring, but here's the patch:


    --- localnowplaying-assistant.jsjsjs.$bak$ $2009$-$07$-$01$ $03$:$32$:$10$.$000000000$ -$0500$
    +++ localnowplaying-assistant.jsjsjs $2009$-$07$-$02$ $02$:$00$:$41$.$000000000$ -$0500$
    @@ -50,8 +50,8 @@
    }


    - // default to the full screen album art view
    - this.showAlbumView(true);
    + // default to the list view
    + this.showListView(true);

    if (this.loadNewPlaylist){
    this.playlistDoneLoading = false;
    @@ -396,6 +396,9 @@
    var songNum = this.musicPlayer.playlist.getCurrentSongNum();
    var list = this.controller.get('song_list');
    var seekToNum = Math.min(list.mojo.getLength(), songNum+1);
    + if (seekToNum == list.mojo.getLength()) {
    + seekToNum--;
    + }
    var node = list.mojo.getNodeByIndex (songNum);


    @@ -415,7 +418,6 @@
    var fetchOffset;
    var numsToFetch = this.LONG_SCROLL_DISTANCE * 4;

    -
    // otherwise we will jump to an item near it (smoothScroll = false) and then smoothScroll the rest of the way
    if (songNum < first){
    // seeking backward
    @@ -457,8 +459,8 @@
    {
    var scroller = Mojo.View.getScrollerForElement(list);
    var top = Mojo.View.viewportOffset(node).top;
    -
    - if (top > 380 || top < 80)
    + top = Math.round(top * 0.6);
    + if (top > 320 || top < 80)
    scroller.mojo.scrollTo(undefined, scroller.mojo.getState().top + 200-top, animate);
    } else {
    list.mojo.revealItem (index, animate);
    @@ -1745,52 +1747,52 @@
    },

    /**
    - * Hide the album view, show the list view
    + * Hide the list view, show the art view
    */
    - showListView: function(){
    + showArtView: function(){
    var transition = this.controller.prepareTransition(Mojo.Transition.crossFade);

    - if (this.playSongTimer){
    - this.stopPlayTimer();
    - this.playCurrentSong();
    - }
    -
    - this.listIsShowing = true;
    -
    - this.controller.get('toggle-album-view').removeClassName('depressed');
    - this.controller.get('toggle-list-view').addClassName('depressed');
    - this.controller.get('album-art-div').hide();
    - this.controller.get('list-view-div').show();
    - this._updateTime(true);
    - this.smartRevealItem(false);
    -
    - transition.run();
    -
    + this._refreshAlbumArt(function(){
    + this._doShowArtView();
    + transition.run();
    + }.bind(this));
    + },
    +
    + _doShowArtView: function(){
    + this.controller.get('toggle-list-view').removeClassName('depressed');
    + this.controller.get('toggle-album-view').addClassName('depressed');
    + this.listIsShowing = false;
    + this.controller.get('list-view-div').hide();
    + this.controller.get('album-art-div').show();
    },

    /**
    - * Show the album view, hide the list view
    + * Show the list view, hide the album view
    */
    - showAlbumView: function(firstTime){
    + showListView: function(firstTime){
    var transition = null;
    if (!firstTime){
    var transition = this.controller.prepareTransition(Mojo.Transition.crossFade);
    - this._refreshAlbumArt(function(){
    - this._doShowAlbumView();
    - transition.run();
    - }.bind(this));
    + this._doShowListView();
    + this._updateTime(true);
    + this.smartRevealItem(false);
    + transition.run();
    } else {
    - this._doShowAlbumView();
    + this._doShowListView();
    }
    -
    },

    - _doShowAlbumView: function(){
    - this.controller.get('list-view-div').hide();
    - this.controller.get('album-art-div').show();
    - this.listIsShowing = false;
    - this.controller.get('toggle-list-view').removeClassName('depressed');
    - this.controller.get('toggle-album-view').addClassName('depressed');
    + _doShowListView: function(){
    + if (this.playSongTimer){
    + this.stopPlayTimer();
    + this.playCurrentSong();
    + }
    +
    + this.controller.get('album-art-div').hide();
    + this.controller.get('list-view-div').show();
    + this.listIsShowing = true;
    + this.controller.get('toggle-album-view').removeClassName('depressed');
    + this.controller.get('toggle-list-view').addClassName('depressed');
    },

    /**
    @@ -1798,7 +1800,7 @@
    */
    toggleViews: function(){
    if (this.listIsShowing)
    - this.showAlbumView();
    + this.showArtView();
    else
    this.showListView();
    },

Tags for this Thread

Posting Permissions