Fixes for #143829, Tommi Komulainen, Christian Persch:

2005-02-16  Matthias Clasen  <mclasen@redhat.com>

	Fixes for #143829, Tommi Komulainen, Christian Persch:

	* gtk/gtktreeview.c (gtk_tree_view_destroy): Remove the
	typeselect_flush_timeout when destroying the widgets
	it is operating on.
	(gtk_tree_view_ensure_interactive_directory): Add the
	popup to the window group of the toplevel it belongs to.

	* gtk/gtkcombobox.c (gtk_combo_box_set_popup_widget)
	(gtk_combo_box_popup): Do the same here.
This commit is contained in:
Matthias Clasen
2005-02-16 16:37:24 +00:00
committed by Matthias Clasen
parent 71f5aa3f2a
commit a0c5253c26
5 changed files with 76 additions and 4 deletions

View File

@ -1136,7 +1136,15 @@ gtk_combo_box_set_popup_widget (GtkComboBox *combo_box,
{
if (!combo_box->priv->popup_window)
{
GtkWidget *toplevel;
combo_box->priv->popup_window = gtk_window_new (GTK_WINDOW_POPUP);
toplevel = gtk_widget_get_toplevel (combo_box);
if (GTK_IS_WINDOW (toplevel))
gtk_window_group_add_window (_gtk_window_get_group (GTK_WINDOW (toplevel)),
GTK_WINDOW (combo_box->priv->popup_window));
gtk_window_set_resizable (GTK_WINDOW (combo_box->priv->popup_window), FALSE);
gtk_window_set_screen (GTK_WINDOW (combo_box->priv->popup_window),
gtk_widget_get_screen (GTK_WIDGET (combo_box)));
@ -1580,7 +1588,8 @@ gtk_combo_box_popup (GtkComboBox *combo_box)
{
gint x, y, width, height;
GtkTreePath *path, *ppath;
GtkWidget *toplevel;
g_return_if_fail (GTK_IS_COMBO_BOX (combo_box));
if (GTK_WIDGET_MAPPED (combo_box->priv->popup_widget))
@ -1592,6 +1601,11 @@ gtk_combo_box_popup (GtkComboBox *combo_box)
return;
}
toplevel = gtk_widget_get_toplevel (combo_box);
if (GTK_IS_WINDOW (toplevel))
gtk_window_group_add_window (_gtk_window_get_group (GTK_WINDOW (toplevel)),
GTK_WINDOW (combo_box->priv->popup_window));
gtk_widget_show_all (combo_box->priv->popup_frame);
gtk_combo_box_list_position (combo_box, &x, &y, &width, &height);