[Glade-users] Fwd: Failing to display a custom fake property



If you want to actually edit the GtkListStore values using Glade's
liststore data editor then
it most certainly must be in the project, yes.

A better example, if all you want is a custom property type that is a
list of string tuples, would
be to check out how - say - GtkComboBoxText serializes / deserializes
the "items" property.

In that case we have exactly that, a custom list of string tuples
(each element has some text
to appear in the list and an "id" to associate with that item).

In Glade's GTK+ plugin I think it's implemented using a convenience
GladeStringList type or such
(and has a custom little property editor which edits the tuples using
a treeview).

Cheers,
    -Tristan


On Fri, Feb 7, 2014 at 7:18 PM, Alejandro T. Colombini
<atcolombini at gmail.com> wrote:

My "guess" is that somewhere in your plugin, you are adding a new object
to the project and you want that new widget to automatically refer to this
GtkListStore which you are adding at the same time.


The part of the catalog where I define the fake property is this:

<property save="False" ignore="True" id="links" name="Links"
disabled="True">
  <parameter-spec>
    <type>GParamObject</type>
    <value-type>GtkListStore</value-type>
  </parameter-spec>
</property>

The GtkListStore was not meant to be an object in the project, just a
data holder for the fake property, I thought I didn't need to have it as
a GladeWidget in the project but I was wrong. I also guess the only
workaround for it is to define a boxed type to hold the values, as you
did with the Columns and Data properties in the Gtk+ catalog. Or maybe
there's a way to avoid the GladeWidget to show up in the Glade project
tree so that the the object exists in the project but the user can't see
it listed. Is there something like that?

Thanks for the tips.

Regards.




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