From c3c40fd45f2c40c26aee5d1947d7cc8f0a577586 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Sat, 24 Sep 2011 10:56:50 +0200 Subject: [PATCH] Bug 545910 - crash when selecting a font after a search Add an explicit search entry, so the treeview's automatic search popup doesn't break our grab and closes the dialog in the middle of setting up the serach popup. --- app/widgets/gimpcontainerpopup.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/widgets/gimpcontainerpopup.c b/app/widgets/gimpcontainerpopup.c index 3791173117..fabe1a5013 100644 --- a/app/widgets/gimpcontainerpopup.c +++ b/app/widgets/gimpcontainerpopup.c @@ -35,6 +35,7 @@ #include "gimpcontainerbox.h" #include "gimpcontainereditor.h" #include "gimpcontainerpopup.h" +#include "gimpcontainertreeview.h" #include "gimpcontainerview.h" #include "gimpdialogfactory.h" #include "gimpviewrenderer.h" @@ -560,6 +561,18 @@ gimp_container_popup_create_view (GimpContainerPopup *popup) gimp_container_view_set_reorderable (GIMP_CONTAINER_VIEW (popup->editor->view), FALSE); + if (popup->view_type == GIMP_VIEW_TYPE_LIST) + { + GtkWidget *search_entry; + + search_entry = gtk_entry_new (); + gtk_box_pack_end (GTK_BOX (popup->editor->view), search_entry, + FALSE, FALSE, 0); + gtk_tree_view_set_search_entry (GTK_TREE_VIEW (GIMP_CONTAINER_TREE_VIEW (GIMP_CONTAINER_VIEW (popup->editor->view))->view), + GTK_ENTRY (search_entry)); + gtk_widget_show (search_entry); + } + gimp_container_box_set_size_request (GIMP_CONTAINER_BOX (popup->editor->view), 6 * (popup->default_view_size + 2 * popup->view_border_width),