Skip to content

Commit

Permalink
V2502.10 : TB 135 compatibility, collaboration with Start with Inbox …
Browse files Browse the repository at this point in the history
…addon
  • Loading branch information
RPTools-org committed Feb 9, 2025
1 parent 62eb0e3 commit 364a4b5
Show file tree
Hide file tree
Showing 14 changed files with 378 additions and 155 deletions.
29 changes: 29 additions & 0 deletions 2501.21.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"addonId": "thunderbirdPlusG5",
"displayName": "Thunderbird+G5 (TB 115 - 128ESR - 133)\u0003",
"URL": "",
"description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en",
"sha256": "ab6f7f983f96619b3de1ed60a3e5175200a1c84f2c1fe8b1a1a628c710cf31c4",
"homepage": "https://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual-changelog&v=g5&lang=auto",
"addonVersionName": "2501.21.00",
"addonVersionNumber": {
"major": 2501,
"minor": 21,
"patch": 0
},
"minNVDAVersion": {
"major": 2021,
"minor": 1,
"patch": 0
},
"lastTestedVersion": {
"major": 2024,
"minor": 1,
"patch": 0
},
"channel": "None",
"publisher": "",
"sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5",
"license": null,
"licenseURL": null
}
29 changes: 29 additions & 0 deletions 2502.10.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"addonId": "thunderbirdPlusG5",
"displayName": "Thunderbird+G5 (TB 115 - 128ESR - 135)\u0003",
"URL": "",
"description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en",
"sha256": "efd4f50e84d34c98c0fea6fbfb3009cce498764e29653c069f29865058789d90",
"homepage": "https://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual-changelog&v=g5&lang=auto",
"addonVersionName": "2502.10.00",
"addonVersionNumber": {
"major": 2502,
"minor": 10,
"patch": 0
},
"minNVDAVersion": {
"major": 2021,
"minor": 1,
"patch": 0
},
"lastTestedVersion": {
"major": 2024,
"minor": 1,
"patch": 0
},
"channel": "None",
"publisher": "",
"sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5",
"license": null,
"licenseURL": null
}
29 changes: 29 additions & 0 deletions 2502.8.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"addonId": "thunderbirdPlusG5",
"displayName": "Thunderbird+G5 (TB 115 - 128ESR - 135)\u0003",
"URL": "",
"description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en",
"sha256": "868dfb94a697c03db132408481ac49e8e1f4cf274d96ecbd8ba5d243646fdf43",
"homepage": "https://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual-changelog&v=g5&lang=auto",
"addonVersionName": "2502.08.00",
"addonVersionNumber": {
"major": 2502,
"minor": 8,
"patch": 0
},
"minNVDAVersion": {
"major": 2021,
"minor": 1,
"patch": 0
},
"lastTestedVersion": {
"major": 2024,
"minor": 1,
"patch": 0
},
"channel": "None",
"publisher": "",
"sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5",
"license": null,
"licenseURL": null
}
29 changes: 29 additions & 0 deletions 2502.9.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"addonId": "thunderbirdPlusG5",
"displayName": "Thunderbird+G5 (TB 115 - 128ESR - 135)\u0003",
"URL": "",
"description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en",
"sha256": "6fb6cedc3c8eff12644671fc89b35ad653452b9fea67d7f97c53512b1cba177b",
"homepage": "https://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual-changelog&v=g5&lang=auto",
"addonVersionName": "2502.09.00",
"addonVersionNumber": {
"major": 2502,
"minor": 9,
"patch": 0
},
"minNVDAVersion": {
"major": 2021,
"minor": 1,
"patch": 0
},
"lastTestedVersion": {
"major": 2024,
"minor": 1,
"patch": 0
},
"channel": "None",
"publisher": "",
"sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5",
"license": null,
"licenseURL": null
}
28 changes: 13 additions & 15 deletions addon/appModules/messengerWindow/folderTreeItem.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,21 @@ def fMenuFolders(o, unread=False) :
if ID not in "all,smart,unread,tags" :
# return message(_("Instead press Alt+c, this menu is only supported in All Folders or Unified Folders modes"))
return callLater(10, fMenuAccounts, (1 if not unread else 2))
lvl = str(utils.getIA2Attr(o, False, "level"))
lvl = o.positionInfo['level']
rec = True
ty = 0 # normal folder items, not accounts only
folderMode = "smart0" # smart without exclusion of names without @
if ID in "all,unread" :
o = fGetAccountNode(o)
folderMode = "all"
nm = str(o.name)
elif ID == "smart" and lvl == "2" :
elif ID == "smart" and lvl == 2 :
nm = o.name
o = o.parent
ty = 0
rec = False
# beep(200, 40)
elif ID == "smart" and lvl == "3" :
elif ID == "smart" and lvl == 3 :
nm = _("Unified folders")
o = o.parent
elif ID == "tags" :
Expand All @@ -122,17 +122,15 @@ def fMenuFolders(o, unread=False) :
# callLater(10, m.showMenu, title="")

callLater(10, m.showMenu, title=nm)

def fGetAccountNode(oNode) :
o = oNode
lvl = ""
while o :
if o.role == controlTypes.Role.TREEVIEWITEM :
lvl = str(utils.getIA2Attr(o, False, "level"))
if lvl == "2" :
if o.positionInfo['level'] == 2 :
return o
o = o.parent
return None

return oNode

def showAccountMenu(oNode, ty=1) :
o = fGetAccountNode(oNode)
Expand Down Expand Up @@ -167,10 +165,9 @@ def buildMenu(self, o) :
nm = coll = ""
if o.role == controlTypes.Role.TREEVIEWITEM :
nm = str(o.name)
lvl = str(utils.getIA2Attr(o, False, "level"))

lvl = o.positionInfo['level']
if self.all :
if lvl == "2" :
if lvl == 2 :
if self.unread and nm.endswith("-") : o = o.next ; continue
if self.mode == "smart" and "@" not in o.name : o = o.next ; continue
self.account = " (" + nm + ") "
Expand All @@ -180,11 +177,11 @@ def buildMenu(self, o) :
else : coll = ", "
if self.unread :
if not gRegUnread.search(nm) or gRegExcludeFolders.search(nm) or nm.endswith("-") : OK = False
elif self.mode == "smart" and lvl == "2" and "@" not in nm and _("Inbox") not in nm : OK = False
elif self.mode == "smart" and lvl == 2 and "@" not in nm and _("Inbox") not in nm : OK = False
elif self.mode == "smart0" :
if lvl == "2" :
if lvl == 2 :
coll += " " + str(_("Account") if "@" in nm else _("Unified")) + ", "
elif lvl == "3" : coll += _("Unified") + ", "
elif lvl == 3 : coll += _("Unified") + ", "

if OK and nm :
# self.fMenu.Append (self.idx, o.name + self.account + coll)
Expand Down Expand Up @@ -245,10 +242,11 @@ def onMenu(self, evt):
if str(self.nodes[evt.Id]).startswith("<NVDAObject") : # pointer, not accounts menu
# beep(440, 10)
o = self.nodes[evt.Id]
self.nodes = [] # 2025-02-07
if self.type > 0 and self.mode == "smart" and o.name.startswith(_("Inbox")) : self.type = 0

if self.type == 0 : # regular menu item, request to focus folderTree
# beep(100, 30)
# beep(100, 30)a
utis.setSpeech(False)
sharedVars.menuClosing = True
o.scrollIntoView()
Expand Down
31 changes: 28 additions & 3 deletions addon/appModules/messengerWindow/messageListItem.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
"kb:8" : "readTTICell",
"kb:9" : "readTTICell",
"kb:0" : "readTTICell",
# "kb:upArrow" : "selectLine",
# "kb:downArrow" : "selectLine",
"kb:space" : "readPreview",
"kb:shift+space" : "readPreview",
"kb:enter" : "openMessage",
Expand Down Expand Up @@ -99,8 +101,7 @@ class MessageListItem(IAccessible):
timer = None
timerCount = 0
def initOverlayClass (self):
# if sharedVars.lastKey == "del" : message(self.name)

# cause issue if controlTypes.State.SELECTED not in self.states : self.doAction()
self.bindGestures(TTIDefGestures)
if not sharedVars.TTnoTags :
self.bindGestures(TTITagGestures)
Expand All @@ -113,9 +114,24 @@ def script_sayLine(self, gesture):
browseableMessage (message=sharedVars.curTTRow.replace(", ", "\n"), title = _("Line details") + " - ThunderbirdPlus", isHtml = False)
else : # 1 press
message(self.name)

script_sayLine.__doc__ = _("Message list : One press announces the current line, two presses displays the line text in a window.")
script_sayLine.category=sharedVars.scriptCategory

def script_selectLine(self, gesture) :
# if gesture.mainKeyName == "upArrow" : CallAfter(KeyboardInputGesture.fromName("b").send)
# elif gesture.mainKeyName == "downArrow" : CallAfter(KeyboardInputGesture.fromName("f").send)
try :
if gesture.mainKeyName == "upArrow" : o = self.previous
else : o = self.next
except :
self.doAction()
return
if not o :
beep(120, 10)
message(self.name)
return
o.doAction()

# read threadTree item cells
# def script_readTTICell(self,gesture):
Expand Down Expand Up @@ -611,4 +627,13 @@ def focusNewRow(obj, oParent) :
# #speech.cancelSpeech()
# fo = api.getFocusObject()
# if fo.name :
# message(fo.name)
# message(fo.name)

def selLine(gest) :
api.processPendingEvents()
fo = api.getFocusObject()
if controlTypes.State.SELECTED not in fo.states :
fo.doAction()
message(fo.name)
beep(100, 40)

4 changes: 4 additions & 0 deletions addon/appModules/shared/menuSettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ def load(self):
section = self.options["messengerWindow"]
if "delayFocusDoc" not in section : self.options["messengerWindow"].update({"delayFocusDoc":"25"})
sharedVars.delayFocusDoc = section.as_int("delayFocusDoc")
if "focusStartWithInbox" not in section :
self.options["messengerWindow"].update({"focusStartWithInbox":"False"})

if "focusMode" not in section :
self.options["messengerWindow"].update({"focusMode":"1"})
self.options["messengerWindow"].update({"focusOnStartup":"False"})
Expand All @@ -116,6 +119,7 @@ def load(self):
self.options["messengerWindow"]["focusOnStartup"] = False
else : # options are in section, we change their type
section["focusOnStartup"]= section.as_bool("focusOnStartup")
section["focusStartWithInbox"]= section.as_bool("focusStartWithInbox")
section["focusMode"]= section.as_int("focusMode")

# words to remove from subject in the message list
Expand Down
9 changes: 7 additions & 2 deletions addon/appModules/shared/startupDlg.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ def __init__(self, parent, title,options):

# check box
self.focusOnStartupChk = wx.CheckBox(panel, wx.ID_ANY, _("Use this mode when starting Thunderbird"))
self.startWithInboxChk = wx.CheckBox(panel, wx.ID_ANY, _("The folder tree is preselected by the StartWithInbox add-on for Thunderbird"))

# ok_button = wx.Button(panel, label=_("OK"))
okButton = wx.Button(panel, id=wx.ID_OK, label="OK")
okButton.Bind(wx.EVT_BUTTON, self.onOK)
Expand All @@ -42,8 +44,9 @@ def __init__(self, parent, title,options):
elif mode == 3 :self.firstUnreadMsgRadio.SetValue(True)
elif mode == 4 :self.folderTreeRadio.SetValue(True)

# checkboxes
self.focusOnStartupChk.SetValue(self.options.options["messengerWindow"]["focusOnStartup"])

self.startWithInboxChk.SetValue(self.options.options["messengerWindow"]["focusStartWithInbox"])

self.sizer = wx.BoxSizer(wx.VERTICAL)
self.sizer.Add(self.focusLbl, 0, wx.EXPAND | wx.ALL, 5)
Expand All @@ -53,8 +56,9 @@ def __init__(self, parent, title,options):
self.sizer.Add(self.firstUnreadMsgRadio, 0, wx.ALL, 5)
self.sizer.Add(self.folderTreeRadio, 0, wx.ALL, 5)
self.sizer.Add(self.focusOnStartupChk, 0, wx.ALL, 5)
self.sizer.Add(self.startWithInboxChk, 0, wx.ALL, 5)
self.sizer.Add(okButton, 0, wx.ALL | wx.CENTER, 5)

panel.SetSizer(self.sizer)
panel.SetSizer(self.sizer)
self.sizer.Fit(self)
Expand All @@ -67,6 +71,7 @@ def onOK(self, event):
elif self.folderTreeRadio.GetValue() : mode = "4"
self.options.options["messengerWindow"]["focusMode"] = int(mode)
self.options.options["messengerWindow"]["focusOnStartup"] = self.focusOnStartupChk.GetValue()
self.options.options["messengerWindow"]["focusStartWithInbox"] = self.startWithInboxChk.GetValue()
self.options.options.write()
# self.Close()
return self.Destroy()
Expand Down
Loading

0 comments on commit 364a4b5

Please sign in to comment.