PLUGIN_HOWTO

Fri, 17 Nov 2006 06:12:17 +0000

author
Daniel Atallah <datallah@pidgin.im>
date
Fri, 17 Nov 2006 06:12:17 +0000
changeset 15050
f99d78ac44e9
parent 14567
633cd2adce3c
child 15998
294277e634fc
child 20470
77693555855f
permissions
-rw-r--r--

[gaim-migrate @ 17767]
Ari Pollak traced down a memory leak to the account menuitems not being cleaned up by gtk_container_remove().
It turns out that there is an additional reference somewhere which is preventing the menuitem from being destroyed - deryni tracked it down to gtk_accel_label_set_accel_widget() in gtk_image_menu_item_new_with_label() - we will be reporting the bug to the GTK folks tomorrow.
This fixes the leakage; gtk_widget_destroy() is what really should be used in this situation anyway.

14566
373d653d0733 [gaim-migrate @ 17223]
Mark Doliner <markdoliner@pidgin.im>
parents: 14253
diff changeset
1 For information on writing a plugin for Gaim, go
373d653d0733 [gaim-migrate @ 17223]
Mark Doliner <markdoliner@pidgin.im>
parents: 14253
diff changeset
2 http://gaim.sourceforge.net/api/ and see the HOWTOs in the
373d653d0733 [gaim-migrate @ 17223]
Mark Doliner <markdoliner@pidgin.im>
parents: 14253
diff changeset
3 "Related Pages" section.
93
a62ef5a64629 [gaim-migrate @ 103]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
4
14566
373d653d0733 [gaim-migrate @ 17223]
Mark Doliner <markdoliner@pidgin.im>
parents: 14253
diff changeset
5 You can also generate this documentation locally by installing
373d653d0733 [gaim-migrate @ 17223]
Mark Doliner <markdoliner@pidgin.im>
parents: 14253
diff changeset
6 doxygen and graphviz dot, then running "make docs" in the Gaim
373d653d0733 [gaim-migrate @ 17223]
Mark Doliner <markdoliner@pidgin.im>
parents: 14253
diff changeset
7 source tree. The documentation will be in the docs/html directory.
93
a62ef5a64629 [gaim-migrate @ 103]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
8
14566
373d653d0733 [gaim-migrate @ 17223]
Mark Doliner <markdoliner@pidgin.im>
parents: 14253
diff changeset
9 This next paragraph is old and possibly out of date:
373d653d0733 [gaim-migrate @ 17223]
Mark Doliner <markdoliner@pidgin.im>
parents: 14253
diff changeset
10 Compilation of the plugins is fairly straight-forward; there is a
373d653d0733 [gaim-migrate @ 17223]
Mark Doliner <markdoliner@pidgin.im>
parents: 14253
diff changeset
11 Makefile in this directory that has a rule for making the .so file
373d653d0733 [gaim-migrate @ 17223]
Mark Doliner <markdoliner@pidgin.im>
parents: 14253
diff changeset
12 from a .c file. No modification of the Makefile should be necessary,
373d653d0733 [gaim-migrate @ 17223]
Mark Doliner <markdoliner@pidgin.im>
parents: 14253
diff changeset
13 unless if you simply want to type 'make' to have it made; otherwise,
373d653d0733 [gaim-migrate @ 17223]
Mark Doliner <markdoliner@pidgin.im>
parents: 14253
diff changeset
14 'make filename.so' will take filename.c and make the .so plugin from
373d653d0733 [gaim-migrate @ 17223]
Mark Doliner <markdoliner@pidgin.im>
parents: 14253
diff changeset
15 it. If you need to link in with extra libraries, you can set the
373d653d0733 [gaim-migrate @ 17223]
Mark Doliner <markdoliner@pidgin.im>
parents: 14253
diff changeset
16 environment variable PLUGIN_LIBS to be the libraries you want to link
373d653d0733 [gaim-migrate @ 17223]
Mark Doliner <markdoliner@pidgin.im>
parents: 14253
diff changeset
17 with.
93
a62ef5a64629 [gaim-migrate @ 103]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
18
14566
373d653d0733 [gaim-migrate @ 17223]
Mark Doliner <markdoliner@pidgin.im>
parents: 14253
diff changeset
19 It should be possible to compile plugins outside of the Gaim source
373d653d0733 [gaim-migrate @ 17223]
Mark Doliner <markdoliner@pidgin.im>
parents: 14253
diff changeset
20 tree, which is a much cleaner solution.

mercurial