Commit 0e860164 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Document that inline completion requires text-column to be set.

2005-03-15  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentrycompletion.c (gtk_entry_completion_class_init):
	Document that inline completion requires text-column to be set.
	(gtk_entry_completion_compute_prefix): Return NULL if text-column
	is not set.

	* gtk/gtkentry.c (check_completion_callback): Call
	gtk_entry_completion_complete() before inserting the prefix,
	otherwise the prefix may depend on (random) state of the
	filter model.
parent 3fc42d7a
2005-03-15 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkentrycompletion.c (gtk_entry_completion_class_init):
Document that inline completion requires text-column to be set.
(gtk_entry_completion_compute_prefix): Return NULL if text-column
is not set.
* gtk/gtkentry.c (check_completion_callback): Call
gtk_entry_completion_complete() before inserting the prefix,
otherwise the prefix may depend on (random) state of the
filter model.
2005-03-15 Anders Carlsson <andersca@imendio.com>
* docs/iconcache.txt:
......
2005-03-15 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkentrycompletion.c (gtk_entry_completion_class_init):
Document that inline completion requires text-column to be set.
(gtk_entry_completion_compute_prefix): Return NULL if text-column
is not set.
* gtk/gtkentry.c (check_completion_callback): Call
gtk_entry_completion_complete() before inserting the prefix,
otherwise the prefix may depend on (random) state of the
filter model.
2005-03-15 Anders Carlsson <andersca@imendio.com>
* docs/iconcache.txt:
......
2005-03-15 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkentrycompletion.c (gtk_entry_completion_class_init):
Document that inline completion requires text-column to be set.
(gtk_entry_completion_compute_prefix): Return NULL if text-column
is not set.
* gtk/gtkentry.c (check_completion_callback): Call
gtk_entry_completion_complete() before inserting the prefix,
otherwise the prefix may depend on (random) state of the
filter model.
2005-03-15 Anders Carlsson <andersca@imendio.com>
* docs/iconcache.txt:
......
......@@ -5200,6 +5200,7 @@ check_completion_callback (GtkEntryCompletion *completion)
{
completion->priv->check_completion_idle = NULL;
gtk_entry_completion_complete (completion);
gtk_entry_completion_insert_prefix (completion);
return FALSE;
......
......@@ -303,7 +303,9 @@ gtk_entry_completion_class_init (GtkEntryCompletionClass *klass)
* GtkEntryCompletion:inline-completion:
*
* Determines whether the common prefix of the possible completions
* should be inserted automatically in the entry.
* should be inserted automatically in the entry. Note that this
* requires text-column to be set, even if you are using a custom
* match function.
*
* Since: 2.6
**/
......@@ -1412,8 +1414,12 @@ gtk_entry_completion_compute_prefix (GtkEntryCompletion *completion)
GtkTreeIter iter;
gchar *prefix = NULL;
gboolean valid;
const gchar *key;
const gchar *key = gtk_entry_get_text (GTK_ENTRY (completion->priv->entry));
if (completion->priv->text_column < 0)
return NULL;
key = gtk_entry_get_text (GTK_ENTRY (completion->priv->entry));
valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (completion->priv->filter_model),
&iter);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment