| 597 * @return A newly allocated string with unicode arrow characters |
597 * @return A newly allocated string with unicode arrow characters |
| 598 */ |
598 */ |
| 599 char *pidgin_make_pretty_arrows(const char *str); |
599 char *pidgin_make_pretty_arrows(const char *str); |
| 600 |
600 |
| 601 /** |
601 /** |
| 602 * Creates a "mini-dialog" suitable for embedding in the buddy list scrollbook |
602 * The type of callbacks passed to pidgin_make_mini_dialog(). |
| 603 * with pidgin_blist_add_alert(). |
603 */ |
| |
604 typedef void (*PidginUtilMiniDialogCallback)(gpointer user_data, GtkButton *); |
| |
605 |
| |
606 /** |
| |
607 * Creates a #PidginMiniDialog, tied to a #PurpleConnection, suitable for |
| |
608 * embedding in the buddy list scrollbook with pidgin_blist_add_alert(). |
| 604 * |
609 * |
| 605 * @param handle The #PurpleConnection to which this mini-dialog |
610 * @param handle The #PurpleConnection to which this mini-dialog |
| 606 * refers, or @c NULL if it does not refer to a |
611 * refers, or @c NULL if it does not refer to a |
| 607 * connection. If @a handle is supplied, the mini-dialog |
612 * connection. If @a handle is supplied, the mini-dialog |
| 608 * will be automatically removed and destroyed when the |
613 * will be automatically removed and destroyed when the |
| 609 * connection signs off. |
614 * connection signs off. |
| 610 * @param stock_id The ID of a stock image to use in the mini dialog. |
615 * @param stock_id The ID of a stock image to use in the mini dialog. |
| 611 * @param primary The primary text |
616 * @param primary The primary text |
| 612 * @param secondary The secondary text |
617 * @param secondary The secondary text, or @c NULL for no description. |
| 613 * @param user_data Data to pass to the callbacks |
618 * @param user_data Data to pass to the callbacks |
| 614 * @param ... a <tt>NULL</tt>-terminated list of button labels |
619 * @param ... a <tt>NULL</tt>-terminated list of button labels |
| 615 * (<tt>char *</tt>) and callbacks, which should take a |
620 * (<tt>char *</tt>) and callbacks |
| 616 * <tt>void *</tt> argument, as which @a user_data will |
621 * (#PidginUtilMiniDialogCallback). @a user_data will be |
| 617 * be passed. (Strictly speaking a <tt>GtkButton *</tt> |
622 * passed as the first argument. (Callbacks may lack a |
| 618 * will be passed as the second argument, but it can |
623 * second argument, or be @c NULL to take no action when |
| 619 * safely be omitted.) When a button is pressed, the |
624 * the corresponding button is pressed.) When a button is |
| 620 * callback will be called; when the callback returns the |
625 * pressed, the callback (if any) will be called; when |
| 621 * dialog will evaporate. Callbacks may be @c NULL, in |
626 * the callback returns the dialog will be destroyed. |
| 622 * which case pressing the corresponding button simply |
627 * @return A #PidginMiniDialog, suitable for passing to |
| 623 * dismisses the dialog. |
|
| 624 * @return The dialog widget, suitable for passing to |
|
| 625 * pidgin_blist_add_alert(). |
628 * pidgin_blist_add_alert(). |
| 626 * @see pidginstock.h |
629 * @see pidginstock.h |
| 627 */ |
630 */ |
| 628 GtkWidget *pidgin_make_mini_dialog(PurpleConnection *handle, |
631 GtkWidget *pidgin_make_mini_dialog(PurpleConnection *handle, |
| 629 const char* stock_id, const char *primary, const char *secondary, |
632 const char* stock_id, const char *primary, const char *secondary, |