[kde-doc-english] [amarok] /: Moved the queue-editor action to main menu.

Bart Cerneels bart.cerneels at kde.org
Fri Jun 17 14:58:57 CEST 2011


Git commit 9253b38488d9ab012e26530e8946c500c4bb93e7 by Bart Cerneels.
Committed on 17/06/2011 at 14:57.
Pushed by shanachie into branch 'master'.

Moved the queue-editor action to main menu.

To save more space in the playlist toolbar.
Now also has a keyboard shortcut: Meta+U.

GUI:

M  +2    -0    ChangeLog     
M  +9    -2    src/MainWindow.cpp     
M  +0    -6    src/playlist/PlaylistDock.cpp     

http://commits.kde.org/amarok/9253b38488d9ab012e26530e8946c500c4bb93e7

diff --git a/ChangeLog b/ChangeLog
index 5bbdb75..014640b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,8 @@ VERSION 2.4.2-Beta 1
     * Option to hide the OSD if another window is taking the full screen
 
   CHANGES:
+    * Moved the queue-editor action to the main menu under playlist to save space.
+      Queue editor now has a shortcut: Meta+U.
     * Removed the redo action from the playlist toolbar to make it less wide.
     * Made some playlist toolbar actions collapse into a menu button for use on
       small screens.
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index ba7f9b7..09dead0 100644
--- a/src/MainWindow.cpp
+++ b/src/MainWindow.cpp
@@ -237,6 +237,9 @@ MainWindow::init()
     PERF_LOG( "Create Playlist" )
     m_playlistDock = new Playlist::Dock( this );
     m_playlistDock.data()->installEventFilter( this );
+    //HACK, need to connect after because of order in MainWindow()
+    connect( Amarok::actionCollection()->action( "playlist_edit_queue" ),
+             SIGNAL( triggered( bool ) ), m_playlistDock.data(), SLOT( slotEditQueue() ) );
     PERF_LOG( "Playlist created" )
 
     PERF_LOG( "Creating ContextWidget" )
@@ -717,8 +720,11 @@ MainWindow::createActions()
     connect( action, SIGNAL( triggered( bool ) ), pc, SLOT( clear() ) );
     ac->addAction( "playlist_clear", action );
 
-    action = new KAction( KIcon( "format-list-ordered" ), i18nc( "edit play queue of playlist", "Edit &Queue" ), this );
-    ac->addAction( "playlist_edit_queue", action );
+    action = new KAction( KIcon( "format-list-ordered" ),
+                          i18nc( "edit play queue of playlist", "Edit &Queue" ), this );
+    //Qt::META+Qt::Key_Q is taken by Plasma as a global
+    action->setShortcut( KShortcut( Qt::META + Qt::Key_U ) );
+    ac->addAction( "playlist_edit_queue", action );;
 
     action = new KAction( i18nc( "Remove duplicate and dead (unplayable) tracks from the playlist", "Re&move Duplicates" ), this );
     connect( action, SIGNAL( triggered( bool ) ), pc, SLOT( removeDeadAndDuplicates() ) );
@@ -1021,6 +1027,7 @@ MainWindow::createMenus()
     playlistMenu->addAction( Amarok::actionCollection()->action("playlist_clear") );
     playlistMenu->addAction( Amarok::actionCollection()->action("playlist_remove_dead_and_duplicates") );
     playlistMenu->addAction( Amarok::actionCollection()->action("playlist_layout") );
+    playlistMenu->addAction( Amarok::actionCollection()->action("playlist_edit_queue") );
     //END Playlist menu
 
     //BEGIN Tools menu
diff --git a/src/playlist/PlaylistDock.cpp b/src/playlist/PlaylistDock.cpp
index fbdf8c3..504f63c 100644
--- a/src/playlist/PlaylistDock.cpp
+++ b/src/playlist/PlaylistDock.cpp
@@ -209,12 +209,6 @@ Playlist::Dock::polish()
 
         playlistActions->addAction( Amarok::actionCollection()->action( "show_active_track" ) );
 
-        QAction *queueEditAction = Amarok::actionCollection()->action( "playlist_edit_queue" );
-        connect( queueEditAction, SIGNAL( triggered( bool ) ),
-                 SLOT( slotEditQueue() ) );
-
-        playlistActions->addAction( queueEditAction );
-
         plBar->addCollapsibleActions( playlistActions );
 
         NavigatorConfigAction *navigatorConfig = new NavigatorConfigAction( m_mainWidget );


More information about the kde-doc-english mailing list