OSDN Git Service

You can now configure whether frames in documents are reported from the Document...
authorJames Teh <jamie@jantrid.net>
Thu, 5 Jan 2012 02:17:19 +0000 (12:17 +1000)
committerJames Teh <jamie@jantrid.net>
Thu, 5 Jan 2012 02:17:19 +0000 (12:17 +1000)
Fixes #1900.

source/config/__init__.py
source/gui/settingsDialogs.py
source/textInfos/__init__.py
user_docs/en/changes.t2t
user_docs/en/userGuide.t2t

index 838d1a6..745f44c 100644 (file)
@@ -153,6 +153,7 @@ confspec = ConfigObj(StringIO(
        reportHeadings = boolean(default=true)\r
        reportBlockQuotes = boolean(default=true)\r
        reportLandmarks = boolean(default=true)\r
+       reportFrames = boolean(default=true)\r
 \r
 [reviewCursor]\r
        simpleReviewMode = boolean(default=True)\r
index 2556610..775f7c6 100644 (file)
@@ -807,6 +807,9 @@ class DocumentFormattingDialog(SettingsDialog):
                self.landmarksCheckBox=wx.CheckBox(self,wx.NewId(),label=_("Report lan&dmarks"))\r
                self.landmarksCheckBox.SetValue(config.conf["documentFormatting"]["reportLandmarks"])\r
                settingsSizer.Add(self.landmarksCheckBox,border=10,flag=wx.BOTTOM)\r
+               item=self.framesCheckBox=wx.CheckBox(self,label=_("Report fra&mes"))\r
+               item.Value=config.conf["documentFormatting"]["reportFrames"]\r
+               settingsSizer.Add(item,border=10,flag=wx.BOTTOM)\r
 \r
        def postInit(self):\r
                self.detectFormatAfterCursorCheckBox.SetFocus()\r
@@ -831,6 +834,7 @@ class DocumentFormattingDialog(SettingsDialog):
                config.conf["documentFormatting"]["reportLists"]=self.listsCheckBox.IsChecked()\r
                config.conf["documentFormatting"]["reportBlockQuotes"]=self.blockQuotesCheckBox.IsChecked()\r
                config.conf["documentFormatting"]["reportLandmarks"]=self.landmarksCheckBox.IsChecked()\r
+               config.conf["documentFormatting"]["reportFrames"]=self.framesCheckBox.Value\r
                super(DocumentFormattingDialog, self).onOk(evt)\r
 \r
 class DictionaryEntryDialog(wx.Dialog):\r
index 7086072..8b0bd0f 100755 (executable)
@@ -65,6 +65,7 @@ class ControlField(Field):
                        or (role == controlTypes.ROLE_BLOCKQUOTE and not formatConfig["reportBlockQuotes"])\r
                        or (role in (controlTypes.ROLE_TABLE, controlTypes.ROLE_TABLECELL, controlTypes.ROLE_TABLEROWHEADER, controlTypes.ROLE_TABLECOLUMNHEADER) and not formatConfig["reportTables"])\r
                        or (role in (controlTypes.ROLE_LIST, controlTypes.ROLE_LISTITEM) and controlTypes.STATE_READONLY in states and not formatConfig["reportLists"])\r
+                       or (role in (controlTypes.ROLE_FRAME, controlTypes.ROLE_INTERNALFRAME) and not formatConfig["reportFrames"])\r
                ):\r
                        # This is just layout as far as the user is concerned.\r
                        return self.PRESCAT_LAYOUT\r
index 1c8d534..f3f7886 100644 (file)
@@ -22,6 +22,7 @@
 - Basic support for web areas in iTunes such as the Store. Other applications using WebKit 1 may also be supported. (#734)\r
 - In books in Adobe Digital Editions 1.8.1 and later, pages are now turned automatically when using say all. (#1978)\r
 - New braille translation table: Portuguese grade 2. (#2014)\r
+- You can now configure whether frames in documents are reported from the Document Formatting preferences dialog. (#1900)\r
 \r
 \r
 == Changes ==\r
index 1c23271..eede2c2 100644 (file)
@@ -817,6 +817,7 @@ You can configure reporting of:
 - Lists\r
 - Block quotes\r
 - Landmarks\r
+- Frames\r
 -\r
 \r
 ==== Announce formatting changes after the cursor ====\r