GNOME Bugzilla – Bug 587523
Allow custom column types in the list store editor
Last modified: 2009-10-31 03:27:19 UTC
I need a way to select PyObject as a column type in the ListStore columns editor. I've hacked the source to register a type "PyObject" and add it to the combo but it's not very convenient to patch every new release of Glade3. Either allow me to enter any type name, without validation, or let me register the type PyObject in some way. The PyObject type, which is registered by PyGTK presumably, lets me store native Python objects in my PyGTK ListStores, something I use frequently.
Probably allowing non validated input is better, as other bindings may need new types. Is this patch enough? (couldn't test it) --- a/plugins/gtk+/glade-column-types.c +++ b/plugins/gtk+/glade-column-types.c @@ -738,7 +738,7 @@ column_type_edited (GtkCellRendererText *cell, if (!gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (eprop_types->store), &iter, path)) return; - if (type_name && (type = lookup_type (type_name)) != 0) + if (type_name) { column_name = glade_name_context_new_name (eprop_types->context, type_name); eprop_column_append (eprop, type, column_name);
*** This bug has been marked as a duplicate of bug 597095 ***