[Glade-devel] Copy/Paste
- From: Tristan Van Berkom <tristan van berkom gmail com> (Tristan Van Berkom)
- Subject: [Glade-devel] Copy/Paste
- Date: Mon, 25 Oct 2004 16:13:54 -0400
Hi all,
I hazarded a first try on copy/paste, the basic Idea was to "dup"
the widget.
This works except on two counts:
- Children for the moment aren't duped, I'll have to figure out a
way of duping children
while maintaining a maximum value of code reuse (i.e. I dont want a dual
implementation of glade_widget_new/glade_widget_set_widget...)
It might be as simple as useing my current dup, but adding a recursive
glade_widget_dup over the children before returning...
- Here is the real stickler, In order to not break widgets
functionality inside the
glade environment, I have to call the "post_create_function" for
that class, which
isn't a problem except for instances where the
post_create_function wants to
popup a dialog to determine some default properties, like the
"size" property
on the GtkHBox/GtkVBox, These properties are implicitly transfered by the
widget duplication anyway so the operation can easily be dropped.
Thing is, the obvious solution involves a design change, hence the post for
discussion on the list, AFAICS; we need dissociation between the post_create
stuff and the "gather_initial_properties" stuff.
This could be tackled in a number of ways, the easiest IMO would be to add
another plugin delagate function to handle initial properties that
could be ignored
in cases such as a "glade_widget_dup()", another more interesting approach I've
been pondering is to write a generic popup for all widgets (similar to
the property
editor, but dialog style) and have a definition of which properties that need
assigning at creation time, and then remove that extra bloat from the
plug-in code.
Soooo, what do people think ?
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]