Mercurial > pidgin
changeset 7055:2234420abada
[gaim-migrate @ 7618]
Um, I think this should maybe almost fix wing's possible problem
with the url insert link maybe thing like.
It seemed like destroy_dialog() was getting called 3 times or something.
I dunno, I'm tired. Anyway, it doesn't seem to crash or leak for me,
hopefully wing's problem is fixed.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 30 Sep 2003 05:40:09 +0000 |
parents | 7c04a0775918 |
children | c92dbccd7448 |
files | src/dialogs.c |
diffstat | 1 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dialogs.c Tue Sep 30 05:36:28 2003 +0000 +++ b/src/dialogs.c Tue Sep 30 05:40:09 2003 +0000 @@ -2209,6 +2209,7 @@ void cancel_link(GtkWidget *widget, GaimConversation *c) { GaimGtkConversation *gtkconv; + GtkWidget *link_dialog; gtkconv = GAIM_GTK_CONVERSATION(c); @@ -2217,8 +2218,9 @@ FALSE); } - destroy_dialog(NULL, gtkconv->dialogs.link); + link_dialog = gtkconv->dialogs.link; gtkconv->dialogs.link = NULL; + destroy_dialog(NULL, link_dialog); } void do_insert_link(GtkWidget *w, int resp, struct linkdlg *b) @@ -2274,6 +2276,9 @@ a->window = gtk_dialog_new_with_buttons(_("Insert Link"), GTK_WINDOW(gtkwin->window), 0, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, _("Insert"), GTK_RESPONSE_OK, NULL); + gtk_dialog_set_default_response(GTK_DIALOG(a->window), GTK_RESPONSE_OK); + g_signal_connect(G_OBJECT(a->window), "response", + G_CALLBACK(do_insert_link), a); gtk_dialog_set_default_response(GTK_DIALOG(a->window), GTK_RESPONSE_OK); gtk_container_set_border_width(GTK_CONTAINER(a->window), 6); @@ -2304,12 +2309,6 @@ hbox = gtk_hbox_new(FALSE, 6); gtk_container_add(GTK_CONTAINER(vbox), hbox); - g_signal_connect(G_OBJECT(a->window), "destroy", - G_CALLBACK(destroy_dialog), a->window); - g_signal_connect(G_OBJECT(a->window), "destroy", - G_CALLBACK(free_dialog), a); - dialogwindows = g_list_prepend(dialogwindows, a->window); - table = gtk_table_new(4, 2, FALSE); gtk_table_set_row_spacings(GTK_TABLE(table), 5); gtk_table_set_col_spacings(GTK_TABLE(table), 5); @@ -2334,8 +2333,9 @@ gtk_table_attach_defaults(GTK_TABLE(table), a->text, 1, 2, 1, 2); gtk_entry_set_activates_default (GTK_ENTRY(a->text), TRUE); - g_signal_connect(G_OBJECT(a->window), "response", - G_CALLBACK(do_insert_link), a); + g_signal_connect(G_OBJECT(a->window), "destroy", + G_CALLBACK(free_dialog), a); + dialogwindows = g_list_prepend(dialogwindows, a->window); a->toggle = linky; gtkconv->dialogs.link = a->window;