Image 01
profile-image

Raugturi

Chris Johnson Durham, NC, United States of America
PidginScreenlet

Conky by meek 126 comments

I had the same issue with it, so I wrote a quick and dirty hack if you want to use it. In the definition for getGroupsAndBuddies (starts at line 192), right after the following line:

buddyId = node (line 201)

Add this:

if buddyId == self.pidgin.PurpleContactGetPriorityBuddy(self.pidgin.PurpleBuddyGetContact(node)):

And then move everything else over one tab down through self.addBuddy(buddyId)

I also added a new variable called show_toponly (just copied the code for show_offline in both PidginScreenlet.py and menu.xml) and used this line instead:

if buddyId == self.pidgin.PurpleContactGetPriorityBuddy(self.pidgin.PurpleBuddyGetContact(node)) or not self.show_toponly:

That way you can turn it off and it'll be off by default if your install is for multiple users.

It ain't pretty, but it works. A whole new class for Contacts would be far more appropriate, I think. This seems to work for me in the mean time though. I was concerned that PurpleContactGetPriorityBuddy might be static and therefore not show buddies who were logged in under an ID you didn't have as the top one, but it looks dynamic, meaning it will return the same buddy you'd get if you opened Pidgin and double clicked a Contact (i.e. The "best" priority one that's online and available), but I make no guarantees. I couldn't find the official documentation for the function anywhere. - Aug 31 2009