Mercurial > pidgin.yaz
changeset 5692:b1eb9fc30ff8
[gaim-migrate @ 6113]
Hitting cancel or closing the Modify Account dialog now destroys the dialog
and frees up memory.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 03 Jun 2003 06:15:15 +0000 |
parents | 3de0e242f9a2 |
children | 0b5318235562 |
files | src/gtkaccount.c |
diffstat | 1 files changed, 18 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkaccount.c Tue Jun 03 06:06:22 2003 +0000 +++ b/src/gtkaccount.c Tue Jun 03 06:15:15 2003 +0000 @@ -691,6 +691,21 @@ } static void +__close_account_prefs_cb(GtkWidget *w, AccountPrefsDialog *dialog) +{ + gtk_widget_destroy(dialog->window); + + g_free(dialog); +} + +static void +__account_win_destroy_cb(GtkWidget *w, GdkEvent *event, + AccountPrefsDialog *dialog) +{ + __close_account_prefs_cb(NULL, dialog); +} + +static void __show_account_prefs(AccountPrefsDialogType type, GaimAccount *account) { AccountPrefsDialog *dialog; @@ -730,10 +745,8 @@ gtk_container_set_border_width(GTK_CONTAINER(win), 12); -#if 0 g_signal_connect(G_OBJECT(win), "delete_event", G_CALLBACK(__account_win_destroy_cb), dialog); -#endif /* Setup the vbox */ main_vbox = gtk_vbox_new(FALSE, 12); @@ -782,6 +795,9 @@ gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); gtk_widget_show(button); + g_signal_connect(G_OBJECT(button), "clicked", + G_CALLBACK(__close_account_prefs_cb), dialog); + /* OK button */ button = gtk_button_new_from_stock(GTK_STOCK_OK); gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);