Commit 017149c3 authored by Simon Hausmann's avatar Simon Hausmann

merged branches/work/kaction-cleanup-branch, courtesy of

Kevin, Laurent, Thomas and me.

svn path=/trunk/KDE/kdemultimedia/juk/; revision=621518
parents d79c77c1 9f29622c
......@@ -34,7 +34,7 @@
#include "viewmode.h"
#include "coverinfo.h"
#include "covermanager.h"
#include <kactioncollection.h>
#include <Q3ValueList>
#include <QDragMoveEvent>
#include <QDropEvent>
......@@ -233,7 +233,8 @@ CollectionList::CollectionList(PlaylistCollection *collection) :
m_itemsDict(5003),
m_columnTags(15, 0)
{
KAction *spaction = new KAction(i18n("Show Playing"), ActionCollection::actions(), "showPlaying");
QAction *spaction = ActionCollection::actions()->addAction("showPlaying");
spaction->setText(i18n("Show Playing"));
connect(spaction, SIGNAL(triggered(bool) ), SLOT(slotShowPlaying()));
connect(action<KToolBarPopupAction>("back")->menu(), SIGNAL(aboutToShow()),
......
......@@ -145,17 +145,21 @@ void JuK::setupActions()
// Setup the menu which handles the random play options.
KActionMenu *actionMenu = new KActionMenu(KIcon("roll"), i18n("&Random Play"), collection, "actionMenu");
KActionMenu *actionMenu = new KActionMenu(KIcon("roll"), i18n("&Random Play"), collection);
collection->addAction("actionMenu",actionMenu);
actionMenu->setDelayed(false);
// ### KDE4: Investigate how QActionGroups integrate into menus now.
QActionGroup* randomPlayGroup = new QActionGroup(this);
KAction *act = new KToggleAction(KIcon("player_playlist"), i18n("&Disable Random Play"), collection, "disableRandomPlay");
act->setActionGroup(randomPlayGroup);
actionMenu->addAction(act);
m_randomPlayAction = new KToggleAction(KIcon("roll"), i18n("Use &Random Play"), collection, "randomPlay");
m_randomPlayAction = collection->add<KToggleAction>("randomPlay");
m_randomPlayAction->setText(i18n("Use &Random Play"));
m_randomPlayAction->setIcon(KIcon("roll"));
m_randomPlayAction->setActionGroup(randomPlayGroup);
actionMenu->addAction(m_randomPlayAction);
......@@ -164,7 +168,10 @@ void JuK::setupActions()
connect(act, SIGNAL(triggered(bool)), SLOT(slotCheckAlbumNextAction(bool)));
actionMenu->addAction(act);
act = new KAction(KIcon("edit_remove"), i18n("Remove From Playlist"), collection, "removeFromPlaylist");
act = collection->addAction("removeFromPlaylist");
act->setText(i18n("Remove From Playlist"));
act->setIcon(KIcon("edit_remove"));
connect(act, SIGNAL(triggered(bool)), clear, SLOT(clear()));
act = new KAction(KIcon("player_play"), i18n("&Play"), collection, "play");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment