Commit 9ed36e35 authored by Michael Pyne's avatar Michael Pyne

Fix bug 88275 by introducing an action menu that can be plugged into the...

Fix bug 88275 by introducing an action menu that can be plugged into the toolbar to control random play, along with some renaming to make them easy to tell apart.

The action that brings up the menu is called "Random Play", while the various options are still individual KActions.

Random Play is what you want to add to your toolbar, not Use Random Play.

I've also added some icons for the different random play possibilities, but they aren't great IMO.  If anyone would like to make one or point me to some good ones, I'd appreciate it. :)

CCMAIL:88275-done@bugs.kde.org

svn path=/trunk/kdemultimedia/juk/; revision=342317
parent b1933ed2
......@@ -111,14 +111,20 @@ void JuK::setupActions()
KStdAction::clear(kapp, SLOT(clear()), actions());
KStdAction::selectAll(kapp, SLOT(selectAll()), actions());
KToggleAction *ka = new KRadioAction(i18n("&Album Random Play"), 0, actions(), "albumRandomPlay");
ka->setExclusiveGroup("randomPlayGroup");
KActionMenu *actionMenu = new KActionMenu("Random Play", "roll", actions(), "actionMenu");
actionMenu->setDelayed(false);
ka = new KRadioAction(i18n("Option for disabled random play mode", "&Disabled"), 0, actions(), "disableRandomPlay");
KRadioAction *ka = new KRadioAction(i18n("&Disable Random Play"), "player_playlist", 0, actions(), "disableRandomPlay");
ka->setExclusiveGroup("randomPlayGroup");
actionMenu->insert(ka);
m_randomPlayAction = new KRadioAction(i18n("&Random Play"), 0, actions(), "randomPlay");
m_randomPlayAction = new KRadioAction(i18n("Use &Random Play"), "roll", 0, actions(), "randomPlay");
m_randomPlayAction->setExclusiveGroup("randomPlayGroup");
actionMenu->insert(m_randomPlayAction);
ka = new KRadioAction(i18n("Use &Album Random Play"), "roll", 0, actions(), "albumRandomPlay");
ka->setExclusiveGroup("randomPlayGroup");
actionMenu->insert(ka);
new KAction(i18n("&Play"), "player_play", 0, m_player, SLOT(play()), actions(), "play");
new KAction(i18n("P&ause"), "player_pause", 0, m_player, SLOT(pause()), actions(), "pause");
......
<!DOCTYPE kpartgui>
<kpartgui name="juk" version="5">
<kpartgui name="juk" version="6">
<MenuBar>
<Menu name="file" noMerge="1"><text>&amp;File</text>
<Action name="file_new"/>
......@@ -35,11 +35,7 @@
<Action name="viewModeMenu"/>
</Menu>
<Menu name="player"><text>&amp;Player</text>
<Menu name="randomPlayMenu"><text>&amp;Random Play</text>
<Action name="disableRandomPlay"/>
<Action name="randomPlay"/>
<Action name="albumRandomPlay"/>
</Menu>
<Action name="actionMenu"/>
<Action name="loopPlaylist"/>
......
<!-- PLEASE UPDATE jukui-rtl.rc WHEN UPDATING THIS FILE -->
<!DOCTYPE kpartgui>
<kpartgui name="juk" version="5">
<kpartgui name="juk" version="6">
<MenuBar>
<Menu name="file" noMerge="1"><text>&amp;File</text>
<Action name="file_new"/>
......@@ -37,11 +37,7 @@
<Action name="viewModeMenu"/>
</Menu>
<Menu name="player"><text>&amp;Player</text>
<Menu name="randomPlayMenu"><text>&amp;Random Play</text>
<Action name="disableRandomPlay"/>
<Action name="randomPlay"/>
<Action name="albumRandomPlay"/>
</Menu>
<Action name="actionMenu"/>
<Action name="loopPlaylist"/>
......
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