Home Forums Wiki Doc Install Extras Screenshots Source Code Projects Blog Users Groups Register
Glx-Dock / Cairo-Dock List of forums Applets | Applets PidginDock - Applet to dock pidgin in Adium style
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] PidginDock - Applet to dock pidgin in Adium style
Page : 1 2
darvin11 English 27 fabounet [Read]
16 February 2010 à 10:06

darvin11, Sunday 01 November 2009 à 06:19


Subscription date : 28 October 2009
Messages : 2
Proud to annonce Pidgindock - applet for Cairo-Dock to monitor and control Pidgin Instant Messenger.
It uses Adium dock icons themes. It shows sender name and count of unread messages.
    • It shows current status:
http://pidgin-cairo-dock.googlecode.com/files/screen-statustitleandicon2.png
    • ...or another status:
http://pidgin-cairo-dock.googlecode.com/files/screen-statustitleandicon.png
    • Also, it shows sender's name when message recieved:
http://pidgin-cairo-dock.googlecode.com/files/screen-titlemessage.png
    • It supports animation in themes and shows number of unread messages:
http://pidgin-cairo-dock.googlecode.com/files/screen-animation-numberunread.png

http://pidgin-cairo-dock.googlecode.com/files/screen-athothertheme.png



ppmt, Sunday 01 November 2009 à 22:58


Subscription date : 29 November 2007
Messages : 3520
cool another thhird party applet

I don't use pidgin but I am sure other on the forum are so they will be able to try it!

and a lot of themes for it as well

Welcome and well done!

matttbe, Monday 02 November 2009 à 00:29


Subscription date : 24 January 2009
Messages : 12573
Hello darvin11

Really nice and thanks for your contribution!

I propose to you to add your applet on bzr! I've just updated this part of our wiki: Help us with BZR. There are many advantages to use bzr and it can be interesting to gather all external applets. (in fact, I can add your applet on it but it's maybe better if you are the owner of this branch )

When your applet is considered as 'stable' after some tests, we will merge your branch into the trunk branch

PS: Don't forget to add a licence in all your files (except the .conf). You can have a look here

fabounet, Tuesday 03 November 2009 à 12:49


Subscription date : 30 November 2007
Messages : 17118
this seems very nice !
thanks a lot for your contribution !

By the way, may I ask your feedback about the DBus API :
was it simple enough ? did you encounter some limitations ? was the tutorial clear ?

PS : can your appler show the list of your contacts, and initiate a chat with them ? (I don't know if it possible, maybe within a menu or a sub-dock)

matttbe, Tuesday 03 November 2009 à 13:09


Subscription date : 24 January 2009
Messages : 12573
PS : can your applet show the list of your contacts, and initiate a chat with them ? (I don't know if it possible, maybe within a menu or a sub-dock)
It's maybe interresting to create easily a subdock . And also the possibility to steal the application's icon in taskbar .

Also, it's not easy to make a list of themes . Or it's maybe better to use a repertory path.

fabounet, Tuesday 03 November 2009 à 13:15


Subscription date : 30 November 2007
Messages : 17118
it is possible through the DBus API
I don't know how far one can go with it, and I'm curious to see it.

themes could maybe be managed on the server, like other applets.

darvin11, I'll add the version in the Register method tonight, after the "author" parameter.
you'll have to add this parameter in order to make it work, sorry for the trouble.

darvin11, Wednesday 04 November 2009 à 01:21


Subscription date : 28 October 2009
Messages : 2
i can't make my applet Appli, to control Pigdin's window. I add subdock with select of pidgin's status, and now add applet to bzr

fabounet, Wednesday 04 November 2009 à 11:25


Subscription date : 30 November 2007
Messages : 17118
you mean the method ControlAppli does not work ?

about the themes, I think it can be done easily, because the dock can already get automatically themes on our server and store them in ~/.config/cairo-dock/extras/name_oh_the_applet
so all we need to do is to copy some Adium themes on our server

taiebot65, Wednesday 04 November 2009 à 14:04


Subscription date : 26 October 2008
Messages : 1904
Hello darvin i tried a long time ago to do a pidgin applet now i undestand why i ve never managed to get something working because it s far too complicated for my knowledge on code.

But if i can help here my "wishes" list for this plugin...

==> If Pidgin is not launched this applet is just a single icon which can launch pidgin..

==> if Pidgin is running this icon is destroyed and changed to a subdock the subdock icon display your icons which means my status and the number of contacts visible vs .all my contact

==> In the subdock i ve got displayed all my actual contacts with their avatars as icon ( i do not know if it s possible) the beauty of it it s this subdock can be detached and be displayed all the time...

I ve got some code to display contacts in a subdock. I know it s really bad but i m still learning hope it will help you

#!/usr/bin/env python
#
# main.py
# Copyright (C) taiebot 2009 <taiebot65 _-AT-_ yahoo -_dot_- fr> => edited by matttbe ;)
#
# main.py is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# main.py is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
### import ###
import sys
import gobject
import glib
import gtk
import dbus
from dbus.mainloop.glib import DBusGMainLoop

def icon():
return

def name():
return

#On va active Pidgin et on ecoute son interface.
def init():
# let's connect to the dock.
DBusGMainLoop(set_as_default=True)
bus = dbus.SessionBus()
try:
remote_object = bus.get_object("im.pidgin.purple.PurpleService",
"/im/pidgin/purple/PurpleObject")
except dbus.DBusException:
print "Pidgin not found on bus (did you activate its 'DBus' plug-in ?)"
return
purple = dbus.Interface(remote_object, "im.pidgin.purple.PurpleInterface")

# On recupere son statut
current = purple.PurpleSavedstatusGetType(purple.PurpleSavedstatusGetCurrent())
print current
if current ==1:
status = "/usr/share/pixmaps/pidgin/status/48/offline.png"
print "offline"
elif current ==2:
status = "/usr/share/pixmaps/pidgin/status/48/available.png"
print "available"
elif current ==3:
status = "/usr/share/pixmaps/pidgin/status/48/busy.png"
elif current ==4:
status = "/usr/share/pixmaps/pidgin/status/48/invisible.png"
print "invisible"
elif current ==5:
status = "/usr/share/pixmaps/pidgin/status/48/away.png"
print "away"
elif current ==6:
status = "/usr/share/pixmaps/pidgin/status/48/extended-away.png"
print "extended away"
elif current ==7:
status = "/usr/share/pixmaps/pidgin/status/48/away.png"
print "mobile"
elif current ==8:
status = "/usr/share/pixmaps/pidgin/status/48/chat.png"
print "tune"

# ON RECUPERE LES COMPTES
for acctID in purple.PurpleAccountsGetAllActive():


# ON recupere tous les BUddies en fonction des comptes...
buddies = purple.PurpleFindBuddies(acctID, "")

for buddyid in buddies:

#groupid = purple.PurpleBuddyGetGroup(buddyid)

# get initial data
#alias = purple.PurpleBuddyGetAlias(buddyid)
#name = purple.PurpleBuddyGetName(buddyid)
online = purple.PurpleBuddyIsOnline(buddyid)
if online != 0:
name = purple.PurpleBuddyGetName(buddyid)
#group = purple.PurpleGroupGetName(groupid)
alias = purple.PurpleBuddyGetAlias(buddyid)
icon = purple.PurpleBuddyGetIcon(buddyid)
#if icon == 0:
# icon = "/usr/share/pixmaps/pidgin/status/48/person.png"
#elif icon !=0:
# icon = "~/.purple/icons/" + icon
#icon = purple.PurpleBuddyGetIcon(buddyid)
print name
print icon


remote2_object = bus.get_object("org.cairodock.CairoDock",
"/org/cairodock/CairoDock")
iface = dbus.Interface(remote2_object, "org.cairodock.CairoDock")
#iface.SetIcon( status, "none", "none", "weather")
iface.CreateLauncherFromScratch( "/usr/share/pixmaps/pidgin/status/48/person.png", alias, "", "Pidgin")
#iface.SetLabel( alias, name, "Pidgin")
del purple
del remote_object
del bus

### main ###
if __name__ == '__main__':
init()
gtk.main()
stop()
sys.exit(0)


http://farm3.static.flickr.com/2644/3875903904_324a8dce10.jpg

fabounet, Thursday 05 November 2009 à 18:22


Subscription date : 30 November 2007
Messages : 17118
darvin11 I've read your code and it's very well written (very far from what I'm able to do with Python )

I have 2 remarks and 1 question about the .conf :

for the animation, use a widget of type #a :
#a Animation type :
AnimationType = default


for the theme, use a list with the widget #L :
#L[Green;Blue;Red;Yellow;Black;Purple;Shared Images] Theme :
Theme = Green


why do did you write "not work !" on line 274 ?

hope it can help you to improve your applet
If you have any problem, I'd help you with pleasure.

Edit : also, since 2 days ago, you have to add the version of your applet after the author :
dock.RegisterNewModule(applet_name, "This is Adium - feel & like applet to control Pidgin",
                "STHG _at_ gmail.com",
                "0.0.1",
                3, # category "accessories"
            applet_share_data_dir)


Edit2 : in GetAppletDir(), using ~/.config/cairo-dock/third-party/"+applet_name+"/" as the applet's dir is not safe, because it may be installed somewhere else. The correct way is to just get the current path : os.path.abspath(".")+"/", because the dock "cd" to the applet's dir before launching it.
GetThemeDir() and GetConfigPath are corrects already

MastroPino, Sunday 29 November 2009 à 15:52


Subscription date : 17 November 2008
Messages : 62
>>> registering our applet...
ERROR:dbus.connection:Unable to set arguments ('pidgindock', 'This is Adium - feel & like applet to control Pidgin', 'nbdarvin@gmail.com', 3, '/home/m7p/.config/cairo-dock/third-party/pidgindock') according to signature u'ssssis': <type 'exceptions.TypeError'>: Expected a string or unicode object
Traceback (most recent call last):
File "./pidgindock", line 360, in <module>
applet_share_data_dir)
File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 68, in __call__
return self._proxy_method(*args, **keywords)
File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 140, in __call__
**keywords)
File "/usr/lib/pymodules/python2.6/dbus/connection.py", line 610, in call_blocking
message.append(signature=signature, *args)
TypeError: Expected a string or unicode object


Someone know how can I fix this?

taiebot65, Sunday 29 November 2009 à 15:55


Subscription date : 26 October 2008
Messages : 1904
Yes i think you need to put the version number now like said fabounet in the previous post

so it will be in File "./pidgindock", line 360, in <module>

dock.RegisterNewModule(applet_name, "This is Adium - feel & like applet to control Pidgin",
"STHG _at_ gmail.com",
"0.0.1", <==you should add this
3, # category "accessories"
applet_share_data_dir)

as it s missing the applet does not start ...

MastroPino, Sunday 29 November 2009 à 22:04


Subscription date : 17 November 2008
Messages : 62
Thanks, it work taiebot65, but the plugin is still unusable I think

taiebot65, Sunday 29 November 2009 à 22:47


Subscription date : 26 October 2008
Messages : 1904
Do you still have the same error ? I think you need Pidgin running before you launch this applet because the applet does not work if it s launched before pidgin

I try to learn Python i might help now

And for me it s working great i have tried and it s work smoothly with just creating a folder third-party in ./config/cairo-dock

and in the pidgindock file just changing
dock.RegisterNewModule(applet_name, "This is Adium - feel & like applet to control Pidgin", \
"nbdarvin@gmail.com","0.0.1", \
3, # category "accessories"
applet_share_data_dir)

this restarting the dock and going to the config menu activating pidgin

taiebot65, Sunday 29 November 2009 à 23:43


Subscription date : 26 October 2008
Messages : 1904
Wahouhh this stuff is great i ve never noticed there is a moving emblem when pidgin is connecting with not much cpu overload... i want that for other applets .......

Fabounet Pleaaaaaaaaaaseeeeeeeeeeeeee

http://videobin.org/+na/rm.html

fabounet, Monday 30 November 2009 à 12:48


Subscription date : 30 November 2007
Messages : 17118
the applet is not functionnal because it recquires Pidgin to be launched before it, whereas it should be able to launch it on click, and then to connect to it.
I wish my Python skills were better so that I could fix it

taiebot65, Tuesday 01 December 2009 à 00:47


Subscription date : 26 October 2008
Messages : 1904
i am trying to do the same thing with my applet.. How can i now when to start the plugin anyway i found this maybe that can help you have to look at the dbus name and do a loop if you can not find pidgin when it appears you launch the programm...

first you need to create a def..

def testDBus(self, bus, interface):
obj = bus.get_object('org.freedesktop.DBus', '/org/freedesktop/DBus')
dbus_iface = dbus.Interface(obj, 'org.freedesktop.DBus')
avail = dbus_iface.ListNames()
return interface in avail

and after

try:

bus = dbus.SessionBus()

if self.testDBus(bus, 'im.pidgin.purple.PurpleService'):

self.logInfo("Setting up dbus interface")

remote_object = bus.get_object("im.pidgin.purple.PurpleService","/im/pidgin/purple/PurpleObject")
iface = dbus.Interface(remote_object, "im.pidgin.purple.PurpleService")

self.logInfo("Calling dbus interface for IM data")

PS there is another version available on the google page...

fabounet, Tuesday 01 December 2009 à 12:23


Subscription date : 30 November 2007
Messages : 17118
I thin it can work.
but isn't it possible to register to the bus, so that we are notified when the Pidgin bus becomes available ?

Guest, Tuesday 01 December 2009 à 17:12

The problem pidgin bus is not existing if pidgin is not running so you have to wait for a signal to launch it. But you are far better than me ....

fabounet, Thursday 03 December 2009 à 01:30


Subscription date : 30 November 2007
Messages : 17118
not when it comes to Python at least

but for MusicPlayer, we register to the audio player before it is launched, and it notifies the dock when it is launched, so I thought it could be done in the same way with Pidgin.

Applets | Applets

Subjects Author Language Messages Last message
[Locked] PidginDock - Applet to dock pidgin in Adium style
Page : 1 2
darvin11 English 27 fabounet [Read]
16 February 2010 à 10:06


Glx-Dock / Cairo-Dock List of forums Applets | Applets PidginDock - Applet to dock pidgin in Adium style 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.