[Gtk-sharp-list] Glade# Pixmap Resource
Sat, 19 Feb 2005 14:16:10 -0800
For an immediate solution, I'm in favor of a patch where Glade# will
handle GtkImage and GtkToolButton on it's own. It can remove whatever
is needed to stop the widgets from loading the images while libglade
constructs them, and then, after libglade has done it's magic, Glade#
can throw the embedded resources into them on it's own. GtkImage and
GtkToolButton seem to the only base Gtk+ widgets that would need to be
changed. My only concern is that this could, potentially, cause
problems for people who actually want to use an external pixmap of the
same name as an embedded resource.
A long term solution, I'm thinking, would be an addition to the Glade
XML format (plus a tiny Glade designer hack?) and some collaboration
with the libglade guys.
Reimplementing Glade# would certainly score points with me for being
cool, but... well, I'm just too damn lazy. :-) Besides, that's duped
code, and the Catch-Up Game would have to be played with libglade all
the time. libglade is a nice library; I say we use it. It just needs a
little fixing up.
Glade 3.0 is being hacked away on, from what I hear, and is what
MonoDevelop is going to use. I'm thinking that makes this a good time
to get a long term solution in for Glade 3.0 and Glade# 2.something.
Any other ideas?
On Sat, 2005-02-19 at 11:29 -0200, Rafael Teixeira wrote:
> I didn't look if glade# mostly wraps libglade. If so I would first
> rewrite glade#, in fully managed code (it seems easy) so to redefine
> the xml to contain new semantics and representations for embedded
> resources. That kind of thing cannot be added in libglade as it is
> CLI-specific. That would put Glade# (we probably would need a new
> name) between what we have in WinForms and the XAML future.
> The main cost would be to have a new designer for working with the xml
> and embbedding support, but we need it for MonoDevelop and for Windows
> development already.
> Just some rough ideas...=20
> The ball is rolling, let's discuss.
> On Fri, 18 Feb 2005 19:56:23 -0800, Samuel Kaufman <firstname.lastname@example.org> wro=
> > Do you happen to know of other bindings or anything in libglade or Gtk+
> > that deal with embedded resources? Something I could look at as an
> > example of how similar functionality could be added to Glade#?
> > The most straightforward solution that comes to mind would be parsing
> > the XML and stripping out all GtkImages that reference filenames
> > identical to embedded resource filenames, and then having Glade# set th=
> > pixbuf, later. That seems way too complex, though. There must be a
> > better way.
> > On Fri, 2005-02-18 at 15:57 -0200, Rafael Teixeira wrote:
> > > AFAIK, No.
> > >
> > > Normally is a one-liner to do things programatically, but I would lov=
> > > to have Glade# extended to deal with embedded resources.
> > >
> > >
> > > On Tue, 15 Feb 2005 22:56:12 +0000, Samuel Kaufman <email@example.com>=
> > > > My project has a PNG embedded as a resource in the executable assem=
> > > > I'm trying to use that PNG on a window in a Glade# project, where
> > > > gui.glade is also a resource in the assembly. It doesn't look like
> > > > Glade.XML is managing to find the the PNG on it's own. How can I g=
> > > > to find this pixmap? Is there a clean way to do it without using c=
> > > > to manually drop the pixmap onto the window?
> > > > [ snip ]
> > >
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
-----END PGP SIGNATURE-----