Mercurial > pidgin
diff pidgin/gtkutils.h @ 21652:eb2d5ba2a50d
Add a utility function pidgin_dialog_add_button to add buttons to a dialog
created by pidgin_create_dialog. This removes a lot of code duplication.
Anyone using this branch should keep an eye on the buttons on the dialogs to
make sure they are enabled/disabled/displayed/hidden/marinated correctly.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Tue, 27 Nov 2007 00:15:49 +0000 |
parents | 2a2496044eef |
children | c88a3f2dbb52 |
line wrap: on
line diff
--- a/pidgin/gtkutils.h Mon Nov 26 10:23:41 2007 +0000 +++ b/pidgin/gtkutils.h Tue Nov 27 00:15:49 2007 +0000 @@ -153,6 +153,20 @@ GtkWidget *pidgin_dialog_get_vbox(GtkDialog *dialog); /** + * Add a button to a dialog created by #pidgin_create_dialog. + * + * @param dialog The dialog window + * @param label The stock-id or the label for the button + * @param callback The callback function for the button + * @param callbackdata The user data for the callback function + * + * @return The created button. + * @since 2.4.0 + */ +GtkWidget *pidgin_dialog_add_button(GtkDialog *dialog, const char *label, + GCallback callback, gpointer callbackdata); + +/** * Retrieves the action area (button box) from a pidgin dialog window * * @param dialog The dialog window