# HG changeset patch # User Luke Schierer # Date 1054396272 0 # Node ID bb8f0a1498311735bb4546c36da4885c398e1316 # Parent eeba9205dd0f79d8a414acd517cd8d1c4d780661 [gaim-migrate @ 6012] (11:50:11) Robot101: add a close button to the FT dialog (11:50:29) Robot101: not all WMs have decorations. dialogs should have dismissal buttons. HIG issue. yada. committer: Tailor Script diff -r eeba9205dd0f -r bb8f0a149831 src/gtkft.c --- a/src/gtkft.c Sat May 31 15:49:46 2003 +0000 +++ b/src/gtkft.c Sat May 31 15:51:12 2003 +0000 @@ -67,6 +67,7 @@ GtkWidget *resume_button; GtkWidget *remove_button; GtkWidget *stop_button; + GtkWidget *close_button; }; struct gaim_gtkxfer_ui_data @@ -387,6 +388,12 @@ gaim_xfer_cancel_local(dialog->selected_xfer); } +static void +close_button_cb(GtkButton *button, struct gaim_gtkxfer_dialog *dialog) +{ + gaim_gtkxfer_dialog_hide(dialog); +} + /************************************************************************** * Dialog Building Functions **************************************************************************/ @@ -694,6 +701,15 @@ g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(stop_button_cb), dialog); + /* Close button */ + button = gtk_button_new_from_stock(GTK_STOCK_CLOSE); + gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); + gtk_widget_show(button); + dialog->close_button = button; + + g_signal_connect(G_OBJECT(button), "clicked", + G_CALLBACK(close_button_cb), dialog); + return dialog; }