Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion source/NVDAObjects/window/excel.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import api
from logHandler import log
import gui
import gui.contextHelp
Comment thread
feerrenrut marked this conversation as resolved.
import winUser
import mouseHandler
from displayModel import DisplayModelTextInfo
Expand Down Expand Up @@ -597,7 +598,7 @@ class ElementsListDialog(browseMode.ElementsListDialog):


class EditCommentDialog(
gui.ContextHelpMixin,
gui.contextHelp.ContextHelpMixin,
wx.TextEntryDialog, # wxPython does not seem to call base class initializer, put last in MRO
):
helpId = "ExcelReportingComments"
Expand Down
3 changes: 2 additions & 1 deletion source/cursorManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import documentBase
import gui
from gui import guiHelper
import gui.contextHelp
Comment thread
feerrenrut marked this conversation as resolved.
import sayAllHandler
import review
from scriptHandler import willSayAllResume, script
Expand All @@ -31,7 +32,7 @@


class FindDialog(
gui.ContextHelpMixin,
gui.contextHelp.ContextHelpMixin,
wx.Dialog, # wxPython does not seem to call base class initializer, put last in MRO
):
"""A dialog used to specify text to find in a cursor manager.
Expand Down
23 changes: 14 additions & 9 deletions source/gui/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# -*- coding: UTF-8 -*-
#gui/__init__.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2006-2018 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Mesar Hameed, Joseph Lee, Thomas Stivers, Babbage B.V.
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
# A part of NonVisual Desktop Access (NVDA)
# Copyright (C) 2006-2020 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Mesar Hameed, Joseph Lee,
# Thomas Stivers, Babbage B.V.
# This file is covered by the GNU General Public License.
# See the file COPYING for more details.

from .contextHelp import (
# several other submodules depend on ContextHelpMixin
# ensure early that it can be imported successfully.
ContextHelpMixin as _ContextHelpMixin, # don't expose from gui, import submodule directly.
)

import time
import os
Expand All @@ -25,7 +31,6 @@
import queueHandler
import core
from . import guiHelper
from .contextHelp import ContextHelpMixin
from .settingsDialogs import *
from .inputGestures import InputGesturesDialog
import speechDictHandler
Expand Down Expand Up @@ -671,7 +676,7 @@ def run():


class WelcomeDialog(
ContextHelpMixin,
_ContextHelpMixin,
wx.Dialog # wxPython does not seem to call base class initializer, put last in MRO
):
"""The NVDA welcome dialog.
Expand Down Expand Up @@ -774,7 +779,7 @@ def run(cls):


class LauncherDialog(
ContextHelpMixin,
_ContextHelpMixin,
wx.Dialog # wxPython does not seem to call base class initializer, put last in MRO
):
"""The dialog that is displayed when NVDA is started from the launcher.
Expand Down Expand Up @@ -1068,7 +1073,7 @@ def _isDebug():


class AskAllowUsageStatsDialog(
ContextHelpMixin,
_ContextHelpMixin,
wx.Dialog # wxPython does not seem to call base class initializer, put last in MRO
):
"""A dialog asking if the user wishes to allow NVDA usage stats to be collected by NV Access."""
Expand Down
6 changes: 4 additions & 2 deletions source/gui/addonGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
from . import nvdaControls
from .dpiScalingHelper import DpiScalingHelperMixin, DpiScalingHelperMixinWithoutInit
import gui.contextHelp


def promptUserForRestart():
restartMessage = _(
# Translators: A message asking the user if they wish to restart NVDA
Expand Down Expand Up @@ -138,7 +140,7 @@ def _showAddonInfo(addon):

class AddonsDialog(
DpiScalingHelperMixinWithoutInit,
gui.ContextHelpMixin,
gui.contextHelp.ContextHelpMixin,
wx.Dialog # wxPython does not seem to call base class initializer, put last in MRO
):
@classmethod
Expand Down Expand Up @@ -664,7 +666,7 @@ def _showConfirmAddonInstallDialog(parent, bundle):

class IncompatibleAddonsDialog(
DpiScalingHelperMixinWithoutInit,
gui.ContextHelpMixin,
gui.contextHelp.ContextHelpMixin,
wx.Dialog # wxPython does not seem to call base class initializer, put last in MRO
):
"""A dialog that lists incompatible addons, and why they are not compatible"""
Expand Down
8 changes: 4 additions & 4 deletions source/gui/configProfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


class ProfilesDialog(
gui.ContextHelpMixin,
gui.contextHelp.ContextHelpMixin,
wx.Dialog # wxPython does not seem to call base class initializer, put last in MRO
):
shouldSuspendConfigProfileTriggers = True
Expand Down Expand Up @@ -310,7 +310,7 @@ def __init__(self, spec, display, profile):


class TriggersDialog(
gui.ContextHelpMixin,
gui.contextHelp.ContextHelpMixin,
wx.Dialog # wxPython does not seem to call base class initializer, put last in MRO
):
helpId = "ConfigProfileTriggers"
Expand Down Expand Up @@ -401,7 +401,7 @@ def onClose(self, evt):


class NewProfileDialog(
gui.ContextHelpMixin,
gui.contextHelp.ContextHelpMixin,
wx.Dialog # wxPython does not seem to call base class initializer, put last in MRO
):
helpId = "ProfilesCreating"
Expand Down Expand Up @@ -537,7 +537,7 @@ def onTriggerChoice(self, evt):


class RenameProfileDialog(
gui.ContextHelpMixin,
gui.contextHelp.ContextHelpMixin,
wx.TextEntryDialog, # wxPython does not seem to call base class initializer, put last in MRO
):
helpId = "ProfilesBasicManagement"
8 changes: 5 additions & 3 deletions source/gui/contextHelp.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
import os
import tempfile
import typing
import queueHandler

import gui
import ui
import wx
from logHandler import log

Expand All @@ -29,11 +26,16 @@ def showHelp(helpId: str):
button in an NVDA dialog is pressed or the F1 key is pressed on a
recognized control.
"""

import ui
import queueHandler
if not helpId:
# Translators: Message indicating no context sensitive help is available for the control or dialog.
noHelpMessage = _("No help available here.")
queueHandler.queueFunction(queueHandler.eventQueue, ui.message, noHelpMessage)
return

import gui
helpFile = gui.getDocFilePath("userGuide.html")
if helpFile is None:
# Translators: Message shown when trying to display context sensitive help,
Expand Down
8 changes: 4 additions & 4 deletions source/gui/installerGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
from logHandler import log
import gui
from gui import guiHelper
import gui.contextHelp
from gui.dpiScalingHelper import DpiScalingHelperMixinWithoutInit
from .contextHelp import ContextHelpMixin
import tones
import systemUtils

Expand Down Expand Up @@ -125,7 +125,7 @@ def doSilentInstall(

class InstallerDialog(
DpiScalingHelperMixinWithoutInit,
gui.ContextHelpMixin,
gui.contextHelp.ContextHelpMixin,
wx.Dialog, # wxPython does not seem to call base class initializer, put last in MRO
):

Expand Down Expand Up @@ -268,7 +268,7 @@ def onReviewAddons(self, evt):

class InstallingOverNewerVersionDialog(
DpiScalingHelperMixinWithoutInit,
gui.ContextHelpMixin,
gui.contextHelp.ContextHelpMixin,
wx.Dialog, # wxPython does not seem to call base class initializer, put last in MRO
):

Expand Down Expand Up @@ -330,7 +330,7 @@ def showInstallGui():


class PortableCreaterDialog(
ContextHelpMixin,
gui.contextHelp.ContextHelpMixin,
wx.Dialog, # wxPython does not seem to call base class initializer, put last in MRO
):

Expand Down
14 changes: 7 additions & 7 deletions source/gui/settingsDialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import languageHandler
import speech
import gui
import gui.contextHelp
import globalVars
from logHandler import log
import nvwave
Expand Down Expand Up @@ -55,10 +56,9 @@
import keyLabels
from .dpiScalingHelper import DpiScalingHelperMixinWithoutInit


class SettingsDialog(
DpiScalingHelperMixinWithoutInit,
gui.ContextHelpMixin,
gui.contextHelp.ContextHelpMixin,
wx.Dialog, # wxPython does not seem to call base class initializer, put last in MRO
metaclass=guiHelper.SIPABCMeta
):
Expand Down Expand Up @@ -252,7 +252,7 @@ def _onWindowDestroy(self, evt):

class SettingsPanel(
DpiScalingHelperMixinWithoutInit,
gui.ContextHelpMixin,
gui.contextHelp.ContextHelpMixin,
wx.Panel, # wxPython does not seem to call base class initializer, put last in MRO
metaclass=guiHelper.SIPABCMeta
):
Expand Down Expand Up @@ -864,7 +864,7 @@ def postSave(self):


class LanguageRestartDialog(
gui.ContextHelpMixin,
gui.contextHelp.ContextHelpMixin,
wx.Dialog, # wxPython does not seem to call base class initializer, put last in MRO
):

Expand Down Expand Up @@ -2472,7 +2472,7 @@ def onSave(self):


class AdvancedPanelControls(
gui.ContextHelpMixin,
gui.contextHelp.ContextHelpMixin,
wx.Panel, # wxPython does not seem to call base class initializer, put last in MRO
):
"""Holds the actual controls for the Advanced Settings panel, this allows the state of the controls to
Expand Down Expand Up @@ -2820,7 +2820,7 @@ def onEnableControlsCheckBox(self, evt):


class DictionaryEntryDialog(
gui.ContextHelpMixin,
gui.contextHelp.ContextHelpMixin,
wx.Dialog, # wxPython does not seem to call base class initializer, put last in MRO
):
helpId = "SpeechDictionaries"
Expand Down Expand Up @@ -3943,7 +3943,7 @@ def Destroy(self):


class AddSymbolDialog(
gui.ContextHelpMixin,
gui.contextHelp.ContextHelpMixin,
wx.Dialog # wxPython does not seem to call base class initializer, put last in MRO
):

Expand Down
6 changes: 3 additions & 3 deletions source/updateCheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
raise RuntimeError("No update version type, update checking not supported")
import addonAPIVersion
# Avoid a E402 'module level import not at top of file' warning, because several checks are performed above.
from gui.contextHelp import ContextHelpMixin # noqa: E402
import gui.contextHelp # noqa: E402
Comment thread
feerrenrut marked this conversation as resolved.
from gui.dpiScalingHelper import DpiScalingHelperMixin, DpiScalingHelperMixinWithoutInit # noqa: E402
import winVersion
import os
Expand Down Expand Up @@ -320,7 +320,7 @@ def _result(self, info):

class UpdateResultDialog(
DpiScalingHelperMixinWithoutInit,
ContextHelpMixin,
gui.contextHelp.ContextHelpMixin,
wx.Dialog # wxPython does not seem to call base class initializer, put last in MRO
):
helpId = "GeneralSettingsCheckForUpdates"
Expand Down Expand Up @@ -452,7 +452,7 @@ def onReviewAddonsButton(self, evt):

class UpdateAskInstallDialog(
DpiScalingHelperMixinWithoutInit,
gui.ContextHelpMixin,
gui.contextHelp.ContextHelpMixin,
wx.Dialog, # wxPython does not seem to call base class initializer, put last in MRO
):

Expand Down