Re: Pluggable widgets II
- From: Mark McLoughlin <markmc redhat com>
- To: Tim Janik <timj imendio com>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: Pluggable widgets II
- Date: Wed, 20 Dec 2006 13:52:11 +0000
On Wed, 2006-12-20 at 10:46 +0100, Tim Janik wrote:
> On Wed, 20 Dec 2006, Mark McLoughlin wrote:
> > Whichever it is, I'm wondering about things like VinoUrl - i.e. an
> > application derived widget. Should it be expected that a plugged-in
> > re-implementation of GtkLabel would also be used by VinoUrl? Probably
> > not, now that I think of it.
> i really don't know anything about VinoURL.
> however, if you need exactly a GtkLabel for it, you'll call
> g_object_new (GTK_TYPE_LABEL, NULL). but if you mean to look/behave
> like the rest of the labels on a platform and just need a widget that
> implements the GtkLabel API, you'll call g_factory_create (GTK_TYPE_LABEL)
> (or gtk_label_new()) and may e.g. get a FoovendorLabelWithFunkyColors that
> is derived from GtkLabel.
I'm not explaining myself very well. My apologies.
Suppose gnome-panel implements PanelMenu 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?
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
It seems to me that, in this case, you'd want PanelMenu to
automatically sub-class the customised GtkMenu implementation. I can't
imagine that being practical, though.
 - http://www.gnome.org/~markmc/code/panel-menu.c
] [Thread Prev