[gimp] app: Fix a free cell renderer for GimpLanguageEntry



commit 20aa60ac8ca8cc688ebbb8d18203da0d27bbcf7b
Author: Martin Nordholts <martinn src gnome org>
Date:   Sat Jul 18 19:55:07 2009 +0200

    app: Fix a free cell renderer for GimpLanguageEntry
    
    We must set the text column with
    gtk_entry_completion_set_text_column() in order to get a free cell
    renderer.

 app/widgets/gimplanguageentry.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/app/widgets/gimplanguageentry.c b/app/widgets/gimplanguageentry.c
index 4234e23..a534703 100644
--- a/app/widgets/gimplanguageentry.c
+++ b/app/widgets/gimplanguageentry.c
@@ -94,10 +94,15 @@ gimp_language_entry_constructor (GType                  type,
 
       completion = g_object_new (GTK_TYPE_ENTRY_COMPLETION,
                                  "model",             entry->store,
-                                 "text-column",       GIMP_LANGUAGE_STORE_LANGUAGE,
                                  "inline-selection",  TRUE,
                                  NULL);
 
+      /* Note that we must use this function to set the text column,
+       * otherwise we won't get a cell renderer for free
+       */
+      gtk_entry_completion_set_text_column (completion,
+                                            GIMP_LANGUAGE_STORE_LANGUAGE);
+
       gtk_entry_set_completion (GTK_ENTRY (entry), completion);
       g_object_unref (completion);
     }



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