only hide the search dialog and send focus events if the search dialog is

2007-03-10  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_search_dialog_hide): only
	hide the search dialog and send focus events if the search dialog
	is currently visible.


svn path=/trunk/; revision=17464
This commit is contained in:
Kristian Rietveld 2007-03-10 22:42:40 +00:00 committed by Kristian Rietveld
parent d7a33adeda
commit f74a07b091
2 changed files with 14 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2007-03-10 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_search_dialog_hide): only
hide the search dialog and send focus events if the search dialog
is currently visible.
2007-03-10 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkdrawable-quartz.c:

View File

@ -13734,11 +13734,14 @@ gtk_tree_view_search_dialog_hide (GtkWidget *search_dialog,
tree_view->priv->typeselect_flush_timeout = 0;
}
/* send focus-in event */
send_focus_change (GTK_WIDGET (tree_view->priv->search_entry), FALSE);
gtk_widget_hide (search_dialog);
gtk_entry_set_text (GTK_ENTRY (tree_view->priv->search_entry), "");
send_focus_change (GTK_WIDGET (tree_view), TRUE);
if (GTK_WIDGET_VISIBLE (search_dialog))
{
/* send focus-in event */
send_focus_change (GTK_WIDGET (tree_view->priv->search_entry), FALSE);
gtk_widget_hide (search_dialog);
gtk_entry_set_text (GTK_ENTRY (tree_view->priv->search_entry), "");
send_focus_change (GTK_WIDGET (tree_view), TRUE);
}
}
static void