Cancel notification



Here's a set of patch implementing cancel notification with a new error that is
passed to the callback. The solution as it is implemented does not require any
modification of plugins, they don't have to set that error themselve, just to
ensure they call the last callback as soon as the operation is effectively
cancelled.

The last commit is a bonus, not directly related to the issue. I tend to have
my spell checker enabled, therefore these words were showing in red and that
was tiring my eyes ;).

I have tested it following Iago's suggestions, except that I didn't check
directly for things added in the TreeModel (I guess that's what you meant), but
I used GRL_DEBUG=*:debug to check for activity in the plugin.

In the process, I think I found an unrelated bug[1] in filesystem cancellation,
which is not addressed here.

I have also started work on more formal unit testing of this, and already have
an (untested) test MediaSource (basically, a mock), but I feel I will need a
test MetadataSource as well to be able to write tests for all cases (including
full resolution). I might go back on that later, but I feel there are higher
priorities right now.


Enjoy,

Guij

[1] https://bugzilla.gnome.org/show_bug.cgi?id=641762



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]