# HG changeset patch # User Sean Egan # Date 1183955081 0 # Node ID 09b964413667ae8a8db11bea1cb023bb2aae3761 # Parent b91a29987d71947d3ffb5e577e1eff59c0c85b18 Patch from nix_nix, adds 'get prpl name from account menu' API diff -r b91a29987d71 -r 09b964413667 pidgin/gtkutils.c --- a/pidgin/gtkutils.c Sun Jul 08 21:23:43 2007 +0000 +++ b/pidgin/gtkutils.c Mon Jul 09 04:24:41 2007 +0000 @@ -676,6 +676,12 @@ return aop_option_menu_new(create_protocols_menu(id), cb, user_data); } +const char * +pidgin_protocol_option_menu_get_selected(GtkWidget *optmenu) +{ + return (const char *)aop_option_menu_get_selected(optmenu, NULL); +} + PurpleAccount * pidgin_account_option_menu_get_selected(GtkWidget *optmenu) { diff -r b91a29987d71 -r 09b964413667 pidgin/gtkutils.h --- a/pidgin/gtkutils.h Sun Jul 08 21:23:43 2007 +0000 +++ b/pidgin/gtkutils.h Mon Jul 09 04:24:41 2007 +0000 @@ -236,6 +236,15 @@ gpointer user_data); /** + * Gets the currently selected protocol from a protocol drop down box. + * + * @param optmenu The drop-down option menu created by + * pidgin_account_option_menu_new. + * @return Returns the protocol ID that is currently selected. + */ +const char *pidgin_protocol_option_menu_get_selected(GtkWidget *optmenu); + +/** * Creates a drop-down option menu filled with accounts. * * @param default_account The account to select by default. @@ -255,7 +264,7 @@ /** * Gets the currently selected account from an account drop down box. * - * @param optmenu The GtkOptionMenu created by + * @param optmenu The drop-down option menu created by * pidgin_account_option_menu_new. * @return Returns the PurpleAccount that is currently selected. */