Mercurial > pidgin.yaz
changeset 5608:bb8f0a149831
[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 <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sat, 31 May 2003 15:51:12 +0000 |
parents | eeba9205dd0f |
children | eaf058fc47a5 |
files | src/gtkft.c |
diffstat | 1 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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; }