extragear/multimedia/amarok/src
Dan Meltzer
hydrogen at notyetimplemented.com
Sun Dec 17 03:21:33 UTC 2006
Mark Kretschmann wrote:
Will this work properly if my focus is on the search bar and I press
space (to denote a space in the search term) or will it trigger
play_pause there as well?
Just asking, I can't check currently as no access to linux at home.
> SVN commit 614153 by markey:
>
> Add local shortcut for Play/Pause. I've set the default to the space key, as I find that really handy in Codeine.
>
> CCBUG: 107053
>
>
> M +2 -0 playlist.cpp
> M +8 -6 playlistwindow.cpp
>
>
> --- trunk/extragear/multimedia/amarok/src/playlist.cpp #614152:614153
> @@ -325,9 +325,11 @@
>
> { // KAction idiocy -- shortcuts don't work until they've been plugged into a menu
> KPopupMenu asdf;
> +
> copy->plug( &asdf );
> stopafter->plug( &asdf );
> gotoCurrent->plug( &asdf );
> +
> copy->unplug( &asdf );
> stopafter->unplug( &asdf );
> gotoCurrent->unplug( &asdf );
> --- trunk/extragear/multimedia/amarok/src/playlistwindow.cpp #614152:614153
> @@ -145,12 +145,12 @@
> actionCollection()->action("playlist_burn")->setEnabled( K3bExporter::isAvailable() );
> new KAction( i18n("Play Media..."), Amarok::icon( "files" ), 0, this, SLOT(slotPlayMedia()), ac, "playlist_playmedia" );
> new KAction( i18n("Play Audio CD"), Amarok::icon( "album" ), 0, this, SLOT(playAudioCD()), ac, "play_audiocd" );
> + KAction *playPause = new KAction( i18n( "&Play/Pause" ), Amarok::icon( "play" ), Key_Space, ec, SLOT( playPause() ), ac, "play_pause" );
> new KAction( i18n("Script Manager"), Amarok::icon( "scripts" ), 0, this, SLOT(showScriptSelector()), ac, "script_manager" );
> new KAction( i18n("Queue Manager"), Amarok::icon( "queue" ), 0, this, SLOT(showQueueManager()), ac, "queue_manager" );
> new KAction( i18n("Statistics"), Amarok::icon( "info" ), 0, this, SLOT(showStatistics()), ac, "statistics" );
> new KAction( i18n("Update Collection"), Amarok::icon( "refresh" ), 0, CollectionDB::instance(), SLOT( scanModifiedDirs() ), actionCollection(), "update_collection" );
>
> -
> m_lastfmTags << "Alternative" << "Ambient" << "Chill Out" << "Classical" << "Dance"
> << "Electronica" << "Favorites" << "Heavy Metal" << "Hip Hop" << "Indie Rock"
> << "Industrial" << "Japanese" << "Pop" << "Psytrance" << "Rap" << "Rock"
> @@ -191,12 +191,14 @@
> new KAction( i18n( "Pause" ), Amarok::icon( "pause" ), 0, ec, SLOT( pause() ), ac, "pause" );
> new KAction( i18n( "Next Track" ), Amarok::icon( "next" ), 0, ec, SLOT( next() ), ac, "next" );
>
> - {
> - KAction *gah = new KAction( i18n( "Toggle Focus" ), "reload", CTRL+Key_Tab,
> - this, SLOT( slotToggleFocus() ), ac, "toggle_focus" );
> + KAction *toggleFocus = new KAction( i18n( "Toggle Focus" ), "reload", CTRL+Key_Tab, this, SLOT( slotToggleFocus() ), ac, "toggle_focus" );
> +
> + { // KAction idiocy -- shortcuts don't work until they've been plugged into a menu
> KPopupMenu asdf;
> - gah->plug( &asdf );
> - gah->unplug( &asdf );
> + playPause->plug( &asdf );
> + toggleFocus->plug( &asdf );
> + playPause->unplug( &asdf );
> + toggleFocus->unplug( &asdf );
> }
>
> new Amarok::MenuAction( ac );
>
More information about the Amarok
mailing list