After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 508590 - Add finished signal to module
Add finished signal to module
Status: RESOLVED WONTFIX
Product: deskbar-applet
Classification: Deprecated
Component: general
Git master
Other Linux
: Normal normal
: 2.26
Assigned To: Deskbar Applet Maintainer(s)
Deskbar Applet Maintainer(s)
gnome[unmaintained]
Depends on:
Blocks:
 
 
Reported: 2008-01-10 19:23 UTC by Sebastian Pölsterl
Modified: 2011-07-10 02:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (8.90 KB, patch)
2008-01-12 21:17 UTC, Michael Lester
needs-work Details | Review
handler's _emit_finished (12.95 KB, patch)
2008-01-16 03:20 UTC, JcRazo
none Details | Review
actually this is my patch, adds _emit_finished to every handler (11.32 KB, patch)
2008-01-16 07:39 UTC, JcRazo
needs-work Details | Review

Description Sebastian Pölsterl 2008-01-10 19:23:00 UTC
The module interface should contain a new signal called "finished" that each module should emit when it's finished searching for results. Currently, we're not able to tell when a module is finished searching.

Adding this feature requires:
* Adding new signal and method '_emit_finished' to deskbar.interfaces.Module
* Add a self._emit_finished() to each module in deskbar/handlers when it's finished searching (i.e. either before a return statement or at the end of the query method.
Comment 1 Michael Lester 2008-01-12 21:17:34 UTC
Created attachment 102687 [details] [review]
Patch

Adds _emit_finished method to Module.py and method calls to the end of the query method for every handler.
Comment 2 Sebastian Pölsterl 2008-01-13 11:24:18 UTC
Thanks for the patch.
However, you only added the finished calls in the end of the query method, but some handlers have a return before, too (e.g. in yahoo.py on line 65). You have to add a _emit_finished call before those returns, too.
Comment 3 JcRazo 2008-01-16 03:20:17 UTC
Created attachment 102962 [details] [review]
handler's _emit_finished 

mm check this out.. i've added _emit_finished to some other places..
Comment 4 JcRazo 2008-01-16 07:39:00 UTC
Created attachment 102978 [details] [review]
actually this is my patch, adds _emit_finished to every handler

sorry mistake, i was working on other bug and so on i mixed code of both bugs.. try this one please..
Comment 5 Sebastian Pölsterl 2008-01-17 17:12:26 UTC
In beagle-live.py you added self._emit_finished() at the end of the query method. In this particular case, this is not correct, because beagle is queried asynchronously. However, I'm not sure where to put the call best.

In SpecialProgramHandler in programs.py the call has one indentation too much. It should be on the same level as the if clause.

In tomboy.py we have a similar problem as in beagle-live, the query is asynchronously. I think you can emit the signal in handle_searchnotes method, but not in the query method.

The other changes are perfect.

Another thing I was thing about is that the finished signal should contain a parameter that contains the query string, too. Otherwise, we can't determine which query just finished.
Comment 6 JcRazo 2008-01-17 21:17:22 UTC
about beagle-live, could self._emit_finished(qstring) be inside _on_hit_added?

because, query connects every hit added with hits_added() then if it makes snippet request it connects with _on_snippet_received and _on_snippet_received and these both callbacks calls self._on_hit_added(query, container, qstring, qmax) wich emit query ready

And hits_added also emits query ready by it self when there is not snippet request, so, its ok adding _emit_finished(qstring) inside _on_hit_added() and hits_added()??
Comment 7 Sebastian Pölsterl 2008-01-19 14:30:01 UTC
Adding it to hits_added() is fine. _on_hit_added() only emits a single result. Therefore, we don't really now if it's really the last result. I think I need to refactor the beagle-live module to achieve the correct behavior.
Comment 8 Sebastian Pölsterl 2008-03-30 17:08:58 UTC
I refactored the beagle-live module. It now contains only one _emit_query_ready call. That makes things much easier know.
Comment 9 André Klapper 2008-04-10 07:53:47 UTC
are bugs like bug 527023, bug 527228, bug 527254 or bug 527255 duplicates of this one?
Comment 10 Sebastian Pölsterl 2008-04-10 08:48:16 UTC
No, these bugs are not related to this one.
Comment 11 Akhil Laddha 2011-07-10 02:23:31 UTC
deskbar-applet development has been stalled [1]. Maintainers don't have future development plan so i am closing the bugs as WONTFIX.

[1] http://mail.gnome.org/archives/desktop-devel-list/2011-June/msg00073.html