View Single Post
Posts: 99 | Thanked: 65 times | Joined on Jan 2008 @ Finland
#2
I can't help with Python, but the idea should be the same as with C. Home plugins have their class-destroy function called on unload. In C, you would basically do this:

Code:
static void
my_destroy_function(GtkObject *obj)
{
        g_source_remove(foo);
}

static void
example_class_init(MyClass *class)
{
        /* foo */
        GTK_OBJECT_CLASS(class)->destroy = my_destroy_function;
        /* bar */
}