changeset 18464:09b964413667

Patch from nix_nix, adds 'get prpl name from account menu' API
author Sean Egan <seanegan@gmail.com>
date Mon, 09 Jul 2007 04:24:41 +0000
parents b91a29987d71
children a1dd21cb4c69
files pidgin/gtkutils.c pidgin/gtkutils.h
diffstat 2 files changed, 16 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)
 {
--- 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.
  */