Popdown the list before changing the active iter, otherwise people will be

2006-03-15  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c (gtk_combo_box_list_button_released)
	(gtk_combo_box_list_key_press): Popdown the list before changing
	the active iter, otherwise people will be surprised by the
	grabs that are still in place when their ::changed handler
	runs.
This commit is contained in:
Matthias Clasen
2006-03-15 19:06:24 +00:00
committed by Matthias Clasen
parent b6deb20e1b
commit afb52438cd
3 changed files with 23 additions and 5 deletions

View File

@@ -1,3 +1,11 @@
2006-03-15 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombobox.c (gtk_combo_box_list_button_released)
(gtk_combo_box_list_key_press): Popdown the list before changing
the active iter, otherwise people will be surprised by the
grabs that are still in place when their ::changed handler
runs.
2006-03-15 Dom Lachowicz <cinamod@hotmail.com>
* modules/engines/ms-windows/msw_style.c: Override style->realize/

View File

@@ -1,3 +1,11 @@
2006-03-15 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombobox.c (gtk_combo_box_list_button_released)
(gtk_combo_box_list_key_press): Popdown the list before changing
the active iter, otherwise people will be surprised by the
grabs that are still in place when their ::changed handler
runs.
2006-03-15 Dom Lachowicz <cinamod@hotmail.com>
* modules/engines/ms-windows/msw_style.c: Override style->realize/

View File

@@ -3465,11 +3465,11 @@ gtk_combo_box_list_button_released (GtkWidget *widget,
gtk_tree_model_get_iter (combo_box->priv->model, &iter, path);
gtk_tree_path_free (path);
gtk_combo_box_popdown (combo_box);
if (tree_column_row_is_sensitive (combo_box, &iter))
gtk_combo_box_set_active_iter (combo_box, &iter);
gtk_combo_box_popdown (combo_box);
return TRUE;
}
@@ -3588,16 +3588,18 @@ gtk_combo_box_list_key_press (GtkWidget *widget,
GtkTreeIter iter;
GtkTreeModel *model = NULL;
gtk_combo_box_popdown (combo_box);
if (combo_box->priv->model)
{
GtkTreeSelection *sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (combo_box->priv->tree_view));
GtkTreeSelection *sel;
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (combo_box->priv->tree_view));
if (gtk_tree_selection_get_selected (sel, &model, &iter))
gtk_combo_box_set_active_iter (combo_box, &iter);
}
gtk_combo_box_popdown (combo_box);
return TRUE;
}