[tex-live] tlmgr/win32/ru: displaced titles in tabs

Alexander Cherepanov cherepan at mccme.ru
Sun Oct 11 22:43:48 CEST 2009


Hi all!

tlmgr in Russian on Windows XP have the titles of the tabs displaced
(screenshot attached). On Linux and in English on Windows it works 
fine.

This looks like a bug in the bundled Perl/Tk which can be 
illustrated with the following example:

  use utf8;
  use Tk;
  use Tk::NoteBook;
  MainWindow->new->NoteBook->pack->add("Test", -label => "РусскийТекст");
  MainLoop;

(label in Russian in utf-8). It seems that the space for the title is 
computed correctly but the text of the title is placed as if it was of 
zero length. More precisely only the widths of English letters are 
counted so purely non-English title starts at the center, mixed title 
starts somewhat to the left and purely English title starts at the 
left border (as it should).

It easy to work around this bug -- just make titles left adjusted. 
AFAICT it doesn't change the appearance of English version but 
corrects non-English versions. Patch:

diff -ur tlmgrgui.orig/gui-config.pl tlmgrgui/gui-config.pl
--- tlmgrgui.orig/gui-config.pl	2009-09-01 11:37:46.000000000 +0400
+++ tlmgrgui/gui-config.pl	2009-10-11 23:56:56.000000000 +0400
@@ -7,7 +7,7 @@
 # GUI for tlmgr
 #
 
-our $back_config = $back->add("config",-label => __("Configuration"));
+our $back_config = $back->add("config",-label => __("Configuration"), -justify => "left");
 $screens{"config"} = $back_config;
 
 my @fileassocdesc;
diff -ur tlmgrgui.orig/gui-uninstall.pl tlmgrgui/gui-uninstall.pl
--- tlmgrgui.orig/gui-uninstall.pl	2009-09-03 11:39:22.000000000 +0400
+++ tlmgrgui/gui-uninstall.pl	2009-10-11 23:56:56.000000000 +0400
@@ -7,7 +7,7 @@
 # GUI for tlmgr
 #
 
-our $back_f3 = $back->add("uninstall", -label => __("Uninstallation"));
+our $back_f3 = $back->add("uninstall", -label => __("Uninstallation"), -justify => "left");
 $screens{"uninstall"} = $back_f3;
 
 if ($^O=~/^MSWin(32|64)$/i) {
diff -ur tlmgrgui.orig/tlmgrgui.pl tlmgrgui/tlmgrgui.pl
--- tlmgrgui.orig/tlmgrgui.pl	2009-09-30 18:41:00.000000000 +0400
+++ tlmgrgui/tlmgrgui.pl	2009-10-11 23:56:56.000000000 +0400
@@ -172,7 +172,7 @@
 
 require ("do_listframe.pl");
 # install screen
-our $back_f1 = $back->add("install",-label => __("Installation"));
+our $back_f1 = $back->add("install",-label => __("Installation"), -justify => "left");
 $screens{"install"} = $back_f1;
 my ($install_win, $install_lb) = do_listframe($back_f1,
              __("Adding packages"),
@@ -183,7 +183,7 @@
             );
 set_text_win($install_win, __("The database of the package repository has not been loaded.\n\nPlease use the \"Load\" (and possibly \"Change\") button to do so."));
 # update screen
-our $back_up = $back->add("update", -label => __("Update"));
+our $back_up = $back->add("update", -label => __("Update"), -justify => "left");
 $screens{"update"} = $back_up;
 my $critical_updates_present = 0;
 my ($update_win, $update_lb) = do_listframe($back_up,
@@ -200,7 +200,7 @@
             );
 set_text_win($update_win, __("The database of the package repository has not been loaded.\n\nPlease use the \"Load\" (and possibly \"Change\") button to do so."));
 # remove screen
-our $back_f2 = $back->add("remove", -label => __("Remove"));
+our $back_f2 = $back->add("remove", -label => __("Remove"), -justify => "left");
 $screens{"remove"} = $back_f2;
 my ($remove_win, $remove_lb) = do_listframe($back_f2,
              __("Removing packages"),

Alexander Cherepanov

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tlmgr-win-ru.png
Type: application/unknown
Size: 27230 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex-live/attachments/20091012/d244663e/attachment-0001.bin>


More information about the tex-live mailing list