Mercurial > pidgin.yaz
changeset 8323:4786adbe8720
[gaim-migrate @ 9047]
Clicking the X button on a multi-field request dialog now invokes the
Cancel button.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Mon, 23 Feb 2004 22:43:43 +0000 |
parents | ffb601c6b833 |
children | 2df8b01af581 |
files | src/gtkrequest.c |
diffstat | 1 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkrequest.c Mon Feb 23 22:35:12 2004 +0000 +++ b/src/gtkrequest.c Mon Feb 23 22:43:43 2004 +0000 @@ -205,6 +205,14 @@ gaim_request_close(GAIM_REQUEST_FIELDS, data); } +static void +destroy_multifield_cb(GtkWidget *dialog, GdkEvent *event, + GaimGtkRequestData *data) +{ + multifield_cancel_cb(NULL, data); +} + + #define STOCK_ITEMIZE(r, l) \ if (!strcmp((r), text)) \ return (l); @@ -990,6 +998,9 @@ gtk_container_set_border_width(GTK_CONTAINER(win), 12); gtk_window_set_resizable(GTK_WINDOW(win), FALSE); + g_signal_connect(G_OBJECT(win), "delete_event", + G_CALLBACK(destroy_multifield_cb), data); + /* Setup the main horizontal box */ hbox = gtk_hbox_new(FALSE, 12); gtk_container_add(GTK_CONTAINER(win), hbox); @@ -1091,7 +1102,7 @@ col_num++; - if(col_num >= cols) + if (col_num >= cols) col_num = 0; }