git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] gitk: Avoid calling tk_setPalette on Windows
@ 2010-03-12 18:31 Pat Thoyts
  2010-03-12 18:31 ` [PATCH 2/3] gitk: Add emacs editor variable block Pat Thoyts
  2010-03-20  6:32 ` [PATCH 1/3] gitk: Avoid calling tk_setPalette on Windows Jonathan Nieder
  0 siblings, 2 replies; 10+ messages in thread
From: Pat Thoyts @ 2010-03-12 18:31 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras, Pat Thoyts

This just messes up the system colors. Leave them alone.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
---
 gitk |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/gitk b/gitk
index 1f36a3e..dc9b8a8 100755
--- a/gitk
+++ b/gitk
@@ -10849,6 +10849,7 @@ proc setselbg {c} {
 # radiobuttons look bad.  This chooses white for selectColor if the
 # background color is light, or black if it is dark.
 proc setui {c} {
+    if {[tk windowingsystem] eq "win32"} { return }
     set bg [winfo rgb . $c]
     set selc black
     if {[lindex $bg 0] + 1.5 * [lindex $bg 1] + 0.5 * [lindex $bg 2] > 100000} {
-- 
1.6.6

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/3] gitk: Add emacs editor variable block.
  2010-03-12 18:31 [PATCH 1/3] gitk: Avoid calling tk_setPalette on Windows Pat Thoyts
@ 2010-03-12 18:31 ` Pat Thoyts
  2010-03-12 18:31   ` [PATCH 3/3] gitk: fix display of copyright symbol Pat Thoyts
  2010-03-20  6:32 ` [PATCH 1/3] gitk: Avoid calling tk_setPalette on Windows Jonathan Nieder
  1 sibling, 1 reply; 10+ messages in thread
From: Pat Thoyts @ 2010-03-12 18:31 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras, Pat Thoyts

Help contributors use the correct indentation style.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
---
 gitk |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/gitk b/gitk
index dc9b8a8..ed5f6ab 100755
--- a/gitk
+++ b/gitk
@@ -11614,3 +11614,9 @@ if {[tk windowingsystem] eq "win32"} {
 }
 
 getcommits {}
+
+# Local variables:
+# mode: tcl
+# indent-tabs-mode: t
+# tab-width: 8
+# End:
-- 
1.6.6

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/3] gitk: fix display of copyright symbol
  2010-03-12 18:31 ` [PATCH 2/3] gitk: Add emacs editor variable block Pat Thoyts
@ 2010-03-12 18:31   ` Pat Thoyts
  2010-03-20  6:14     ` [PATCH] gitk: Fix display of copyright symbol in non-utf-8 locales Jonathan Nieder
  0 siblings, 1 reply; 10+ messages in thread
From: Pat Thoyts @ 2010-03-12 18:31 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras, Pat Thoyts

The script file uses utf-8 encoding but when sourced it will be read
using the default system encoding which is never utf8 on windows. This
causes the copyright symbol to display incorrectly in the about dialog.
Using the unicode escape sequence avoids incorrect decoding but does
require a double escape in the .po files.

Also adjusted the year range.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
---
 gitk     |    2 +-
 po/de.po |    4 ++--
 po/es.po |    4 ++--
 po/fr.po |    4 ++--
 po/hu.po |    4 ++--
 po/it.po |    4 ++--
 po/ja.po |    4 ++--
 po/ru.po |    4 ++--
 po/sv.po |    4 ++--
 9 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/gitk b/gitk
index 1f36a3e..e1f3740 100755
--- a/gitk
+++ b/gitk
@@ -2782,7 +2782,7 @@ proc about {} {
     message $w.m -text [mc "
 Gitk - a commit viewer for git
 
-Copyright © 2005-2009 Paul Mackerras
+Copyright \u00a9 2005-2010 Paul Mackerras
 
 Use and redistribute under the terms of the GNU General Public License"] \
 	    -justify center -aspect 400 -border 2 -bg white -relief groove
diff --git a/po/de.po b/po/de.po
index c79aa9c..bd194a3 100644
--- a/po/de.po
+++ b/po/de.po
@@ -334,14 +334,14 @@ msgid ""
 "\n"
 "Gitk - a commit viewer for git\n"
 "\n"
-"Copyright ©9 2005-2009 Paul Mackerras\n"
+"Copyright \\u00a9 2005-2010 Paul Mackerras\n"
 "\n"
 "Use and redistribute under the terms of the GNU General Public License"
 msgstr ""
 "\n"
 "Gitk - eine Visualisierung der Git-Historie\n"
 "\n"
-"Copyright © 2005-2009 Paul Mackerras\n"
+"Copyright \\u00a9 2005-2010 Paul Mackerras\n"
 "\n"
 "Benutzung und Weiterverbreitung gemäß den Bedingungen der GNU General Public License"
 
diff --git a/po/es.po b/po/es.po
index 0e19b5e..0471dd0 100644
--- a/po/es.po
+++ b/po/es.po
@@ -281,14 +281,14 @@ msgid ""
 "\n"
 "Gitk - a commit viewer for git\n"
 "\n"
-"Copyright © 2005-2008 Paul Mackerras\n"
+"Copyright \\u00a9 2005-2010 Paul Mackerras\n"
 "\n"
 "Use and redistribute under the terms of the GNU General Public License"
 msgstr ""
 "\n"
 "Gitk - un visualizador de revisiones para git\n"
 "\n"
-"Copyright © 2005-2008 Paul Mackerras\n"
+"Copyright \\u00a9 2005-2010 Paul Mackerras\n"
 "\n"
 "Uso y redistribución permitidos según los términos de la Licencia Pública "
 "General de GNU (GNU GPL)"
diff --git a/po/fr.po b/po/fr.po
index cb0e1ed..5370ddc 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -334,14 +334,14 @@ msgid ""
 "\n"
 "Gitk - a commit viewer for git\n"
 "\n"
-"Copyright © 2005-2008 Paul Mackerras\n"
+"Copyright \\u00a9 2005-2010 Paul Mackerras\n"
 "\n"
 "Use and redistribute under the terms of the GNU General Public License"
 msgstr ""
 "\n"
 "Gitk - visualisateur de commit pour git\n"
 "\n"
-"Copyright © 2005-2008 Paul Mackerras\n"
+"Copyright \\u00a9 2005-2010 Paul Mackerras\n"
 "\n"
 "Utilisation et redistribution soumises aux termes de la GNU General Public "
 "License"
diff --git a/po/hu.po b/po/hu.po
index 1df212e..7262b61 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -333,14 +333,14 @@ msgid ""
 "\n"
 "Gitk - a commit viewer for git\n"
 "\n"
-"Copyright ©9 2005-2009 Paul Mackerras\n"
+"Copyright \\u00a9 2005-2010 Paul Mackerras\n"
 "\n"
 "Use and redistribute under the terms of the GNU General Public License"
 msgstr ""
 "\n"
 "Gitk - commit nézegető a githez\n"
 "\n"
-"Szerzői jog ©9 2005-2009 Paul Mackerras\n"
+"Szerzői jog \\u00a9 2005-2010 Paul Mackerras\n"
 "\n"
 "Használd és terjeszd a GNU General Public License feltételei mellett"
 
diff --git a/po/it.po b/po/it.po
index 4818652..a730d63 100644
--- a/po/it.po
+++ b/po/it.po
@@ -334,14 +334,14 @@ msgid ""
 "\n"
 "Gitk - a commit viewer for git\n"
 "\n"
-"Copyright © 2005-2009 Paul Mackerras\n"
+"Copyright \\u00a9 2005-2010 Paul Mackerras\n"
 "\n"
 "Use and redistribute under the terms of the GNU General Public License"
 msgstr ""
 "\n"
 "Gitk - un visualizzatore di revisioni per git\n"
 "\n"
-"Copyright © 2005-2009 Paul Mackerras\n"
+"Copyright \\u00a9 2005-2010 Paul Mackerras\n"
 "\n"
 "Utilizzo e redistribuzione permessi sotto i termini della GNU General Public "
 "License"
diff --git a/po/ja.po b/po/ja.po
index c0c92ad..4f47051 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -335,14 +335,14 @@ msgid ""
 "\n"
 "Gitk - a commit viewer for git\n"
 "\n"
-"Copyright © 2005-2008 Paul Mackerras\n"
+"Copyright \\u00a9 2005-2010 Paul Mackerras\n"
 "\n"
 "Use and redistribute under the terms of the GNU General Public License"
 msgstr ""
 "\n"
 "Gitk - gitコミットビューア\n"
 "\n"
-"Copyright © 2005-2008 Paul Mackerras\n"
+"Copyright \\u00a9 2005-2010 Paul Mackerras\n"
 "\n"
 "使用および再配布は GNU General Public License に従ってください"
 
diff --git a/po/ru.po b/po/ru.po
index 704eba8..c3d0285 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -313,14 +313,14 @@ msgid ""
 "\n"
 "Gitk - a commit viewer for git\n"
 "\n"
-"Copyright © 2005-2008 Paul Mackerras\n"
+"Copyright \\u00a9 2005-2010 Paul Mackerras\n"
 "\n"
 "Use and redistribute under the terms of the GNU General Public License"
 msgstr ""
 "\n"
 "Gitk - программа просмотра истории репозиториев Git\n"
 "\n"
-"Copyright (c) 2005-2008 Paul Mackerras\n"
+"Copyright \\u00a9 2005-2010 Paul Mackerras\n"
 "\n"
 "Использование и распространение согласно условиям GNU General Public License"
 
diff --git a/po/sv.po b/po/sv.po
index 0f5e2fd..386763a 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -334,14 +334,14 @@ msgid ""
 "\n"
 "Gitk - a commit viewer for git\n"
 "\n"
-"Copyright ©9 2005-2009 Paul Mackerras\n"
+"Copyright \\u00a9 2005-2010 Paul Mackerras\n"
 "\n"
 "Use and redistribute under the terms of the GNU General Public License"
 msgstr ""
 "\n"
 "Gitk - en incheckningsvisare för git\n"
 "\n"
-"Copyright © 2005-2009 Paul Mackerras\n"
+"Copyright \\u00a9 2005-2010 Paul Mackerras\n"
 "\n"
 "Använd och vidareförmedla enligt villkoren i GNU General Public License"
 
-- 
1.6.6

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] gitk: Fix display of copyright symbol in non-utf-8 locales
  2010-03-12 18:31   ` [PATCH 3/3] gitk: fix display of copyright symbol Pat Thoyts
@ 2010-03-20  6:14     ` Jonathan Nieder
  2010-03-20  6:24       ` [PATCH squash] gitk: Update makefile to keep -encoding option for gitk-wish Jonathan Nieder
  2010-03-22 22:58       ` [PATCH] gitk: Fix display of copyright symbol in non-utf-8 locales Pat Thoyts
  0 siblings, 2 replies; 10+ messages in thread
From: Jonathan Nieder @ 2010-03-20  6:14 UTC (permalink / raw)
  To: Pat Thoyts; +Cc: git, Paul Mackerras

Unless the ‘-encoding’ option is supplied, wish interprets source
files using the default system encoding, which depends on locale.
This can cause the copyright symbol to display incorrectly in gitk’s
about dialog.

The -encoding option was added to tcl in version 8.1.

Reported-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Hi,

Pat Thoyts wrote:

> The script file uses utf-8 encoding but when sourced it will be read
> using the default system encoding which is never utf8 on windows. This
> causes the copyright symbol to display incorrectly in the about dialog.

I can reproduce this in Linux with LANG=de_DE@euro ./gitk.

> Using the unicode escape sequence avoids incorrect decoding but does
> require a double escape in the .po files.

When I tried applying your patch, running “make update-po” seemed to
undo its effect on translations.  I am also worried about what would
happen in locales where ASCII is not a subset of the native character
set, or other uses of non-ASCII characters in the translated messages.

Maybe the following would be safer?  I haven’t looked at the effect on
translations yet.

 gitk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gitk b/gitk
index 1f36a3e..a7c9a9a 100755
--- a/gitk
+++ b/gitk
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Tcl ignores the next line -*- tcl -*- \
-exec wish "$0" -- "$@"
+exec wish -encoding utf-8 "$0" -- "$@"
 
 # Copyright © 2005-2009 Paul Mackerras.  All rights reserved.
 # This program is free software; it may be used, copied, modified
-- 
1.7.0.2

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH squash] gitk: Update makefile to keep -encoding option for gitk-wish
  2010-03-20  6:14     ` [PATCH] gitk: Fix display of copyright symbol in non-utf-8 locales Jonathan Nieder
@ 2010-03-20  6:24       ` Jonathan Nieder
  2010-03-22 22:58       ` [PATCH] gitk: Fix display of copyright symbol in non-utf-8 locales Pat Thoyts
  1 sibling, 0 replies; 10+ messages in thread
From: Jonathan Nieder @ 2010-03-20  6:24 UTC (permalink / raw)
  To: Pat Thoyts; +Cc: git, Paul Mackerras

Jonathan Nieder wrote:

> I can reproduce this in Linux with LANG=de_DE@euro ./gitk.

This should be squashed in to fix LANG=de_DE@euro ./gitk-wish, too.
Sorry for the trouble.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>

 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index e1b6045..1cc922c 100644
--- a/Makefile
+++ b/Makefile
@@ -53,7 +53,7 @@ clean::
 
 gitk-wish: gitk
 	$(QUIET_GEN)$(RM) $@ $@+ && \
-	sed -e '1,3s|^exec .* "$$0"|exec $(subst |,'\|',$(TCLTK_PATH_SQ)) "$$0"|' <gitk >$@+ && \
+	sed -e '1,3s|^exec .* -encoding|exec $(subst |,'\|',$(TCLTK_PATH_SQ)) -encoding|' <gitk >$@+ && \
 	chmod +x $@+ && \
 	mv -f $@+ $@
 
-- 
1.7.0.2

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/3] gitk: Avoid calling tk_setPalette on Windows
  2010-03-12 18:31 [PATCH 1/3] gitk: Avoid calling tk_setPalette on Windows Pat Thoyts
  2010-03-12 18:31 ` [PATCH 2/3] gitk: Add emacs editor variable block Pat Thoyts
@ 2010-03-20  6:32 ` Jonathan Nieder
  2010-03-22 22:52   ` Pat Thoyts
  1 sibling, 1 reply; 10+ messages in thread
From: Jonathan Nieder @ 2010-03-20  6:32 UTC (permalink / raw)
  To: Pat Thoyts; +Cc: git, Paul Mackerras

Pat Thoyts wrote:

> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
> ---
>  gitk |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/gitk b/gitk
> index 1f36a3e..dc9b8a8 100755
> --- a/gitk
> +++ b/gitk
> @@ -10845,10 +10845,11 @@ proc setselbg {c} {
>  
>  # This sets the background color and the color scheme for the whole UI.
>  # For some reason, tk_setPalette chooses a nasty dark red for selectColor
>  # if we don't specify one ourselves, which makes the checkbuttons and
>  # radiobuttons look bad.  This chooses white for selectColor if the
>  # background color is light, or black if it is dark.
>  proc setui {c} {
> +    if {[tk windowingsystem] eq "win32"} { return }

Do you know whether the situation described by the comment has been addressed
for Tk?  Maybe gitk could check for an appropriate Tk version to avoid this
workaround on all platforms.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/3] gitk: Avoid calling tk_setPalette on Windows
  2010-03-20  6:32 ` [PATCH 1/3] gitk: Avoid calling tk_setPalette on Windows Jonathan Nieder
@ 2010-03-22 22:52   ` Pat Thoyts
  2010-03-23  2:29     ` Jonathan Nieder
  0 siblings, 1 reply; 10+ messages in thread
From: Pat Thoyts @ 2010-03-22 22:52 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: git, Paul Mackerras

Jonathan Nieder <jrnieder@gmail.com> writes:

>Pat Thoyts wrote:
>
>> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
>> ---
>>  gitk |    1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>> 
>> diff --git a/gitk b/gitk
>> index 1f36a3e..dc9b8a8 100755
>> --- a/gitk
>> +++ b/gitk
>> @@ -10845,10 +10845,11 @@ proc setselbg {c} {
>>  
>>  # This sets the background color and the color scheme for the whole UI.
>>  # For some reason, tk_setPalette chooses a nasty dark red for selectColor
>>  # if we don't specify one ourselves, which makes the checkbuttons and
>>  # radiobuttons look bad.  This chooses white for selectColor if the
>>  # background color is light, or black if it is dark.
>>  proc setui {c} {
>> +    if {[tk windowingsystem] eq "win32"} { return }
>
>Do you know whether the situation described by the comment has been addressed
>for Tk?  Maybe gitk could check for an appropriate Tk version to avoid this
>workaround on all platforms.

This has never been true for Windows which has always used the native
images for check and radio buttons. So the comment there is relevant
only to X11. I believe in Tk 8.5 the check/radio buttons now use
images by default (the ttk versions will look appropriate to the
current theme - however that may be defined).

However, messing about with this on X11 would need testing that I
can't do on Windows. Hence the suggested fix.

-- 
Pat Thoyts                            http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] gitk: Fix display of copyright symbol in non-utf-8 locales
  2010-03-20  6:14     ` [PATCH] gitk: Fix display of copyright symbol in non-utf-8 locales Jonathan Nieder
  2010-03-20  6:24       ` [PATCH squash] gitk: Update makefile to keep -encoding option for gitk-wish Jonathan Nieder
@ 2010-03-22 22:58       ` Pat Thoyts
  2010-03-22 23:45         ` Jonathan Nieder
  1 sibling, 1 reply; 10+ messages in thread
From: Pat Thoyts @ 2010-03-22 22:58 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: git, Paul Mackerras

Jonathan Nieder <jrnieder@gmail.com> writes:

>Unless the ‘-encoding’ option is supplied, wish interprets source
>files using the default system encoding, which depends on locale.
>This can cause the copyright symbol to display incorrectly in gitk’s
>about dialog.
>
>The -encoding option was added to tcl in version 8.1.
>
>Reported-by: Pat Thoyts <patthoyts@users.sourceforge.net>
>Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
>---
>Hi,
>
>Pat Thoyts wrote:
>
>> The script file uses utf-8 encoding but when sourced it will be read
>> using the default system encoding which is never utf8 on windows. This
>> causes the copyright symbol to display incorrectly in the about dialog.
>
>I can reproduce this in Linux with LANG=de_DE@euro ./gitk.
>
>> Using the unicode escape sequence avoids incorrect decoding but does
>> require a double escape in the .po files.
>
>When I tried applying your patch, running “make update-po” seemed to
>undo its effect on translations.  I am also worried about what would
>happen in locales where ASCII is not a subset of the native character
>set, or other uses of non-ASCII characters in the translated messages.
>
>Maybe the following would be safer?  I haven’t looked at the effect on
>translations yet.
>
> gitk |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>diff --git a/gitk b/gitk
>index 1f36a3e..a7c9a9a 100755
>--- a/gitk
>+++ b/gitk
>@@ -1,6 +1,6 @@
> #!/bin/sh
> # Tcl ignores the next line -*- tcl -*- \
>-exec wish "$0" -- "$@"
>+exec wish -encoding utf-8 "$0" -- "$@"
> 
> # Copyright © 2005-2009 Paul Mackerras.  All rights reserved.
> # This program is free software; it may be used, copied, modified
>-- 
>1.7.0.2

I would much rather see any fault in the makefile fixed than use
source -encoding in all the various places this script might get
loaded from. THere are two characters in this file that are not ASCII
and one of them is in a comment. We could even just use (c) to
simplify this. However, \u00a9 is the correct unicode escape sequence
for tcl to get a copyright character into the script in a way that is
independent of the encoding. The escape sequence should be passed
through unchanged in any translations - tcl wants to see exactly
\u00a9 and everyone is using a copyright glyph here. 
-- 
Pat Thoyts                            http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] gitk: Fix display of copyright symbol in non-utf-8 locales
  2010-03-22 22:58       ` [PATCH] gitk: Fix display of copyright symbol in non-utf-8 locales Pat Thoyts
@ 2010-03-22 23:45         ` Jonathan Nieder
  0 siblings, 0 replies; 10+ messages in thread
From: Jonathan Nieder @ 2010-03-22 23:45 UTC (permalink / raw)
  To: Pat Thoyts; +Cc: git, Paul Mackerras

Pat Thoyts wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:

>> --- a/gitk
>> +++ b/gitk
>> @@ -1,6 +1,6 @@
>>  #!/bin/sh
>>  # Tcl ignores the next line -*- tcl -*- \
>> -exec wish "$0" -- "$@"
>> +exec wish -encoding utf-8 "$0" -- "$@"
[...]
> I would much rather see any fault in the makefile fixed than use
> source -encoding in all the various places this script might get
> loaded from.

Good point: git-gui.sh does not use ‘source’ but runs the moral
equivalent of
 
 set wish [info executable]
 eval exec $wish gitk $revs "--" "--"

to avoid starting a shell.  Is it really so expensive to start a
shell?  This means that, for example, if some insane person were to
rewrite gitk in C, then git gui would have to be adjusted before the
result could be used.

> THere are two characters in this file that are not ASCII
> and one of them is in a comment. We could even just use (c) to
> simplify this. However, \u00a9 is the correct unicode escape sequence
> for tcl to get a copyright character into the script in a way that is
> independent of the encoding. The escape sequence should be passed
> through unchanged in any translations - tcl wants to see exactly
> \u00a9 and everyone is using a copyright glyph here. 

So we should fix the Makefile.  The problem is that everything
Tcl-related seems to assume files it sees will be in either the
current locale’s encoding or ISO-8859-1 unless told otherwise, as far
as I can tell.  The entire gitk source tree, on the other hand, is in
UTF-8.

Ideas?
Jonathan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/3] gitk: Avoid calling tk_setPalette on Windows
  2010-03-22 22:52   ` Pat Thoyts
@ 2010-03-23  2:29     ` Jonathan Nieder
  0 siblings, 0 replies; 10+ messages in thread
From: Jonathan Nieder @ 2010-03-23  2:29 UTC (permalink / raw)
  To: Pat Thoyts; +Cc: git, Paul Mackerras

Pat Thoyts wrote:

>>>  # For some reason, tk_setPalette chooses a nasty dark red for selectColor
>>>  # if we don't specify one ourselves, which makes the checkbuttons and
>>>  # radiobuttons look bad.  This chooses white for selectColor if the
>>>  # background color is light, or black if it is dark.
[...]
> This has never been true for Windows which has always used the native
> images for check and radio buttons. So the comment there is relevant
> only to X11. I believe in Tk 8.5 the check/radio buttons now use
> images by default (the ttk versions will look appropriate to the
> current theme - however that may be defined).
> 
> However, messing about with this on X11 would need testing that I
> can't do on Windows. Hence the suggested fix.

Thanks for the pointers.  Sp it seems that the “interface color” setting
does not have the desired effect when themed widgets are enabled.  You
can see some screenshots here:

  http://repo.or.cz/w/git/jrn.git/commit/gitk-snapshots

The text fields, buttons, and drop-down boxes retain the traditional
grey background, while the menu bar, “SHA1 ID” label, and “Lines of
context” selector do change color.  The effect is very strange.

When themed widgets are disabled, the tk_setPalette issue described in
the comment still applies.

So I can understand better: are you saying in Windows themed widgets
are always used?

Jonathan

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-03-23  2:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-12 18:31 [PATCH 1/3] gitk: Avoid calling tk_setPalette on Windows Pat Thoyts
2010-03-12 18:31 ` [PATCH 2/3] gitk: Add emacs editor variable block Pat Thoyts
2010-03-12 18:31   ` [PATCH 3/3] gitk: fix display of copyright symbol Pat Thoyts
2010-03-20  6:14     ` [PATCH] gitk: Fix display of copyright symbol in non-utf-8 locales Jonathan Nieder
2010-03-20  6:24       ` [PATCH squash] gitk: Update makefile to keep -encoding option for gitk-wish Jonathan Nieder
2010-03-22 22:58       ` [PATCH] gitk: Fix display of copyright symbol in non-utf-8 locales Pat Thoyts
2010-03-22 23:45         ` Jonathan Nieder
2010-03-20  6:32 ` [PATCH 1/3] gitk: Avoid calling tk_setPalette on Windows Jonathan Nieder
2010-03-22 22:52   ` Pat Thoyts
2010-03-23  2:29     ` Jonathan Nieder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).