extragear/multimedia/amarok/src
Seb Ruiz
ruiz at kde.org
Fri Jul 11 02:24:23 CEST 2008
2008/7/11 William Viana Soares <vianasw at gmail.com>:
> SVN commit 830695 by wviana:
>
> Make the current track applet context menu actions fetch, unset and show cover work.
> Also remove RatingWidget unused resizeEvent method.
>
>
>
> M +49 -1 context/applets/currenttrack/CurrentTrack.cpp
> M +3 -0 context/applets/currenttrack/CurrentTrack.h
> M +10 -10 context/widgets/RatingWidget.cpp
> M +1 -1 context/widgets/RatingWidget.h
> M +1 -1 covermanager/CoverFetcher.h
> M +1 -1 covermanager/CoverManager.h
>
>
> --- trunk/extragear/multimedia/amarok/src/context/applets/currenttrack/CurrentTrack.cpp #830694:830695
> @@ -15,6 +15,8 @@
> #include "CurrentTrack.h"
>
> #include "Amarok.h"
> +#include "covermanager/CoverFetcher.h"
> +#include "covermanager/CoverManager.h"
> #include "Debug.h"
> #include "EngineController.h"
> #include "context/Svg.h"
> @@ -22,7 +24,9 @@
>
> #include <plasma/theme.h>
>
> -#include <KIconLoader>
> +#include <KApplication>
> +#include <KIcon>
> +#include <KMessageBox>
>
> #include <QPainter>
> #include <QBrush>
> @@ -122,8 +126,16 @@
> void CurrentTrack::createMenu()
> {
> QAction *showCoverAction = new QAction( i18n( "Show Fullsize" ), this );
> + showCoverAction->setIcon( KIcon( "zoom-original" ) );
> + showCoverAction->setToolTip( i18n( "Display artwork for this album" ) );
> +
> QAction *fetchCoverAction = new QAction( i18n( "Fetch Cover" ), this );
> + fetchCoverAction->setIcon( KIcon( "list-add" ) );
> + fetchCoverAction->setToolTip( i18n( "Fetch the artwork for this album" ) );
> +
> QAction *unsetCoverAction = new QAction( i18n( "Unset Cover" ), this );
> + unsetCoverAction->setIcon( KIcon( "list-remove" ) );
> + unsetCoverAction->setToolTip( i18n( "Remove artwork for this album" ) );
You should be checking whether the current track has CoverFetching
Capabilities and then inserting actions from CoverFetchingActions.h
instead of recreating them yourself.
--
Seb Ruiz
http://www.sebruiz.net/
More information about the Amarok-devel
mailing list