[gimp] Bug 545910 - crash when selecting a font after a search



commit c3c40fd45f2c40c26aee5d1947d7cc8f0a577586
Author: Michael Natterer <mitch gimp org>
Date:   Sat Sep 24 10:56:50 2011 +0200

    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 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimpcontainerpopup.c b/app/widgets/gimpcontainerpopup.c
index 3791173..fabe1a5 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),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]