Mon Oct 27 16:00:37 EDT 2008 Axe...@en...
* Add a function to retrieve the current text. This function is not strictly necessary.
hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs.pp 31
--- [_$_]
+-- [_$_]
hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs.pp 37
--- In contrast to a 'ComboBox', the underlying model of a 'ComboBoxEntry'
--- must always have a text column (see 'comboBoxEntrySetTextColumn'), and the
--- entry will show the content of the text column in the selected row. To get
--- the text from the entry, use 'comboBoxGetActiveText'.
+-- In contrast to a 'ComboBox', the underlying model of a 'ComboBoxEntry' must
+-- always have a text column (see 'comboBoxEntrySetTextColumn'), and the entry
+-- will show the content of the text column in the selected row. To get the
+-- text from the entry, use 'comboBoxEntryGetActiveText'.
hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs.pp 42
--- The changed signal will be emitted while typing into a 'ComboBoxEntry',
--- as well as when selecting an item from the 'ComboBoxEntry''s list. Use
--- 'comboBoxGetActive' or 'comboBoxGetActiveIter' to discover whether an item
--- was actually selected from the list.
+-- The 'Graphics.UI.Gtk.MenuComboToolbar.ComboBox.changed' signal will be
+-- emitted while typing into a 'ComboBoxEntry', as well as when selecting an
+-- item from the 'ComboBoxEntry''s list. Use 'comboBoxGetActive' or
+-- 'comboBoxGetActiveIter' to discover whether an item was actually selected
+-- from the list.
hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs.pp 48
--- Connect to the activate signal of the 'Entry' (use 'binGetChild') to
--- detect when the user actually finishes entering text.
+-- Connect to the activate signal of the 'Entry' (use 'binGetChild') to detect
+-- when the user actually finishes entering text.
hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs.pp 79
-
+#if GTK_CHECK_VERSION(2,6,0)
+ comboBoxEntryGetActiveText,
+#endif
+ [_$_]
hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs.pp 91
+import System.Glib.UTFString
hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs.pp 178
+#if GTK_CHECK_VERSION(2,6,0)
+-- | Retrieve the text currently in the entry.
+--
+-- * Returns @Nothing@ if no text is selected or entered.
+--
+-- * Availabe in Gtk 2.6 or higher.
+--
+comboBoxEntryGetActiveText :: ComboBoxEntryClass self => self
+ -> IO (Maybe String)
+comboBoxEntryGetActiveText self = do
+ strPtr <- {# call gtk_combo_box_get_active_text #} (toComboBox self)
+ if strPtr == nullPtr then return Nothing else liftM Just $
+ peekUTFString (castPtr strPtr)
+#endif
+
|