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.
This commit is contained in:
Michael Natterer 2011-09-24 10:56:50 +02:00
parent 23978ecec3
commit c3c40fd45f

View file

@ -35,6 +35,7 @@
#include "gimpcontainerbox.h" #include "gimpcontainerbox.h"
#include "gimpcontainereditor.h" #include "gimpcontainereditor.h"
#include "gimpcontainerpopup.h" #include "gimpcontainerpopup.h"
#include "gimpcontainertreeview.h"
#include "gimpcontainerview.h" #include "gimpcontainerview.h"
#include "gimpdialogfactory.h" #include "gimpdialogfactory.h"
#include "gimpviewrenderer.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), gimp_container_view_set_reorderable (GIMP_CONTAINER_VIEW (popup->editor->view),
FALSE); 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), gimp_container_box_set_size_request (GIMP_CONTAINER_BOX (popup->editor->view),
6 * (popup->default_view_size + 6 * (popup->default_view_size +
2 * popup->view_border_width), 2 * popup->view_border_width),