Home Forums Wiki Doc Install Extras Screenshots Source Code Projects Blog Users Groups Register
Glx-Dock / Cairo-Dock List of forums Applets | Applets Pidgin Buddy List Problems with FIX
The latest stable release is the *3.4.0* : How to install it here.
Note: We just switched from BZR to Git on Github! (only to host the code and your future pull requests)
Applets | Applets

Subjects Author Language Messages Last message
[Locked] Pidgin Buddy List Problems with FIX
uudruid74 English 5 brianw [Read]
12 October 2014 à 20:58

uudruid74, Tuesday 30 September 2014 à 05:31


Subscription date : 21 June 2014
Messages : 5
OK - I couldn't find a fix for this. Basically, I close my Buddy List and have a conversation open, then I can't seem to get back to the Buddy List. Its just lose. Re-executing Pidgin (by going to the main application menu) will restore the buddy list without disturbing your connection, but that should be built into the pidgin applet on my dock!

Here is a hack I made to make it work (I'm not a python programmer, so forgive the duck tape and bare wires).

Go to ~/.config/cairo-dock/third-party/Pidgin directory
edit the Pidgin file in that directory as follows

line 24: change import os.path to
import.os

I did this so I could use os.system ... yes, I know there are better ways, but this was familiar for me

Around line 454, you'll see a list of menu items all appended to the menu. Right before self.icon.AddMenuItems(items) add this:

         items.append({"type" 0,
             
"label":_("Buddy List"),
             
"menu" 0,
             
"id" 98,
             
"tooltip" _("Runs Pidgin again to find your buddy list.")})


Then right below that, the start of the on_menu_select function, add a line like this:

        if iNumEntry == 98:
             
os.system ("/usr/bin/pidgin")



I am NOT responsible if you mess up your file. If you do, just download it again.

brianw, Wednesday 01 October 2014 à 01:23


Subscription date : 25 April 2012
Messages : 270
Thank you for the information. I tested this and I can confirm that when a conversation is open and the buddy list is closed there seems to be no way to open it again from the applet. You can open pidgin from the application menu but not from the applet itself.

Adding the buddy list to the right click does work. Other than changing the left click functionality to open the buddy list even with a conversation open I do not see any way to resolve this (but that would conflict with selecting between multiple conversations).

I would suggest though that you not use the os.system call. You can simply use the subrocess.Popen call. You would not need to change the import os.path call.

Also I would suggest to put the if statement within the existing flow to keep it uniform.

Leave out the change on line 24
Add the following at line 454:
items.append({"type" 0
"label":_("Buddy List"), 
"menu" 0
"id" 98
"tooltip" _("Runs Pidgin again to find your buddy list.")})


Then change the line:
                elif iNumEntry == 3:
                        
self.bSilentMode not self.bSilentMode


to
                elif iNumEntry == 3:
                        
self.bSilentMode not self.bSilentMode
                elif iNumEntry 
== 98:
                        
subprocess.Popen("pidgin")



I uploaded an edited file to http://pastebin.com/raw.php?i=k46phGGy

Guest, Wednesday 01 October 2014 à 03:41

Yeah, everyone says to use Popen and not os.system because it has more features, but I don't need any features and I wasn't sure what the differences were and "system" sounded pretty familiar. Popen() sounds like its gonna open a pipe and try to do fancy stuff (and maybe lose track of file handles, I dunno). I just want a fork/exec!

The rest of its just a hack because I don't think I've even looked at Python in 8 years and then I only LOOKED at it! Imagine a programmer with an idea and a hammer looking for some place to slam the idea into. "Looks like it will fit here!" WHAM! WHAM! WHAM! "Yup! Fits fine!"

Glad you pasted a better version, hopefully it will make it into the next release, or something similar.

brianw, Wednesday 01 October 2014 à 14:21


Subscription date : 25 April 2012
Messages : 270
Thank you for the help. Your efforts are greatly appreciated. I am not one of the developers so my suggestions are only to help as well.

Guest :
Yeah, everyone says to use Popen and not os.system because it has more features


Actually the main reason I suggested using subprocess.Popen was because that is how it is already done in the code to open pidgin hence the elimination of the need to change/add import statements. Of lesser importance is the terminology. The term subprocess explicitly states what you are intending to do whereas the term os.system is very generic.

The change for the elif iNumEntry was only for readability of the code and the logical grouping of what the intent of the code is. It does not offer any advantage for functionality in this particular case.

Guest :
Glad you pasted a better version, hopefully it will make it into the next release, or something similar.


I wouldn't say better. The only reason I posted it was for people who didn't want to take a chance on editing the code themselves.

matttbe, Saturday 11 October 2014 à 21:30


Subscription date : 24 January 2009
Messages : 12573
Hello and thank you for this bug report and its patch! (and sorry for the delay...)

I just committed your patch, thank you for your help

PS: I think we're using subprocess mainly because we need it for some interfaces and some applets but yes, in this case we could use os.system

brianw, Sunday 12 October 2014 à 20:58


Subscription date : 25 April 2012
Messages : 270
matttbe :
I just committed your patch, thank you for your help ;-)


Yes, all help is appreciated. Please see this thread http://www.glx-dock.org/bg_topic.php?t=8056

Applets | Applets

Subjects Author Language Messages Last message
[Locked] Pidgin Buddy List Problems with FIX
uudruid74 English 5 brianw [Read]
12 October 2014 à 20:58


Glx-Dock / Cairo-Dock List of forums Applets | Applets Pidgin Buddy List Problems with FIX Top

Online users :

Powered by ElementSpeak © 2007 Adrien Pilleboue, 2009-2013 Matthieu Baerts.
Dock based on CSS Dock Menu (Ndesign) with jQuery. Icons by zgegball
Cairo-Dock is a free software under GNU-GPL3 licence. First stable version created by Fabounet.
Many thanks to TuxFamily for the web Hosting and Mav for the domain name.