[Mono-dev] Gtk depends on Winforms ¿?
skolima at gmail.com
Wed Sep 9 11:10:45 EDT 2009
Unfortunately, the button does not appear to use native themes on my
WinXP machine (SP3, GTK# installed with Mono 188.8.131.52).
On Wed, Sep 9, 2009 at 5:05 PM, Christian Hoff<christian_hoff at gmx.net> wrote:
> 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.
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
More information about the Mono-devel-list