After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 164809 - Checkboxes with inconsistent status are not drawn properly but with the default theme
Checkboxes with inconsistent status are not drawn properly but with the defau...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.6.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
: 165055 319602 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-01-21 10:09 UTC by Guillaume Proux
Modified: 2007-06-26 19:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add the support of displaying inconsistent status for the wimp theme (2.42 KB, patch)
2005-02-08 08:00 UTC, Guillaume Proux
none Details | Review
Patch to enable the support of inconsistent status for checkboxes in the gtk-wimp theme (19.17 KB, patch)
2005-03-27 16:49 UTC, Guillaume Proux
none 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) (21.73 KB, patch)
2005-03-28 13:24 UTC, Guillaume Proux
none Details | Review
Cleaned-up patch (3.73 KB, patch)
2005-04-06 07:44 UTC, Tor Lillqvist
needs-work Details | Review
Update of last patch (4.63 KB, patch)
2007-05-29 01:52 UTC, Cody Russell
none Details | Review
Updated patch (3.77 KB, patch)
2007-06-26 19:44 UTC, Cody Russell
committed Details | Review

Description Guillaume Proux 2005-01-21 10:09:54 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()
Comment 1 Guillaume Proux 2005-01-21 10:12:17 UTC
... 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
Comment 2 Owen Taylor 2005-01-21 15:23:50 UTC
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.)

Comment 3 Owen Taylor 2005-01-24 04:32:56 UTC
*** Bug 165055 has been marked as a duplicate of this bug. ***
Comment 4 Guillaume Proux 2005-01-24 05:16:05 UTC
Yes, this problems occurs ALSO with the native MS-Windows native theme (the only
one I am really keen to see fixed too!)
Comment 5 Guillaume Proux 2005-02-08 08:00:14 UTC
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.
Comment 6 Guillaume Proux 2005-03-27 16:49:55 UTC
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.
Comment 7 Guillaume Proux 2005-03-28 13:24:54 UTC
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).
Comment 8 Matthias Clasen 2005-04-06 04:27:22 UTC
Tor, does this patch look good to you ?
Comment 9 Tor Lillqvist 2005-04-06 06:45:57 UTC
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.
Comment 10 Tor Lillqvist 2005-04-06 07:32:44 UTC
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.
Comment 11 Tor Lillqvist 2005-04-06 07:42:20 UTC
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).
Comment 12 Tor Lillqvist 2005-04-06 07:44:17 UTC
Created attachment 39737 [details] [review]
Cleaned-up patch
Comment 13 Guillaume Proux 2005-04-06 09:14:38 UTC
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.
Comment 14 Tor Lillqvist 2005-10-24 13:19:09 UTC
*** Bug 319602 has been marked as a duplicate of this bug. ***
Comment 15 Philip Withnall 2007-05-26 14:53:27 UTC
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)
Comment 16 Cody Russell 2007-05-29 01:52:51 UTC
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.
Comment 17 Cody Russell 2007-06-26 19:44:39 UTC
Created attachment 90697 [details] [review]
Updated patch
Comment 18 Cody Russell 2007-06-26 19:53:34 UTC
Committed to trunk and gtk-2-10 branch.