# HG changeset patch # User Christian Hammond # Date 1077576223 0 # Node ID 4786adbe8720f0a57a834ba23ef7e7210a8b2980 # Parent ffb601c6b833bca8119408ac77e023b256f96b5a [gaim-migrate @ 9047] Clicking the X button on a multi-field request dialog now invokes the Cancel button. committer: Tailor Script diff -r ffb601c6b833 -r 4786adbe8720 src/gtkrequest.c --- 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; }