Standardizing Context Menu Actions

Dan Meltzer parallelgrapefruit at gmail.com
Mon Nov 3 02:28:40 CET 2008


On Sun, Nov 2, 2008 at 7:57 PM, Alejandro Wainzinger
<aikawarazuni at gmail.com> wrote:
> The CollectionTreeView currently makes special cases of: editing tags
> (EditCapability), Copy To Collection, Move To Collection,
> CustomActionsCapability, etc.  But they all have the same idea in
> mind: get a list of Meta::Track, and perform some actions on them.
> What's desired is to refactor this so that the Collections, that the
> selected tracks belong to, get tested for certain Capabilities, and
> these Capabilities are all built in one go.  This also means making
> certain Capabilities for Collection, instead of Track.

Hi,

While I agree think that this is necessary, and we should do it, I
think this definately needs to wait until after 2.0.  This sounds like
a lot of code and changes, and has a possibility of introducing
regressions.  In terms of implementation, I think the possibly best
way to do this would be to make Collection inherit from Meta::Base (as
It's really a type of meta).
>
> In Practice:
> - some amount of tracks are selected in the collection browser
> - the context menu goes through all selected tracks, checks their
> collection's capabilities
> - for all capabilities found to be supported, generate a
> PopupDropperAction for it (e.g. Delete, Copy to Collection, Move to
> Collection)
> - the action will then call a method in the Collection that is capable
> of performing a particular action (e.g. Delete) on a list of tracks
> - the collection view is updated
>
> This would make adding future Capabilities a lot easier, and make the
> TreeView code a lot easier to read.  In addition, it would finally let
> us implement deletion of multiple tracks from media devices in one go
> (yes I have a vested interest in this, haha).
>
> Seb, please comment more on this.
> _______________________________________________
> Amarok-devel mailing list
> Amarok-devel at kde.org
> https://mail.kde.org/mailman/listinfo/amarok-devel
>


More information about the Amarok-devel mailing list