Re: Pluggable widgets II



On Wed, 20 Dec 2006, Mark McLoughlin wrote:

	Suppose gnome-panel implements PanelMenu[1] as a sub-class of GtkMenu
in order to display an ugly logo on the left hand side of the menu.

	If a platform vendor goes to the trouble of introducing a customised
GtkMenu implementation, then how does the vendor ensure that the
customised GtkMenu implementation gets used by gnome-panel?

for instance via a gtk module like you suggest, and maybe some rc-files if
he's doing his own theming/look.

	With this API the vendor would need to have a gtk module or library
especially for the gnome-panel in order to appoint a new implementation
of PanelMenu.

if he *only* means to change the panel menu yes. if all menus should have
the logo, all apps will need the module/library.

	It seems to me that, in this case, you'd want PanelMenu to
automatically sub-class the customised GtkMenu implementation.

not only want to, but *have* to. it's the only way to ensure a newly
plugged type conforms to the required interface (GtkMenu), so appointing
a type not derived from GtkMenu for a stock GtkMenu would not work.

I can't
imagine that being practical, though.

i don't think there is any alternative to this approach.

Cheers,
Mark.

[1] - http://www.gnome.org/~markmc/code/panel-menu.c

---
ciaoTJ



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