Monitor Gamma Calibration fixed

Forum member bigpup reported that this utility, in the X GUI version of the Xorg Wizard, which is script /usr/sbin/xgamma-gui, is broken in Precise Puppy. Bigpup reported that it does work in Lucid Puppy.

This script is actually in Woof, it is not a separate PET.

Various people have worked on this script. I found that both the latest in Woof, and the one in Lucid, are broken.
The one in Lucid is the best. It was worked on by Forum member EW in 2010. So, I used this as the basis.

I fixed a couple of bugs, and internationalized it. The script can be found in the Woof commit.

Woof commits:
http://bkhome.org/fossil/woof2.cgi/info/128b3464d3
http://bkhome.org/fossil/woof2.cgi/info/c238a7cbeb


Posted on 19 Oct 2012, 23:28


Comments:

Posted on 20 Oct 2012, 15:01 by emil
xgamma-gui explanation
Actually I worked on this script and reported it to you (together with broken bc) in wary 1.02 bug thread
http://murga-linux.com/puppy/viewtopic.php?t=62891

Here is a description what I did (logarithmic scaling of gamma values), the bash code alone might seem a bit opaque.
http://murga-linux.com/puppy/viewtopic.php?t=59590&start=135

Emil Widmann


Posted on 20 Oct 2012, 23:08 by BarryK
re xgamma-gui
emil (EW),
Yes, the algorithms worked out by you are great. The script in Woof was worked on by L18L, including transform algorithms and internationalization, but as I have recently discovered when comparing them, your implementation is very good.
The things that I "fixed" in your version were elsewhere, some logic in the program flow. Then, I applied the internationalization, similar to what L18L had done.



Posted on 21 Oct 2012, 20:17 by L18L
xgamma-gui


 sed -i 's/--ok-label "Apply"/--ok-label "$(gettext \"Apply\")"/' /usr/sbin/xgamma-gui


sed -i 's/--ok-label "Exit"/--ok-label "$(gettext \"Exit\")"/' /usr/sbin/xgamma-gui




Posted on 22 Oct 2012, 2:33 by rodin.s
Xdialog and UTF-8
I prefer not to to translate xgamma-gui as it doesn't look good with UTF-8.



Posted on 22 Oct 2012, 7:27 by BarryK
Re xgamma-gui
L18L, thanks for the fix.



Posted on 22 Oct 2012, 17:39 by L18L
xgamma-gui fix
Sorry for my fuzzy fix above.
Hope you did not blindly apply it.
The second line has to be, of course:
sed -i 's/--cancel-label "Exit"/--cancel-label "$(gettext \"Exit\")"/' /usr/sbin/xgamma-gui


That was cancel-label and not ok-label.



Posted on 23 Oct 2012, 2:37 by rodin.s
some other dialog
Maybe it should be remade using another dialog like gtkdialog or yad with better UTF-8 support. I cannot do it but GUI-masters like Zigbert could easily do it, I guess.


Posted on 23 Oct 2012, 16:12 by L18L
Xdialog xgamma-gui
German translation looks very nice
backtitle is centered
but length is limited (I have duplicated 2nd phrase of backtitle, but it is not displayed in full length)
msgid ""

"The spinboxes are adjustable in the range -100 to +100, where -100 is "
"darkest, 0 is default, and +100 is brightest."
msgstr ""
"Die Drehfelder sind im Bereich -100 bis +100 einstellbar, wobei -100 am "
"dunkelsten ist, 0 normal ist und +100 am hellsten ist."
"Die Drehfelder sind im Bereich -100 bis +100 einstellbar, wobei -100 am "
"dunkelsten ist, 0 normal ist und +100 am hellsten ist."

So russian text should be made shorter (as usual) ?