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 490551 - Use purple_signal_register to avoid polling for blist changes
Use purple_signal_register to avoid polling for blist changes
Status: RESOLVED FIXED
Product: nautilus-sendto
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: nautilus-sendto-maint
nautilus-sendto-maint
Depends on:
Blocks:
 
 
Reported: 2007-10-26 15:26 UTC by Michael Monreal
Modified: 2008-04-21 14:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot (54.47 KB, image/png)
2007-10-26 15:26 UTC, Michael Monreal
Details

Description Michael Monreal 2007-10-26 15:26:21 UTC
The pidgin plugin is continously doing something... it doesn't seem to be right. See debug window screesnhot
Comment 1 Michael Monreal 2007-10-26 15:26:59 UTC
Created attachment 97926 [details]
Screenshot
Comment 2 Bastien Nocera 2008-01-20 13:41:34 UTC
It's working fine, that's what happens when there's no changes in the buddy list. There doesn't seem to be any way to do this without polling, as the Purple API doesn't provide any signals or callback functions for when the buddy list changes.

Please report this as a bug against libpurple, we'll make the necessary changes when the API exists.
Comment 3 Michael Monreal 2008-01-20 22:26:14 UTC
Bastien, can you please have a look here:

http://developer.pidgin.im/ticket/4692

Is this enough? Or does nautilus-sendto need more?
Comment 4 Bastien Nocera 2008-01-20 23:16:26 UTC
I would have expected a signal on the PurpleBuddyList object, but I just noticed they aren't objects, so they suck boatloads.

"buddy-signed-on" and "buddy-signed-off" would do, although the Pidgin developers should take a look at using the GObject signals, rather than reinventing the wheel with undocumented functions such as purple_signal_register().
Comment 5 Etan Reisner 2008-03-26 21:47:13 UTC
For the record the purple_signal_register function is not undocumented, it is documented (and has always been documented) in the pidgin API documentation. Documentation, I might add, one would need to read to create a pidgin plugin to begin with.

Furthermore, pidgin cannot just use GObject signals since, as you noticed, pidgin and purple objects are not (for the most part) GObjects. The plan is to move to using GObjects and thus gain the ability to use GObject signals but that is not a move that can be made swiftly or easily.

I realize I am joining this party a bit late but I felt this needed commenting on.
Comment 6 Bastien Nocera 2008-03-26 22:03:34 UTC
Sorry I didn't find the API docs myself, the doxygen documentation sucks when you're used to the gtk-doc formatted ones.

Docs:
http://developer.pidgin.im/doxygen/2.2.0/html/blist-signals.html
http://developer.pidgin.im/doxygen/dev/html/signals_8h.html#2c37dfb3566c3d84335d6db3d9a8cb90
Comment 7 Etan Reisner 2008-03-30 21:36:10 UTC
I'm not particularly familiar with gtk-doc formatting so I am unable to comment on the relative merits of the two formats, I am however aware of the fact that our api search functions are broken at best (if not entirely useless) which is something we would like to fix but which none of us has invested any time in actually fixing (that I'm aware of). My intention was not to sound angry or insulting, just to point out some details that might otherwise have gone unnoticed.
Comment 8 Bastien Nocera 2008-04-21 14:01:51 UTC
2008-04-21  Bastien Nocera  <hadess@hadess.net>

        * pidgin_plugin/nautilus-sendto-plugin.c (save_online_buddies),
        (plugin_load), (plugin_unload): Register to the changes in the
        buddy list instead of loading it every 5 seconds (Closes: #490551)