Resize the popup if the model is replaced. (#152333)

2004-09-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentrycompletion.c (gtk_entry_completion_set_model): Resize the
	popup if the model is replaced.  (#152333)
	(_gtk_entry_completion_resize_popup):
	Improve positioning of entry completion popup.
This commit is contained in:
Matthias Clasen
2004-09-13 18:05:29 +00:00
committed by Matthias Clasen
parent fcc540cbdc
commit a02bdaa351
5 changed files with 31 additions and 3 deletions

View File

@@ -1,3 +1,10 @@
2004-09-13 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkentrycompletion.c (gtk_entry_completion_set_model): Resize the
popup if the model is replaced. (#152333)
(_gtk_entry_completion_resize_popup):
Improve positioning of entry completion popup.
2004-09-09 Matthias Clasen <mclasen@redhat.com>
* tests/testfilechooser.c (main): Update sensitivity of the "Select all"

View File

@@ -1,3 +1,10 @@
2004-09-13 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkentrycompletion.c (gtk_entry_completion_set_model): Resize the
popup if the model is replaced. (#152333)
(_gtk_entry_completion_resize_popup):
Improve positioning of entry completion popup.
2004-09-09 Matthias Clasen <mclasen@redhat.com>
* tests/testfilechooser.c (main): Update sensitivity of the "Select all"

View File

@@ -1,3 +1,10 @@
2004-09-13 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkentrycompletion.c (gtk_entry_completion_set_model): Resize the
popup if the model is replaced. (#152333)
(_gtk_entry_completion_resize_popup):
Improve positioning of entry completion popup.
2004-09-09 Matthias Clasen <mclasen@redhat.com>
* tests/testfilechooser.c (main): Update sensitivity of the "Select all"

View File

@@ -1,3 +1,10 @@
2004-09-13 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkentrycompletion.c (gtk_entry_completion_set_model): Resize the
popup if the model is replaced. (#152333)
(_gtk_entry_completion_resize_popup):
Improve positioning of entry completion popup.
2004-09-09 Matthias Clasen <mclasen@redhat.com>
* tests/testfilechooser.c (main): Update sensitivity of the "Select all"

View File

@@ -834,6 +834,9 @@ gtk_entry_completion_set_model (GtkEntryCompletion *completion,
gtk_tree_view_set_model (GTK_TREE_VIEW (completion->priv->tree_view),
GTK_TREE_MODEL (completion->priv->filter_model));
g_object_unref (G_OBJECT (completion->priv->filter_model));
if (GTK_WIDGET_VISIBLE (completion->priv->popup_window))
_gtk_entry_completion_resize_popup (completion);
}
/**
@@ -1158,9 +1161,6 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
gdk_window_get_origin (completion->priv->entry->window, &x, &y);
get_borders (GTK_ENTRY (completion->priv->entry), &x_border, &y_border);
x += x_border;
y += 2 * y_border;
matches = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (completion->priv->filter_model), NULL);
items = MIN (matches, 15);