[Glade-users] custom properties stored in glade xml file



On Tue, 14 Dec 2004 16:07:50 -0500, Tristan Van Berkom
<tristan van berkom gmail com> wrote:

I'm not sure I understand what you are suggesting, you want to introduce
a function like:

SUGGESTION 1:

gpointer glade_xml_get_custom_property(const gchar *key);

into libglade (highly unlikely IMO) ?

Yes, this is what I am suggesting.

or you want to define custom properties (as described in the glade-3 xml
catalog) that are editable from the property editor and can later be retrieved
like so:

SUGGESTION 2:

GtkWidget *widget = glade_xml_get_widget (xml, "mywidget");
gpointer      custom_prop = g_object_get_data (G_OBJECT (widget), "myprop");

Well, if I am retrieving a GtkToggleButton, it's not going to have the
property I want
to add to it with this way, unless I subclass. Hmm... almost makes me
think that glade
should allow me to create a subclass of, for instance,
GtkToggleButton, just to allow me
to add a few properties and nothing else, all from withing glade and
no extra source code.
! :-)
That way, I can easily achieve the effect suggested in SUGGESTION 1.

or are you proposing something entirely different ?

Yes, now I wish to propose an extension to SUGGESTION 2 to accomodate
SUGGESTION 1. Allow creating subclasses from within glade for the sake
of adding a few properties.

[...]
Also, is glade pluggable into eclipse? For instance, can I write yet
another plugin, so that,
when I click on an XML file line, property editor comes up with the
widget of interest
where the cursor is located? Just wondering. Could be handy.

glade-3 was designed to be be pluggable to an IDE, we're definitly
not there yet though (maybe sometime next year ?).

OK, good to know though. Maybe I'll have some time for an eclipse plugin.
Who knows (since I really would like to code an eclipse plugin anyways at
this stage, ASAP. Can I code a small one which supports just whatever
functionality is there right now? What kind of IDE API do we have so far?)

Regards, and thanks,

Neil




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