[Glade-devel] Glade: toplevel widget embedding

Vincent Geddes wrote:

On Sat, 2006-10-07 at 20:42 -0400, Tristan Van Berkom wrote:

Good point,
   I would imagine that a convenience proxy object would be responsable 
observing the project's selection and showing the correct toplevel 
on the selection... no need for a glade_widget_show ()



On this topic, I would actually like to remove `glade_widget_show()' and
`glade_widget_hide()' from the libgladeui API since I think they don't
really make sense anymore. All GladeWidgets should be visible by
default. GladeWidgets will only hidden if they are parentless (and hence
not in a GladeDesignLayout). 

The only thing is that the Undo/Redo code in glade-command.[ch] uses
_show() and _hide() when showing widgets that have been re-created or
hiding widgets that have just been created. So we would need to work
around that.   

What do you think?

I think that undo/redo should be somehow responsable for also
maintaining project selection (if /delete/ is deleting a selected
widget, it should restore selection ?).

Currently the GladeApp/GladeCommand api is built around the selection
(i.e. it always operates on selected widgets) - that should probably change
in order to support a more generic approach to commands so - the command
code will have to assume responsability for selection.

Ofcourse the GladeTab - or GladeProjectSomethingorother (would prefer
to name it something not associated with a notebook) would still only have
to watch project selection and update itself when appropriate.

How about this:
  /* if widget is NULL, remove current GladeWidget */
 glade_design_layout_put (GladeWidget *widget);

Sure, I think its missing the first argument which would be the
GladeDesignLayout that your adding a GladeWidget to, also I would
expect internally it might use gtk_container_add/remove() on
GLADE_WIDGET (w)->object (and that the GladeDesignLayout would
implement the add/remove vfuncs of the GtkContainer class).


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