# HG changeset patch # User Sadrul Habib Chowdhury # Date 1193854433 0 # Node ID ebb46dea479afc4a42049da482faebadfb908621 # Parent cd494bf7772353f1bde7a31f8178cef4369dcbb1 Buttons were leaking all this time! It's a good thing there ain't too many of them in finch! diff -r cd494bf77723 -r ebb46dea479a finch/libgnt/gntbutton.c --- a/finch/libgnt/gntbutton.c Tue Oct 30 10:50:20 2007 +0000 +++ b/finch/libgnt/gntbutton.c Wed Oct 31 18:13:53 2007 +0000 @@ -98,6 +98,14 @@ } static void +gnt_button_destroy(GntWidget *widget) +{ + GntButton *button = GNT_BUTTON(widget); + g_free(button->priv->text); + g_free(button->priv); +} + +static void gnt_button_class_init(GntWidgetClass *klass) { char *style; @@ -108,6 +116,7 @@ parent_class->size_request = gnt_button_size_request; parent_class->key_pressed = gnt_button_key_pressed; parent_class->clicked = gnt_button_clicked; + parent_class->destroy = gnt_button_destroy; style = gnt_style_get_from_name(NULL, "small-button"); small_button = gnt_style_parse_bool(style);