-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename more legacy "WebApp" and "MarkerManager" leftovers
Notably: - in `webAccess`: `supportWebApp` -> `canHaveWebAccessSupport` - in `webAppLib`: `playWebAppSound` -> `playWebAccessSound` - in `webAppScheduler`: `event_webApp` -> `event_webModule` - in `webAppScheduler`: `event_markerManagerUpdated` -> `event_ruleManagerUpdated` - in `WebModule`: `event_webApp_gainFocus` -> `event_webModule_gainFocus` - in `WebModule`: `event_webApp_loseFocus` -> `event_webModule_loseFocus` The latter two are currently dead code but will likely be revived for issue #17.
- Loading branch information
1 parent
6cfbdf7
commit df0f149
Showing
8 changed files
with
92 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,11 @@ | |
# See the file COPYING.txt at the root of this distribution for more details. | ||
|
||
|
||
__author__ = "Julien Cochuyt <[email protected]>" | ||
__authors__ = ( | ||
"Julien Cochuyt <[email protected]>", | ||
"André-Abush Clause <[email protected]>", | ||
"Gatien Bouyssou <[email protected]>", | ||
) | ||
|
||
|
||
import os | ||
|
@@ -228,9 +232,11 @@ def onModulesListItemSelected(self, evt): | |
self.moduleEditButton.Enable(item is not None) | ||
self.rulesManagerButton.Enable( | ||
item is not None | ||
and hasattr(item, "markerManager") | ||
and item.markerManager.isReady | ||
) | ||
# FIXME: This test never succeeds as a live WebModule is not | ||
# taken from the context. | ||
# TODO: Remove this restriction for issue #42 | ||
and item.ruleManager.isReady | ||
) | ||
self.moduleDeleteButton.Enable(item is not None) | ||
|
||
def onRulesManager(self, evt=None): | ||
|
@@ -289,4 +295,4 @@ def Show(self, context): | |
self.Fit() | ||
self.modulesList.SetFocus() | ||
self.CentreOnScreen() | ||
return super().Show() | ||
return super().Show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,11 @@ | |
WebAccess overlay classes | ||
""" | ||
|
||
__author__ = "Julien Cochuyt <[email protected]>" | ||
__authors__ = ( | ||
"Julien Cochuyt <[email protected]>", | ||
"André-Abush Clause <[email protected]>", | ||
"Gatien Bouyssou <[email protected]>", | ||
) | ||
|
||
|
||
import weakref | ||
|
@@ -192,7 +196,7 @@ def treeInterceptor(self): | |
|
||
@property | ||
def webModule(self): | ||
from . import supportWebApp, webAccessEnabled | ||
from . import canHaveWebAccessSupport, webAccessEnabled | ||
if not webAccessEnabled: | ||
return None | ||
ti = self.treeInterceptor | ||
|
@@ -202,7 +206,7 @@ def webModule(self): | |
webModule = self._webModule | ||
if not webModule: | ||
obj = ti.rootNVDAObject | ||
if not supportWebApp(obj): | ||
if not canHaveWebAccessSupport(obj): | ||
return None | ||
from . import webModuleHandler | ||
try: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,11 @@ | |
# Get ready for Python 3 | ||
|
||
|
||
__author__ = "Frédéric Brugnot <[email protected]>" | ||
__authors__ = ( | ||
"Frédéric Brugnot <[email protected]>", | ||
"Julien Cochuyt <[email protected]>", | ||
"André-Abush Clause <[email protected]>", | ||
) | ||
|
||
|
||
import os | ||
|
@@ -62,12 +66,12 @@ def speechOn(delay=0): | |
api.processPendingEvents () | ||
speech.setSpeechMode(speech.SpeechMode.talk) | ||
|
||
def playWebAppSound (name): | ||
def playWebAccessSound(name): | ||
from ... import webAccess | ||
try: | ||
playSound(os.path.join(webAccess.SOUND_DIRECTORY, "%s.wav" % name)) | ||
except: | ||
pass | ||
except Exception: | ||
log.exception() | ||
|
||
def playSound(sound): | ||
sound = os.path.abspath(os.path.join(os.path.dirname(__file__), sound)) | ||
|
Oops, something went wrong.