OSDN Git Service

sysListView32: Include column headers when reporting the list item if reporting of...
authorJames Teh <jamie@jantrid.net>
Fri, 7 Sep 2012 01:38:39 +0000 (11:38 +1000)
committerJames Teh <jamie@jantrid.net>
Fri, 7 Sep 2012 01:38:39 +0000 (11:38 +1000)
Fixes #2647.

source/NVDAObjects/IAccessible/sysListView32.py

index e278597..5e24a31 100644 (file)
@@ -19,6 +19,7 @@ from . import IAccessible, List
 from ..window import Window\r
 import watchdog\r
 from NVDAObjects.behaviors import RowWithoutCellObjects, RowWithFakeNavigation\r
+import config\r
 \r
 #Window messages\r
 LVM_FIRST=0x1000\r
@@ -405,10 +406,17 @@ class ListItem(RowWithFakeNavigation, RowWithoutCellObjects, ListItemWithoutRepo
                        return super(ListItem, self).name\r
                textList = []\r
                for col in xrange(1, self.childCount + 1):\r
-                       text = self._getColumnContent(col)\r
-                       if not text:\r
+                       content = self._getColumnContent(col)\r
+                       if not content:\r
                                continue\r
-                       textList.append(text)\r
+                       if config.conf["documentFormatting"]["reportTableHeaders"] and col != 1:\r
+                               header = self._getColumnHeader(col)\r
+                       else:\r
+                               header = None\r
+                       if header:\r
+                               textList.append("%s: %s" % (header, content))\r
+                       else:\r
+                               textList.append(content)\r
                return "; ".join(textList)\r
 \r
        value = None\r