[Kde-imaging] currentScope and friends

Aurélien Gâteau aurelien.gateau at free.fr
Fri Jun 4 15:23:05 CEST 2004


Le vendredi 4 Juin 2004 12:10, Jesper K. Pedersen a écrit :
> On Friday 04 June 2004 12:00, Aurélien Gâteau wrote:
> | Le vendredi 4 Juin 2004 00:09, Jesper Pedersen a écrit :
> | >   I therefore added a function called currentScope(),
> |
> | I've been wondering about the currentAlbum() and currentSelection() thing
> | for a while and I'm afraid we will see inconsistency in the way plugins
> | select which files they'll work on. Some might work on currentAlbum(),
> | some on currentSelection(), some others on currentScope() and yet some
> | others might let the user choose among allAlbums().
>
> I agree that most application should just use currentScope, which is why I
> replaced all the code trying first to use the selection, then the album.
>
> If the cure is to remove currentAlbum and currentSelection altogether, I'm
> not so sure about. I'd much rather solve the issue by writting good
> documentation for the methods suggesting the user to use
> currentSelection(), unless they have a very good reason not to.

I can't see why a plugin would use currentSelection() instead of 
currentScope() and I think it's better to add methods when they are needed 
rather than just in case. This prevents API bloat.


> | I suggest we only provide a currentScope() and a allAlbums() methods.
> | Most plugins should provide a list filled with the content of allAlbums()
> | with the currentScope() item selected so that the user do not have to
> | select it. Maybe we could even implement a KIPI::AlbumListView widget.
> |
> | What do you think about this?
>
> That assumes that currentAlbum is one of the albums in allAlbums(), which
> is not true for KimDaBa.

Then your implementation of allAlbums() is broken. What's the goal of such a 
method if it does not return *all* albums? or maybe you will tell me that 
Album!=ImageCollection? This is getting way too complex.

Aurélien


More information about the Kde-imaging mailing list