diff pidgin/gtkutils.h @ 20028:a2b4eac83902

Part of #1332 to introduce pidgin_text_combo_box_new_entry and accessor functions. I made some changes to: * Not leak * Popup the dropdown when up/down arrows are pressed, to imitate the old behaviour to some extent. * Change the accessor defines to accessor functions. I think this all works OK now. Yell at me if things don't work, and then fix it. :-P
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 14 Sep 2007 08:27:26 +0000
parents f3e0b1221765
children 6bf32c9e15a7
line wrap: on
line diff
--- a/pidgin/gtkutils.h	Fri Sep 14 06:00:03 2007 +0000
+++ b/pidgin/gtkutils.h	Fri Sep 14 08:27:26 2007 +0000
@@ -658,10 +658,37 @@
  * @param ...            list of integers terminated by -1
  *
  * @return               A newly created GtkTreePath.
- *
  */
 GtkTreePath *gtk_tree_path_new_from_indices (gint first_index, ...);
 #endif
 
+/**
+ * Create a simple text GtkComboBoxEntry equivalent
+ *
+ * @param default_item   Initial contents of GtkEntry
+ * @param items          GList containing strings to add to GtkComboBox
+ *
+ * @return               A newly created text GtkComboBox containing a GtkEntry
+ *                       child.
+ */
+GtkWidget *pidgin_text_combo_box_entry_new(const char *default_item, GList *items);
+
+/**
+ * Retrieve the text from the entry of the simple text GtkComboBoxEntry equivalent
+ *
+ * @param widget         The simple text GtkComboBoxEntry equivalent widget
+ *
+ * @return               The text in the widget's entry. It must not be freed
+ */
+const char *pidgin_text_combo_box_entry_get_text(GtkWidget *widget);
+
+/**
+ * Set the text in the entry of the simple text GtkComboBoxEntry equivalent
+ *
+ * @param widget         The simple text GtkComboBoxEntry equivalent widget
+ * @param text           The text to set
+ */
+void pidgin_text_combo_box_entry_set_text(GtkWidget *widget, const char *text);
+
 #endif /* _PIDGINUTILS_H_ */