Mercurial > pidgin
diff src/gtkprivacy.c @ 7165:a230b7bca1fb
[gaim-migrate @ 7732]
Fix a memleak of a GaimGtkPrivacyDialogThing when you use the close
button, and also make the destroy and close callbacks match the
behavior of the account dialog closer.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 05 Oct 2003 22:15:25 +0000 |
parents | b89d98f0bf79 |
children | 2a781d4178ba |
line wrap: on
line diff
--- a/src/gtkprivacy.c Sun Oct 05 19:59:21 2003 +0000 +++ b/src/gtkprivacy.c Sun Oct 05 22:15:25 2003 +0000 @@ -221,9 +221,7 @@ static gint destroy_cb(GtkWidget *w, GdkEvent *event, GaimGtkPrivacyDialog *dialog) { - g_free(dialog); - - privacy_dialog = NULL; + gaim_gtk_privacy_dialog_hide(); return 0; } @@ -325,8 +323,10 @@ } static void -close_cb(GtkWidget *button, void *user_data) +close_cb(GtkWidget *button, GaimGtkPrivacyDialog *dialog) { + gtk_widget_destroy(dialog->win); + gaim_gtk_privacy_dialog_hide(); } @@ -514,7 +514,7 @@ if (privacy_dialog == NULL) return; - gtk_widget_destroy(privacy_dialog->win); + g_free(privacy_dialog); privacy_dialog = NULL; }