Support inline completion in GtkEntryCompletion



The file chooser entry has not only a completion popup, but also inline
completion. I think it makes sense to make that generally available as a
feature of GtkEntryCompletion.

I have a patch which does so. The new api consists of one signal and
two properties:

/**
 * GtkEntryCompletion::insert-prefix:
 * @widget: the object which received the signal
 * @key: the current content of the entry
 * 
 * The ::insert-prefix signal is emitted when the inline autocompletion
 * is triggered. The default behaviour is to append the common prefix
 * of all possible completions of @key to the entry and select it.
 *
 * Return value: %TRUE if the signal has been handled
 * 
 * Since: 2.6
 */ 

/**
 * gtk_entry_completion_set_inline_completion:
 * @completion: a #GtkEntryCompletion
 * @inline_completion: %TRUE to do inline completion
 * 
 * Sets whether the common prefix of the possible completions should
 * be automatically inserted in the entry.
 * 
 * Since: 2.6
 **/

/**
 * gtk_entry_completion_get_inline_completion:
 * @completion: a #GtkEntryCompletion
 * 
 * Returns whether the common prefix of the possible completions should
 * be automatically inserted in the entry.
 * 
 * Return value: %TRUE if inline completion is turned on
 * 
 * Since: 2.6
 **/

/**
 * gtk_entry_completion_set_popup_completion:
 * @completion: a #GtkEntryCompletion
 * @popup_completion: %TRUE to do popup completion
 * 
 * Sets whether the completions should be presented in a popup window.
 * 
 * Since: 2.6
 **/

/**
 * gtk_entry_completion_get_popup_completion:
 * @completion: a #GtkEntryCompletion
 * 
 * Returns whether the completions should be presented in a popup window.
 * 
 * Return value: %TRUE if popup completion is turned on
 * 
 * Since: 2.6
 **/

The full patch can be found in bug 135953


Matthias






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]