Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxGUI: Fix various typos in comments, strings, and methods #4710

Merged
merged 20 commits into from
Nov 18, 2024
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
4 changes: 2 additions & 2 deletions gui/wxpython/animation/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ def CompositeProcess(
:param tempDir: directory for rendering
:param cmdList: list of d.rast/d.vect commands
:param region: region as a dict or None
:param opacites: list of opacities
:param opacities: list of opacities
:param bgcolor: background color as a tuple of 3 values 0 to 255
:param fileQueue: the inter process communication queue
storing the file name of the image
Expand Down Expand Up @@ -896,7 +896,7 @@ def test():
if os.path.exists(tempDir):
shutil.rmtree(tempDir)
os.mkdir(tempDir)
# comment this line to keep the directory after prgm ends
# comment this line to keep the directory after program ends
# cleanUp = CleanUp(tempDir)
# import atexit
# atexit.register(cleanUp)
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/animation/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
This program is free software under the GNU General Public License
(>=v2). Read the file COPYING that comes with GRASS for details.

@author Anna Perasova <kratochanna gmail.com>
@author Anna Petrasova <kratochanna gmail.com>
"""

import os
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/core/gcmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ def __ProcessStdErr(self):
def __GetError(self):
"""Get error message or ''"""
if not self.cmdThread.module:
return _("Unable to exectute command: '%s'") % " ".join(self.cmd)
return _("Unable to execute command: '%s'") % " ".join(self.cmd)

for type, msg in self.__ProcessStdErr():
if type == "ERROR":
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/core/giface.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def GetLayersByName(self, name):

.. todo::
if common usage is just to check the presence of layer,
intoroduce a new method ContainsLayerByName(name)
introduce a new method ContainsLayerByName(name)
"""
raise NotImplementedError

Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/core/globalvar.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def UpdateGRASSAddOnCommands(eList=None):
Debug.msg(1, "Number of GRASS AddOn commands: %d", nCmd)


"""@brief Collected GRASS-relared binaries/scripts"""
"""@brief Collected GRASS-related binaries/scripts"""
grassCmd, grassScripts = get_commands()
Debug.msg(1, "Number of core GRASS commands: %d", len(grassCmd))
UpdateGRASSAddOnCommands()
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/core/menutree.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def _createItem(self, item, node):
elif item.tag == "menu":
self._createMenu(item, node)
else:
raise ValueError(_("Unknow tag %s") % item.tag)
raise ValueError(_("Unknown tag %s") % item.tag)

def GetModel(self, separators=False):
"""Returns copy of model with or without separators
Expand Down
4 changes: 2 additions & 2 deletions gui/wxpython/core/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ def Render(self, force=False, windres=False):
def OnRenderDone(self, env):
"""Rendering process done

Make image composiotion, emits updateMap event.
Make image composition, emits updateMap event.
"""
maps = []
masks = []
Expand Down Expand Up @@ -1393,7 +1393,7 @@ def AddLayer(
def DeleteAllLayers(self, overlay=False):
"""Delete all layers

:param overlay: True to delete also overlayes
:param overlay: True to also delete overlays
"""
self.layers = []
if overlay:
Expand Down
4 changes: 2 additions & 2 deletions gui/wxpython/core/toolboxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def toolboxes2menudata(mainMenu, toolboxes, userToolboxes, wxguiItems, moduleIte

userHasToolboxes = False

# in case user has empty toolboxes file (to avoid genereation)
# in case user has empty toolboxes file (to avoid generation)
if userToolboxes and userToolboxes.findall(".//toolbox"):
_expandUserToolboxesItem(root, userToolboxes)
_expandToolboxes(root, userToolboxes)
Expand Down Expand Up @@ -746,7 +746,7 @@ def _convertTree(root):
def _getXMLString(root):
"""Converts XML tree to string

Since it is usually requier, this function adds a comment (about
Since it is usually required, this function adds a comment (about
autogenerated file) to XML file.

:return: XML as string
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/datacatalog/g.gui.datacatalog.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h2>NOTES</h2>

<h3>WARNING</h3>
When renaming, copying or deleting maps outside of Data Catalog, you need to reload
the current mapset or entire database, because it is currently not synchronised.
the current mapset or entire database, because it is currently not synchronized.

<h2>SEE ALSO</h2>

Expand Down
12 changes: 6 additions & 6 deletions gui/wxpython/dbmgr/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ def __init__(
:param item: item from Layer Tree
:param log: log window
:param statusbar: widget with statusbar
:param kwagrs: other wx.Frame's arguments
:param kwargs: other wx.Frame's arguments
"""

# stores all data, which are shared by pages
Expand Down Expand Up @@ -918,7 +918,7 @@ def __init__(self, parent, parentDbMgrBase):
self.listOfCommands = []
self.listOfSQLStatements = []

# initializet pages
# initialize pages
self.pages = self.parentDbMgrBase.pages

# shared data among pages
Expand Down Expand Up @@ -1138,7 +1138,7 @@ def __init__(self, parent, parentDbMgrBase, onlyLayer=-1):
def AddLayer(self, layer, pos=-1):
"""Adds tab which represents table and enables browse it

:param layer: vector map layer conntected to table
:param layer: vector map layer connected to table
:param pos: position of tab, if -1 it is added to end

:return: True if layer was added
Expand Down Expand Up @@ -4030,7 +4030,7 @@ def Update(self, driver, database, table, column):
database=database,
)
if not dataStr:
GError(parent=self.parent, message=_("Unable to calculte statistics."))
GError(parent=self.parent, message=_("Unable to calculate statistics."))
self.Close()
return

Expand All @@ -4039,7 +4039,7 @@ def Update(self, driver, database, table, column):
GError(
parent=self.parent,
message=_(
"Unable to calculte statistics. "
"Unable to calculate statistics. "
"Invalid number of lines %d (should be %d)."
)
% (len(dataLines), len(stats)),
Expand All @@ -4066,7 +4066,7 @@ def Update(self, driver, database, table, column):
)
if not dataVar:
GWarning(
parent=self.parent, message=_("Unable to calculte standard deviation.")
parent=self.parent, message=_("Unable to calculate standard deviation.")
)
varSum = 0
for var in decode(dataVar).splitlines():
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/dbmgr/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def __init__(
:param item: item from Layer Tree
:param log: log window
:param selection: name of page to be selected
:param kwagrs: other wx.Frame's arguments
:param kwargs: other wx.Frame's arguments
"""
self.parent = parent
try:
Expand Down
6 changes: 3 additions & 3 deletions gui/wxpython/dbmgr/sqlbuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@


class SQLBuilder(wx.Frame):
"""SQLBuider class
"""SQLBuilder class
Base class for classes, which builds SQL statements.
"""

Expand Down Expand Up @@ -314,8 +314,8 @@ def _doLayout(self, modeChoices, showDbInfo=False):
flag=wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND,
border=5,
)
# self.pagesizer.Add(self.btn_uniqe,0,wx.ALIGN_LEFT|wx.TOP,border=5)
# self.pagesizer.Add(self.btn_uniqesample,0,wx.ALIGN_LEFT|wx.TOP,border=5)
# self.pagesizer.Add(self.btn_unique,0,wx.ALIGN_LEFT|wx.TOP,border=5)
# self.pagesizer.Add(self.btn_uniquesample,0,wx.ALIGN_LEFT|wx.TOP,border=5)
self.pagesizer.Add(
self.btn_logicpanel, proportion=0, flag=wx.ALIGN_CENTER_HORIZONTAL
)
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/gcp/g.gui.gcp.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h3>Components of the GCP Manager</h3>
<em>List of ground control points</em>
<p>
The list of Ground Control Points can be sorted by clicking on a column
header. Clicking on a cloumn header will sort the GCPs ascending, a
header. Clicking on a column header will sort the GCPs ascending, a
second click on the same column will sort the GCPs descending. Overall
RMS error and individual RMS errors of all points are often improved if
the GCP with the highest RMS error is adjusted. Individual coordinates
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/gcp/g.gui.gcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# %end

"""
Module to run GCP management tool as stadalone application.
Module to run GCP management tool as standalone application.

@author Vaclav Petras <wenzeslaus gmail.com> (standalone module)
"""
Expand Down
10 changes: 5 additions & 5 deletions gui/wxpython/gcp/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

@author Original author Michael Barton
@author Original version improved by Martin Landa <landa.martin gmail.com>
@author Rewritten by Markus Metz redesign georectfier -> GCP Manage
@author Rewritten by Markus Metz redesign georectifier -> GCP Manage
@author Support for GraphicsSet added by Stepan Turek <stepan.turek seznam.cz> (2012)
"""

Expand Down Expand Up @@ -1053,10 +1053,10 @@ def __init__(
# register data structures for drawing GCP's
#
self.pointsToDrawTgt = self.TgtMapWindow.RegisterGraphicsToDraw(
graphicsType="point", setStatusFunc=self.SetGCPSatus
graphicsType="point", setStatusFunc=self.SetGCPStatus
)
self.pointsToDrawSrc = self.SrcMapWindow.RegisterGraphicsToDraw(
graphicsType="point", setStatusFunc=self.SetGCPSatus
graphicsType="point", setStatusFunc=self.SetGCPStatus
)

# connect to the map windows signals
Expand Down Expand Up @@ -1410,7 +1410,7 @@ def SetSettings(self):
# overwrite result map
self.overwrite = UserSettings.Get(group="gcpman", key="map", subkey="overwrite")

def SetGCPSatus(self, item, itemIndex):
def SetGCPStatus(self, item, itemIndex):
"""Before GCP is drawn, decides it's colour and whether it
will be drawn.
"""
Expand Down Expand Up @@ -1663,7 +1663,7 @@ def ReloadGCPs(self, event):
targetMapWin.UpdateMap(render=False, renderVector=False)

def OnFocus(self, event):
# TODO: it is here just to remove old or obsolete beavior of base class
# TODO: it is here just to remove old or obsolete behavior of base class
# gcp/MapPanel?
# self.grwiz.SwitchEnv('source')
pass
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/gmodeler/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- dialogs::ModelLoopDialog
- dialogs::ModelConditionDialog
- dialogs::ModelListCtrl
- dialogs::ValiableListCtrl
- dialogs::VariableListCtrl
- dialogs::ItemListCtrl
- dialogs::ItemCheckListCtrl

Expand Down
8 changes: 4 additions & 4 deletions gui/wxpython/gmodeler/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def ReorderItems(self, idxList):
self.canvas.parent.DefineCondition(mo)

def Normalize(self):
# check for inconsistecies
# check for inconsistencies
for idx in range(1, len(self.items)):
if not self.items[idx].GetBlock() and isinstance(
self.items[idx - 1], ModelLoop
Expand Down Expand Up @@ -525,7 +525,7 @@ def Validate(self):
def _substituteFile(self, item, params=None, checkOnly=False):
"""Substitute variables in command file inputs

:param bool checkOnly: tuble - True to check variable, don't touch files
:param bool checkOnly: True to check variable, don't touch files

:return: list of undefined variables
"""
Expand Down Expand Up @@ -770,7 +770,7 @@ def Run(self, log, onDone, parent=None):
p["value"] = ""

def DeleteIntermediateData(self, log):
"""Detele intermediate data"""
"""Delete intermediate data"""
rast, vect, rast3d, msg = self.GetIntermediateData()

if rast:
Expand Down Expand Up @@ -3736,5 +3736,5 @@ def GetErrors(self):
return errList

def DeleteIntermediateData(self) -> bool:
"""Check if to detele intermediate data"""
"""Check if to delete intermediate data"""
return bool(self.interData.IsShown() and self.interData.IsChecked())
2 changes: 1 addition & 1 deletion gui/wxpython/gmodeler/toolbars.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@


class ModelerToolbar(BaseToolbar):
"""Graphical modeler toolbaro (see gmodeler.py)"""
"""Graphical modeler toolbar (see gmodeler.py)"""

def __init__(self, parent):
BaseToolbar.__init__(self, parent)
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/gui_core/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1467,7 +1467,7 @@ def _addApplyButton(self):
"""

def _fullyQualifiedNames(self):
"""Adds CheckBox which determines is fully qualified names are retuned."""
"""Adds CheckBox which determines if fully qualified names are returned."""
self.fullyQualified = wx.CheckBox(
parent=self, id=wx.ID_ANY, label=_("Use fully-qualified map names")
)
Expand Down
4 changes: 2 additions & 2 deletions gui/wxpython/gui_core/mapdisp.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ class DoubleMapPanel(MapPanelBase):
It is expected that derived class will call _bindWindowsActivation()
when both map windows will be initialized.

Drived class should have method GetMapToolbar() returns toolbar
Derived classes should have method GetMapToolbar() returns toolbar
which has methods SetActiveMap() and Enable().

@note To access maps use getters only
Expand All @@ -605,7 +605,7 @@ def __init__(
r"""

\a firstMap is set as active (by assign it to \c self.Map).
Derived class should assging to \c self.MapWindow to make one
Derived class should assigning to \c self.MapWindow to make one
map window current by default.

:param parent: gui parent
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/gui_core/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ def __init__(self, num_of_params):
super().__init__()

def _enableDisableBtn(self, enable):
"""Enable/Disable buttomn
"""Enable/Disable button

:param bool enable: Enable/Disable btn
"""
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/image2target/g.gui.image2target.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h3>Components of the GCP Manager</h3>
<em>List of ground control points</em>
<p>
The list of Ground Control Points can be sorted by clicking on a column
header. Clicking on a cloumn header will sort the GCPs ascending, a
header. Clicking on a column header will sort the GCPs ascending, a
second click on the same column will sort the GCPs descending. Overall
RMS error and individual RMS errors of all points are often improved if
the GCP with the highest RMS error is adjusted. Individual coordinates
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/image2target/g.gui.image2target.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@


"""
Module to run GCP management tool as stadalone application.
Module to run GCP management tool as standalone application.
"""

import os
Expand Down
8 changes: 4 additions & 4 deletions gui/wxpython/image2target/ii2t_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

@author Original author Michael Barton
@author Original version improved by Martin Landa <landa.martin gmail.com>
@author Rewritten by Markus Metz redesign georectfier -> GCP Manage
@author Rewritten by Markus Metz redesign georectifier -> GCP Manage
@author Support for GraphicsSet added by Stepan Turek <stepan.turek seznam.cz> (2012)
@author port i.image.2target (v6) to version 7 in 2017 by Yann
"""
Expand Down Expand Up @@ -1030,10 +1030,10 @@ def __init__(
# register data structures for drawing GCP's
#
self.pointsToDrawTgt = self.TgtMapWindow.RegisterGraphicsToDraw(
graphicsType="point", setStatusFunc=self.SetGCPSatus
graphicsType="point", setStatusFunc=self.SetGCPStatus
)
self.pointsToDrawSrc = self.SrcMapWindow.RegisterGraphicsToDraw(
graphicsType="point", setStatusFunc=self.SetGCPSatus
graphicsType="point", setStatusFunc=self.SetGCPStatus
)

# connect to the map windows signals
Expand Down Expand Up @@ -1393,7 +1393,7 @@ def SetSettings(self):
self.pointsToDrawSrc.SetPropertyVal("text", textProp)
self.pointsToDrawTgt.SetPropertyVal("text", copy(textProp))

def SetGCPSatus(self, item, itemIndex):
def SetGCPStatus(self, item, itemIndex):
"""Before GCP is drawn, decides it's colour and whether it
will be drawn.
"""
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/iscatt/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ class PlotsRenderingManager:
"""Manages rendering of scatter plot.

.. todo::
still space for optimalization
still space for optimization
"""

def __init__(self, scatt_mgr, cats_mgr, core):
Expand Down
Loading
Loading