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

@ -1,3 +1,16 @@
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.
2005-02-14 Matthias Clasen <mclasen@redhat.com>
* configure.in: Kill --enable-ansi (#164394)

View File

@ -1,3 +1,16 @@
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.
2005-02-14 Matthias Clasen <mclasen@redhat.com>
* configure.in: Kill --enable-ansi (#164394)

View File

@ -1,3 +1,16 @@
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.
2005-02-14 Matthias Clasen <mclasen@redhat.com>
* configure.in: Kill --enable-ansi (#164394)

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);

View File

@ -1388,6 +1388,11 @@ gtk_tree_view_destroy (GtkObject *object)
gtk_widget_destroy (tree_view->priv->search_window);
tree_view->priv->search_window = NULL;
tree_view->priv->search_entry = NULL;
if (tree_view->priv->typeselect_flush_timeout)
{
g_source_remove (tree_view->priv->typeselect_flush_timeout);
tree_view->priv->typeselect_flush_timeout = 0;
}
}
if (tree_view->priv->search_destroy)
@ -8893,13 +8898,27 @@ send_focus_change (GtkWidget *widget,
static void
gtk_tree_view_ensure_interactive_directory (GtkTreeView *tree_view)
{
GtkWidget *frame, *vbox;
GtkWidget *frame, *vbox, *toplevel;
if (tree_view->priv->search_window != NULL)
return;
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (tree_view));
if (tree_view->priv->search_window != NULL)
{
if (GTK_WINDOW (toplevel)->group)
gtk_window_group_add_window (GTK_WINDOW (toplevel)->group,
GTK_WINDOW (tree_view->priv->search_window));
else if (GTK_WINDOW (tree_view->priv->search_window)->group)
gtk_window_group_remove_window (GTK_WINDOW (tree_view->priv->search_window)->group,
GTK_WINDOW (tree_view->priv->search_window));
return;
}
tree_view->priv->search_window = gtk_window_new (GTK_WINDOW_POPUP);
if (GTK_WINDOW (toplevel)->group)
gtk_window_group_add_window (GTK_WINDOW (toplevel)->group,
GTK_WINDOW (tree_view->priv->search_window));
gtk_window_set_modal (GTK_WINDOW (tree_view->priv->search_window), TRUE);
g_signal_connect (tree_view->priv->search_window, "delete_event",
G_CALLBACK (gtk_tree_view_search_delete_event),