[Gtk-sharp-list] [Mono-dev] Gtk depends on Winforms ¿?
miltondp at gmail.com
Wed Sep 9 12:53:29 EDT 2009
Here is the screenshot on Windows XP.
El mié, 09-09-2009 a las 17:05 +0200, Christian Hoff escribió:
> Hi folks,
> as you may have noticed, old Gtk# versions (< 2.12.8) did not use XP's
> visual styles. Later versions have a workaround: they call
> System.WIndows.Forms.Application.DoEvents which seems to enable XP's
> theming. This workaround is far from optimal as it created a Winforms
> That's why I tried to integrate the code of Application.DoEvents into
> Gtk# directly. As I do not have a Windows XP machine to test, I cannot
> verify if it works.
> I have attached an assembly and it's source code (change extension to
> .exe; GMail does not allow executables as attachments) that can be run
> with any Gtk# 2.12 version on XP. It uses a tweaked Gtk.Application
> class with a new mechanism to enable theming.
> I would really appreciate some feedback from the community as to whether
> the new approach works (that is, if the attached application appears
> with visual styles enabled). Just reply with a screenshot of the running
> app on XP if you're not sure what I mean :-) .
> Mike Kestner wrote:
> > On Sat, 2009-09-05 at 09:15 +0200, Christian Hoff wrote:
> >>> In Windows I use 'mkbundle' 
> >> We should probably put that code in a try-block. What do you think, Mike?
> > My question would be, what do you do in the catch block?
> > The winforms reflection thing is a huge hack, we know that, and the
> > poster is tripping over it because of using mkbundle instead of
> > depending on mono or .Net.
> > We could also take the stance that if somebody wants to do this sort of
> > minimal packaging, they are required to add an artificial ref to swf to
> > ensure it gets bundled. But they won't have any clue that's required if
> > we just silently fallback to unthemed windows when we can't find swf.
> > According to Robert Jordan on this thread, it's a PeekMessage/GetMessage
> > loop that's required to happen before the first handle is created. We
> > should try a pinvoke solution like that and see if it works so we can
> > remove the hack altogether instead of figuring out ways to make the hack
> > more palatable.
> > Mike
> Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com
Jabber ID: miltondp at gmail.com
GnuPG Public Key: gpg --keyserver subkeys.pgp.net --recv-key 0x663C185C
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 13674 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20090909/81841601/attachment-0001.png
More information about the Gtk-sharp-list