GNOME Bugzilla – Bug 164809
Checkboxes with inconsistent status are not drawn properly but with the default theme
Last modified: 2007-06-26 19:53:34 UTC
Got gladewin32 (gtk-win32-2.6.1-rc1.exe) from gladewin32 homepage Got pygtk 2.4.1 from Cedric Gustin's Homepage (http://www.pcpm.ucl.ac.be/~gustin/win32_ports/binaries/pygtk-2.4.1.win32-py2.3.exe) import gtk x=gtk.MessageDialog() y=gtk.CheckButton() y.set_inconsistent(True) x.vbox.add(y) x.show_all() x.run() x.destroy()
... Pressed commit a bit too quickly. Anyway, this is a bit annoying because the application I wrote could appear disfunctioning graphically if the end user changes theme. If you check out the very simple sample above you can see the behaviour by simply cycling through the themes in the gtkthemeselector.exe and executing the python script above. I am pretty sure the problem also occured with gtk+ 2.4
I'm closing this as "NOTABUG" ... but it is a bug of course ... it's a bug in all the themes other than the default. There's nothing that the GTK+ maintainers can do to fix the other themes; so you have to file bugs against those themes, so that their maintainers can fix them. (If the problem occurs with the MS-Windows native theme shipped with GTK+-2.6, then please reopen this bug, since that is a theme we have control over.)
*** Bug 165055 has been marked as a duplicate of this bug. ***
Yes, this problems occurs ALSO with the native MS-Windows native theme (the only one I am really keen to see fixed too!)
Created attachment 37145 [details] [review] Add the support of displaying inconsistent status for the wimp theme **warning**: not being equipped with a dev environment, this is a "dark box" patch. If I am lucky it should compile with it. I would be grateful if somebody could try to patch and test.
Created attachment 39308 [details] [review] Patch to enable the support of inconsistent status for checkboxes in the gtk-wimp theme The patch has been actually compiled and tested on my setup and has shown to solve the case exposed in the first description. However, i don't know how to make a nicer patch. I use cvs diff through wincvs and it seems that the patch is "bizarre". Can somebody try it and apply it to the mainline? Of course, all my changes are licensed under the LGPL if this needs to be clearly expressed.
Created attachment 39335 [details] [review] Updated patch to enable the support of inconsistent status for checkboxes in the gtk-wimp theme (works in both case of themed (XP) and unthemed OSes) tested in XP in classic mode (unthemed) and in XP in themed mode (Luna).
Tor, does this patch look good to you ?
No, there is some Windows/Unix line ending screwup in it that makes it hard to see what actually has changed. But I can try to see if I can make sense of it.
Hmm, after fixing the patch so that it actually applies and I can use cvs diff to see what actually is changed...: - Why change #include "gdk/win32/gdkwin32.h" to #include "gdk/gdkwin32.h"? As these files are in the GTK+ sources, they should be built using the headers from the same GTK+ source tree, not installed headers (which might not even exist yet when building it). If you intend to make the ms-windows theme engine compilable without the rest of the GTK+ source tree, add suitable #ifdefs for that, don't break building inside the source tree. - Use 8 column tab stops, or no tabs at all. Avoid gratuituous spacing changes. Use the same indentation and spacing convention as the existing code. (The ms-windows theme engine code uses quite inconsistent spacing to begin with, though.) But anyway, sure, what actual changes is left after cleaning up the patch can be applied. Will do. I haven't really tested the ms-windows theme engine much myself, but I trust that if the reporter sees the change as an improvement that it really is ;-) I'll attach the what's left of the patch after cleaning up first, though, so Guillaume can check if I screwed up something.
BTW, I think the xp_theme_defs.h file should be removed from the sources and we instead require people who want to build the ms-windows theme engine to have uxtheme.h and tmschema.h from the Platform SDK. The xp_theme_defs.h contents might have been lifted directly from Microsoft's headers, as far as I understand, and not produced using clean room techniques (from public documentation or by experimentation).
Created attachment 39737 [details] [review] Cleaned-up patch
Sorry for my patch being messy. I would welcome some guidelines how to develop on Windows. I really needed that patch so I use WinCVS to check out gtk+ and use DevCPP to compile directly this module independantly of the rest of gtk. (which explains why the #include got changed. Tor, I checked the patch and it looks clean. The uxtheme.h and tmschema.h don't seem to be part of the DevCPP provided headers so I could not compile your patch without defining again those consts as I did before by looking up their value in the web MSDN.
*** Bug 319602 has been marked as a duplicate of this bug. ***
Patch doesn't apply cleanly. Reviewing it would take a little while. (Working on http://mail.gnome.org/archives/gtk-devel-list/2007-March/msg00148.html)
Created attachment 88981 [details] [review] Update of last patch This patch applies cleanly to svn trunk. I'll try to get about testing/reviewing it later, but posting it here in the mean time.
Created attachment 90697 [details] [review] Updated patch
Committed to trunk and gtk-2-10 branch.