+
+ /* Playlist sorting */
+ if( !sortingMenu )
+ {
+ sortingMenu = new QMenu( qtr( "Sort by" ) );
+ sortingMapper = new QSignalMapper( this );
+ /* Choose what columns to show in sorting menu, not sure if this should be configurable*/
+ QList<int> sortingColumns;
+ sortingColumns << COLUMN_TITLE << COLUMN_ARTIST << COLUMN_ALBUM << COLUMN_TRACK_NUMBER << COLUMN_URI;
+ foreach( int Column, sortingColumns )
+ {
+ QAction *asc = sortingMenu->addAction( qfu( psz_column_title( Column ) ) + " " + qtr("Ascending") );
+ QAction *desc = sortingMenu->addAction( qfu( psz_column_title( Column ) ) + " " + qtr("Descending") );
+ sortingMapper->setMapping( asc, columnFromMeta(Column) + 1 );
+ sortingMapper->setMapping( desc, -1 * (columnFromMeta(Column)+1) );
+ CONNECT( asc, triggered(), sortingMapper, map() );
+ CONNECT( desc, triggered(), sortingMapper, map() );
+ }
+ CONNECT( sortingMapper, mapped( int ), this, popupSort( int ) );
+ }
+ menu.addMenu( sortingMenu );
+
+ /* Zoom */
+ QMenu *zoomMenu = new QMenu( qtr( "Display size" ) );
+ zoomMenu->addAction( qtr( "Increase" ), this, SLOT( increaseZoom() ) );
+ zoomMenu->addAction( qtr( "Decrease" ), this, SLOT( decreaseZoom() ) );
+ menu.addMenu( zoomMenu );
+
+ /* Store the current selected item for popup*() methods */
+ current_selection = list;
+
+ /* Display and forward the result */