From: Axel S. <si...@co...> - 2008-09-07 12:31:43
|
Sun Sep 7 08:23:59 EDT 2008 A....@ke... * Add the matchSelected signal to EntryCompletion. Using this signal and using the CellLayout functions to connect to a model is broken in Gtk+, see http://bugzilla.gnome.org/show_bug.cgi?id=551202 hunk ./gtk/Graphics/UI/Gtk/Entry/EntryCompletion.chs.pp 48 --- model, but this can be overridden by connecting to the ::match-selected +-- model, but this can be overridden by connecting to the 'matchSelected' hunk ./gtk/Graphics/UI/Gtk/Entry/EntryCompletion.chs.pp 59 --- selected, the ::action-activated signal is emitted. +-- selected, the 'completionActionActivated' signal is emitted. hunk ./gtk/Graphics/UI/Gtk/Entry/EntryCompletion.chs.pp 82 + entryCompletionSetTextModel, hunk ./gtk/Graphics/UI/Gtk/Entry/EntryCompletion.chs.pp 121 + insertPrefix, +#endif + completionActionActivated, + matchSelected, + +-- * Deprecated +#ifndef DISABLE_DEPRECATED +#if GTK_CHECK_VERSION(2,6,0) hunk ./gtk/Graphics/UI/Gtk/Entry/EntryCompletion.chs.pp 135 +#endif hunk ./gtk/Graphics/UI/Gtk/Entry/EntryCompletion.chs.pp 148 -{#import Graphics.UI.Gtk.ModelView.Types#} (TreeIter) +{#import Graphics.UI.Gtk.ModelView.Types#} (TreeIter, peekTreeIter, + TypedTreeModelClass) hunk ./gtk/Graphics/UI/Gtk/Entry/EntryCompletion.chs.pp 152 - columnIdToNumber) + columnIdToNumber, + treeModelSetColumn) hunk ./gtk/Graphics/UI/Gtk/Entry/EntryCompletion.chs.pp 203 +-- | Convenience function for setting up the most used case of this code: a +-- completion list with just strings. This function will set up @completion@ to +-- have a list displaying all (and just) strings in the completion list, and to +-- get those strings from @model@. This functions creates and adds a [_$_] +-- 'CellRendererText' which retrieves its content from the given model. +-- +entryCompletionSetTextModel :: (TreeModelClass (model String), + TypedTreeModelClass model) + => EntryCompletion -- ^ @completion@ + -> model String -- ^ the model containing 'String's + -> IO () +entryCompletionSetTextModel self model = do + let strCol = makeColumnIdString 0 + treeModelSetColumn model strCol id + set self [entryCompletionTextColumn := strCol] + hunk ./gtk/Graphics/UI/Gtk/Entry/EntryCompletion.chs.pp 225 --- completion for key. Note that key is normalized and case-folded. +-- completion for key. Note that the key is normalized and case-folded. hunk ./gtk/Graphics/UI/Gtk/Entry/EntryCompletion.chs.pp 549 +#if GTK_CHECK_VERSION(2,6,0) +-- %hash c:f4eb d:9ccf +-- | Gets emitted when the inline autocompletion is triggered. The default +-- behaviour is to make the entry display the whole prefix and select the newly +-- inserted part. +-- +-- Applications may connect to this signal in order to insert only a smaller +-- part of the @prefix@ into the entry - e.g. the entry used in the +-- 'FileChooser' inserts only the part of the prefix up to the next \'\/\'. +-- +-- * Available since Gtk+ version 2.6 +-- +insertPrefix :: EntryCompletionClass self => Signal self (String -> IO Bool) +insertPrefix = Signal (connect_STRING__BOOL "insert_prefix") +#endif + +-- %hash c:d50e d:ad7e +-- | Gets emitted when a match from the list is selected. The default +-- behaviour is to replace the contents of the entry with the contents of the +-- text column in the row pointed to by @iter@. +-- +matchSelected :: EntryCompletionClass self => Signal self (TreeModel -> TreeIter -> IO Bool) +matchSelected = Signal (connect_OBJECT_BOXED__BOOL "match_selected" peekTreeIter) hunk ./gtk/Graphics/UI/Gtk/Entry/EntryCompletion.chs.pp 573 +-- %hash c:21ac d:2cbc +-- | Gets emitted when an action is activated. +-- +completionActionActivated :: EntryCompletionClass self => Signal self (Int -> IO ()) +completionActionActivated = Signal (connect_INT__NONE "action_activated") + +#ifndef DISABLE_DEPRECATED hunk ./gtk/Graphics/UI/Gtk/Entry/EntryCompletion.chs.pp 604 +#endif hunk ./tools/callbackGen/gtkmarshal.list 35 -#BOOLEAN:OBJECT,BOXED +BOOLEAN:OBJECT,BOXED |