Commit a0c5253c authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

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.
parent 71f5aa3f
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)
......
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)
......
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)
......
......@@ -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);
......
......@@ -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),
......
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