Monday, January 21, 2013

Playing around with Pidgin


The best way how to strart is to downlad the source code, build it, look around for some documentation (I hope there will be some) and play with the code. These are my first steps:

Geting the source code:
All Pidgin Mercurial repositories are available via HTTP from ​http://hg.pidgin.im.
hg clone http://hg.pidgin.im/pidgin/main pidgin-main 

Adding the PPA to Software sources (under Ubuntu OS):
You can update your system with unsupported packages from this untrusted PPA by adding ppa:pidgin-developers/ppa to your system's Software Sources.

Installing dependencies:
apt-get build-dep pidgin

Generating make file (This short  command has actually taken me most of time. Lot of dependency files were missing so I had to manually install and configure them.):
./autogen.sh

make & make install

run ldconfig

And finally try to launch pidgin!!! Nice, it works. So the whole Sunday afternoon was not wasted for nothing.

The Code:

The source code file structure is pretty simple and intuitive, there is a subfolder in the file i have downloaded from SourceForge which contains all relevant code. This folder is also organized by very intuitive way (the source code files are nested right in this folder, while there are also subfolders for plugins, pixmaps,  themes, etc.). If i compare this structure to the one I have seen in JEdit project it is a way better.

When I browsed through the source code files, I have discovered that there is a lot of GTK stuff and a lot of signals and signals handlers. When I lunched pidgin in a debug mode, it had created four threads even before it got the point where the main window is created and displayed. For now, the structure of the program is a nothing but the dark place for me. But for the start, I can see a basic gtk program structure.

Documentation? What is that? Well, it is not so bad. Obviously, Pidgin developers know this word, however it is very brief. In most cases it consists of one short sentence for each function and 2-3 words to each function parameter. The docs is generated by doxygen, and the command to do this is included in Makefile (make docs).

I have also looked to bug tracker list. For the start I think it should not be complicated to fix bug #6825 (https://developer.pidgin.im/ticket/6825). It is just about that the text field has not the focus by default.

EDIT: After reading the discussion about the bug #6825 I found out that this is not really a bug. The reporter of this bug just request for another default behaviour which developers does not cosider correct. So I leave this bug and I try to provide patch to https://developer.pidgin.im/ticket/1577.

No comments:

Post a Comment