Mikolaj Zalewski : add spaces between table columns

Alexandre Julliard julliard at winehq.org
Fri Jun 19 08:36:18 CDT 2009


Module: tools
Branch: master
Commit: 854c1ed501db497768675ef1cc7bcfb77919c69d
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=854c1ed501db497768675ef1cc7bcfb77919c69d

Author: Mikolaj Zalewski <mikolajz at tygrys.dom>
Date:   Sat Mar  1 15:43:30 2008 +0100

add spaces between table columns

---

 php/lib_res.php   |   14 +++++++-------
 php/resource.php  |    8 ++++----
 scripts/Master.sh |    2 +-
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/php/lib_res.php b/php/lib_res.php
index b7ba878..b1c1a1d 100644
--- a/php/lib_res.php
+++ b/php/lib_res.php
@@ -275,14 +275,14 @@ class StringTable extends Resource
                     $extra = " style=\"background-color: #ffb8d0\"";
             }
     
-            echo "<tr$extra><td valign=\"top\">".(($this->table_id-1)*16+$i)."</td>";
+            echo "<tr$extra><td valign=\"top\">".(($this->table_id-1)*16+$i)."</td><td></td>";
             echo "<td>";
 
             dump_unicode_or_empty($uni_str);
 
             if ($master_res)
             {
-                echo "</td><td>";
+                echo "</td><td></td><td>";
                 dump_unicode_or_empty($master_uni_str);
             }
             echo "</td></tr>\n";
@@ -425,9 +425,9 @@ class MenuResource extends Resource
             $tstate[] = TRUE;
         } else if ($resinfo & 0x80) {  /* END */
             array_pop($tstate);
-            while (array_pop($tstate) === FALSE)
-                ;
-            $tstate[] = TRUE;
+            while (count($tstate) > 0 && $tstate[count($tstate) - 1] === FALSE)
+                array_pop($tstate);
+//            $tstate[] = TRUE;
         }
     }
     
@@ -472,7 +472,7 @@ class MenuResource extends Resource
             }
 
             $id = ($show[$i] & 1 ? $this->items[$pos]["id"] : $master_res->items[$pos]["id"]);
-            echo "<tr$extra><td valign=\"top\">$id</td>"; /* FIXME */
+            echo "<tr$extra><td valign=\"top\">$id</td><td></td>";
             echo "<td>";
 
             if ($show[$i] & 1)
@@ -486,7 +486,7 @@ class MenuResource extends Resource
 
             if ($master_res)
             {
-                echo "</td><td>";
+                echo "</td><td></td><td>";
                 if ($show[$i] & 2)
                 {
                     $this->handle_indent($tstate_master, $master_res->items[$master_pos]["resinfo"]);
diff --git a/php/resource.php b/php/resource.php
index d745d7f..5d6edbe 100644
--- a/php/resource.php
+++ b/php/resource.php
@@ -62,24 +62,24 @@ if ($compare)
 ?>
 
 <table style="background-color: #f0f0ff" cellpadding="0" cellspacing="0">
-<tr style="background-color: #e0e0ff"><th colspan="3">String table #<?php echo $id?></th></tr>
+<tr style="background-color: #e0e0ff"><th colspan="5"><?php echo get_resource_name($type, $id) ?></th></tr>
 <?php
 
 if (!$compare)
 {
-    echo "<tr style=\"background-color: #e8e8ff\"><td colspan=\"2\" style=\"text-align: right\">";
+    echo "<tr style=\"background-color: #e8e8ff\"><td colspan=\"3\" style=\"text-align: right\">";
     echo "<small>".gen_resource_a($lang, $resfile, $type, $id, TRUE);
     echo "Compare with ".$MASTER_LANGUAGE_NAME." &gt;&gt;</a></small>";
     echo "</td></tr>";
 }
 else
 {
-    echo "<tr style=\"background-color: #e8e8ff\"><td colspan=\"3\" style=\"text-align: right\">";
+    echo "<tr style=\"background-color: #e8e8ff\"><td colspan=\"5\" style=\"text-align: right\">";
     echo "<small>".gen_resource_a($lang, $resfile, $type, $id, FALSE);
     echo "&lt;&lt; Hide compare with ".get_lang_name($MASTER_LANGUAGE)."</a></small>";
     echo "</td></tr>";
 
-    echo "<tr style=\"background-color: #e8e8ff\"><td>id</td><td>".get_lang_name($lang)."</td><td>".get_lang_name($MASTER_LANGUAGE)."</td></tr>";
+    echo "<tr style=\"background-color: #e8e8ff\"><td>id</td><td>&nbsp;</td><td>".get_lang_name($lang)."</td><td>&nbsp;</td><td>".get_lang_name($MASTER_LANGUAGE)."</td></tr>";
 }
 
 $res->dump($master_res);
diff --git a/scripts/Master.sh b/scripts/Master.sh
index a614a40..11dbb75 100755
--- a/scripts/Master.sh
+++ b/scripts/Master.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # Main script - change 'config' to setup input/output directories
 




More information about the wine-cvs mailing list