Commit f05acd70 authored by Javier Jardón's avatar Javier Jardón

gtk/gtktreeview.c: Use accessor functions to access GtkWindow

parent 31d22d30
......@@ -10357,21 +10357,26 @@ static void
gtk_tree_view_ensure_interactive_directory (GtkTreeView *tree_view)
{
GtkWidget *frame, *vbox, *toplevel;
GtkWindowGroup *group;
GdkScreen *screen;
if (tree_view->priv->search_custom_entry_set)
return;
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (tree_view));
group = gtk_window_get_group (GTK_WINDOW (toplevel));
screen = gtk_widget_get_screen (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,
GtkWindowGroup *search_group;
search_group = gtk_window_get_group (GTK_WINDOW (tree_view->priv->search_window));
if (group)
gtk_window_group_add_window (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,
else if (search_group)
gtk_window_group_remove_window (search_group,
GTK_WINDOW (tree_view->priv->search_window));
gtk_window_set_screen (GTK_WINDOW (tree_view->priv->search_window), screen);
return;
......@@ -10380,8 +10385,8 @@ gtk_tree_view_ensure_interactive_directory (GtkTreeView *tree_view)
tree_view->priv->search_window = gtk_window_new (GTK_WINDOW_POPUP);
gtk_window_set_screen (GTK_WINDOW (tree_view->priv->search_window), screen);
if (GTK_WINDOW (toplevel)->group)
gtk_window_group_add_window (GTK_WINDOW (toplevel)->group,
if (group)
gtk_window_group_add_window (group,
GTK_WINDOW (tree_view->priv->search_window));
gtk_window_set_type_hint (GTK_WINDOW (tree_view->priv->search_window),
......
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