Skip to content

Commit

Permalink
Fix spelling in comments, esp. in wxGUI code (OSGeo#1357)
Browse files Browse the repository at this point in the history
Fixes come from Mega-Linter. Manually picked for PR.
  • Loading branch information
wenzeslaus authored Feb 18, 2021
1 parent 225aca2 commit c6e81b9
Show file tree
Hide file tree
Showing 54 changed files with 87 additions and 87 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Yes, you should really read [INSTALL](INSTALL). In addition, there are detailed

## Docker

Build a docker image using the downloaded source code (run this in the directory
Build a docker image using the downloaded source code (run this in the directory
containing the source code):

```
Expand Down
2 changes: 1 addition & 1 deletion doc/gui/wxpython/example/README
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ a few more things to be done.
<handler>OnExample</handler>
</menuitem>

6. Add folowing event handler to class GMFrame in ./gui/wxpython/lmgr/frame.py:
6. Add following event handler to class GMFrame in ./gui/wxpython/lmgr/frame.py:

def OnExample(self, event):
"""!Launch ExampleTool"""
Expand Down
8 changes: 4 additions & 4 deletions doc/vector/TODO
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ vectors. The geometry of GRASS vectors (coor file) is never loaded
whole to the memory. OTOH the support structures (topology and spatial
index) are loaded to memory on runtime. It should be possible to use
files for topology and spatial index also on runtime and that way
decrease the memory occupied by running module (practicaly to
decrease the memory occupied by running module (practically to
zero). The speed will decrease a bit but not significantly because
files are usually cached by system.

Expand Down Expand Up @@ -97,7 +97,7 @@ Remove bounding box from support structures (?)
The vector structures (P_line, P_area, P_isle) store bounding box in
N,S,E,W,T,B (doubles). Especially in case of element type GV_POINT the
bounding box occupies a lot of space (2-3 times more than the point
itself). I am not sure if this is realy good idea, it is necesssary to
itself). I am not sure if this is really good idea, it is necesssary to
valutate also how often Vect_line_box() is called and the impact of
the necessity to calculate always the box on the fly (when it is not
stored in the structure) which can be time consuming for example for
Expand Down Expand Up @@ -174,7 +174,7 @@ RDBMS. I think that either everything must be stored in RDBMS
that data are 'too distant' when RDBMS is used with geometry in file.

I think that more work should be done on the drivers which are using
embeded databases stored in files (SQLite,MySQL,DBF) with scope to
embedded databases stored in files (SQLite,MySQL,DBF) with scope to
reach similar functionality (functions, queries) which are in true
RDBMS without penalty of communication with server. It should be also
considered the possibility to change the default location of database
Expand Down Expand Up @@ -242,7 +242,7 @@ v.select.
v.pack/v.unpack
---------------
Write it. New modules to pack/unpack a vector to/from single file
(probably tar). I am not sure about format. Originaly I was thinking
(probably tar). I am not sure about format. Originally I was thinking
about ASCII+DBF as it can be read also without GRASS but ASCII and DBF
can lose precision and DBF has other limitations. It whould be
probably better to use copy of 'coor' file and attributes written to
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/animation/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def LoadOverlay(self, cmd):


class BitmapRenderer:
"""Class which renderes 2D and 3D images to files."""
"""Class which renders 2D and 3D images to files."""

def __init__(self, mapFilesPool, tempDir,
imageWidth, imageHeight):
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 @@ -246,7 +246,7 @@ def ComputeScaledRect(sourceSize, destSize):


def RenderText(text, font, bgcolor, fgcolor):
"""Renderes text with given font to bitmap."""
"""Renders text with given font to bitmap."""
dc = wx.MemoryDC(EmptyBitmap(20, 20))
dc.SetFont(font)
w, h = dc.GetTextExtent(text)
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 @@ -39,7 +39,7 @@ class Notification:


class Layer(object):
"""Layer is generaly usable layer object.
"""Layer is generally usable layer object.
.. note::
Currently without specifying the interface.
Expand Down
6 changes: 3 additions & 3 deletions gui/wxpython/core/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ def __init__(self, gisrc=None):
:param gisrc: alternative gisrc (used eg. by georectifier)
"""
Debug.msg(1, "Map.__init__(): gisrc=%s" % gisrc)
# region/extent settigns
# region/extent settings
self.wind = dict() # WIND settings (wind file)
self.region = dict() # region settings (g.region)
self.width = 640 # map width
Expand Down Expand Up @@ -1270,7 +1270,7 @@ def Render(self, force=False, windres=False):
"""Creates final image composite
This function can conditionaly use high-level tools, which
should be avaliable in wxPython library
should be available in wxPython library
:param force: force rendering
:param windres: use region resolution (True) otherwise display
Expand Down Expand Up @@ -1643,5 +1643,5 @@ def RenderOverlays(self, force):
self.renderMgr.RenderOverlays(force)

def AbortAllThreads(self):
"""Abort all layers threads e. g. donwloading data"""
"""Abort all layers threads e. g. downloading data"""
self.renderMgr.Abort()
4 changes: 2 additions & 2 deletions gui/wxpython/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ def GetColorTables():


def _getGDALFormats():
"""Get dictionary of avaialble GDAL drivers"""
"""Get dictionary of available GDAL drivers"""
try:
ret = grass.read_command('r.in.gdal',
quiet=True,
Expand All @@ -644,7 +644,7 @@ def _getGDALFormats():


def _getOGRFormats():
"""Get dictionary of avaialble OGR drivers"""
"""Get dictionary of available OGR drivers"""
try:
ret = grass.read_command('v.in.ogr',
quiet=True,
Expand Down
8 changes: 4 additions & 4 deletions gui/wxpython/datacatalog/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,16 +847,16 @@ def GetCurrentDbLocationMapsetNode(self):
return grassdbItem[0], locationItem[0], mapsetItem[0]

def OnGetItemImage(self, index, which=wx.TreeItemIcon_Normal, column=0):
"""Overriden method to return image for each item."""
"""Overridden method to return image for each item."""
node = self._model.GetNodeByIndex(index)
try:
return self._iconTypes.index(node.data['type'])
except ValueError:
return 0

def OnGetItemTextColour(self, index):
"""Overriden method to return colour for each item.
Used to distinquish lock and ownership on mapsets."""
"""Overridden method to return colour for each item.
Used to distinguish lock and ownership on mapsets."""
node = self._model.GetNodeByIndex(index)
if node.data['type'] == 'mapset':
if node.data['current']:
Expand All @@ -866,7 +866,7 @@ def OnGetItemTextColour(self, index):
return wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT)

def OnGetItemFont(self, index):
"""Overriden method to return font for each item.
"""Overridden method to return font for each item.
Used to highlight current db/loc/mapset."""
node = self._model.GetNodeByIndex(index)
font = self.GetFont()
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/docs/wxgui_sphinx/_static/pygrass.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* GRASS documentation site style sheet
*
* send improvements to GRASS Developers list
*
*
* (eg how to reach the same result on netscape, mozilla konqueror?)
*
* Fonts:
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/gcp/mapdisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def __init__(self, parent, giface,
self.statusbarManager.Update()

def _setUpMapWindow(self, mapWindow):
# TODO: almost the smae implementation as for MapFrameBase (only names differ)
# TODO: almost the same implementation as for MapFrameBase (only names differ)
# enable or disable zoom history tool
mapWindow.zoomHistoryAvailable.connect(
lambda:
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 @@ -1056,7 +1056,7 @@ def MoveItems(self, items, up):
model.Normalize()
self.Populate(model.GetItems(objType=ModelAction))

# re-selected originaly selected item
# re-selected originally selected item
for item in itemsToSelect:
self.SetItemState(
item,
Expand Down
4 changes: 2 additions & 2 deletions gui/wxpython/gui_core/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ def GetExistSubgroups(self, group):
read=True, flags='sg').splitlines()

def ShowResult(self, group, returnCode, create):
"""Show if operation was successfull."""
"""Show if operation was successful."""
group += '@' + grass.gisenv()['MAPSET']
if returnCode is None:
label = _("No changes to apply in group <%s>.") % group
Expand Down Expand Up @@ -1713,7 +1713,7 @@ def _layerTypes(self):
return [_('raster'), ]

def _selectAll(self):
"""Could be overriden"""
"""Could be overridden"""
return False

def _fullyQualifiedNames(self):
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/gui_core/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ def __init__(self, parent, giface, task_description, id=wx.ID_ANY,

guisizer = wx.BoxSizer(wx.VERTICAL)

# set apropriate output window
# set appropriate output window
if self.parent:
self.standalone = False
else:
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/gui_core/gselect.py
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ def GetTable(self, layer):
return self.layers[layer]['table']

def GetDbSettings(self, layer):
"""Get database settins
"""Get database settings
:param layer: layer number
Expand Down
6 changes: 3 additions & 3 deletions gui/wxpython/gui_core/mapdisp.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ class MapFrameBase(wx.Frame):
or override
GetProperty(), SetProperty() and HasProperty() methods.
Several methods has to be overriden or
Several methods has to be overridden or
\c NotImplementedError("MethodName") will be raised.
If derived class enables and disables auto-rendering,
it should override IsAutoRendered method.
It is expected that derived class will call _setUpMapWindow().
Derived class can has one or more map windows (and map renderes)
Derived class can has one or more map windows (and map renders)
but implementation of MapFrameBase expects that one window and
one map will be current.
Current instances of map window and map renderer should be returned
Expand Down Expand Up @@ -487,7 +487,7 @@ class DoubleMapFrame(MapFrameBase):
.. todo:
Use it in GCP manager (probably changes to both DoubleMapFrame
and GCP MapFrame will be neccessary).
and GCP MapFrame will be necessary).
"""

def __init__(self, parent=None, id=wx.ID_ANY, title=None,
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/gui_core/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ def _createAppearancePage(self, notebook):
pos=(row, 1))
gridSizer.AddGrowableCol(0)
#
# appearence
# appearance
#
box = StaticBox(
parent=panel,
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/gui_core/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def UpdateCmdHistory(self, cmd):
# update also traced commands
self.commands.append(cmd)

# keep command history to a managable size
# keep command history to a manageable size
if len(self.cmdbuffer) > 200:
del self.cmdbuffer[0]
self.cmdindex = len(self.cmdbuffer)
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 @@ -540,7 +540,7 @@ def __init__(self, parent, id=wx.ID_ANY,
self.Bind(wx.EVT_SIZE, self.OnSize)

def DoGetBestSize(self):
"""Overriden method which reports widget's best size."""
"""Overridden method which reports widget's best size."""
if not self.init:
self.init = True
self._updateLabel()
Expand Down
4 changes: 2 additions & 2 deletions gui/wxpython/iclass/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ def GetListCtrl(self):
class CategoryListCtrl(ListCtrl,
listmix.ListCtrlAutoWidthMixin,
listmix.TextEditMixin):
"""Widget for controling list of classes (categories).
"""Widget for controlling list of classes (categories).
CategoryListCtrl updates choice in mapwindow and removes raster map
when deleting class (category).
Expand Down Expand Up @@ -582,7 +582,7 @@ def OnGetItemAttr(self, item):


def ContrastColor(color):
"""Decides which value shoud have text to be contrast with backgroud color
"""Decides which value shoud have text to be contrast with background color
(bright bg -> black, dark bg -> white)
.. todo::
Expand Down
4 changes: 2 additions & 2 deletions gui/wxpython/iclass/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ def OnSaveSigFile(self, event):
dlg.Destroy()

def InitStatistics(self):
"""Initialize variables and c structures neccessary for
"""Initialize variables and c structures necessary for
computing statistics.
"""
self.g = {'group': None, 'subgroup': None}
Expand Down Expand Up @@ -1291,7 +1291,7 @@ class MapManager:
def __init__(self, frame, mapWindow, Map):
"""
It is expected that \a mapWindow is conected with \a Map.
It is expected that \a mapWindow is connected with \a Map.
:param frame: application main window
:param mapWindow: map window instance
Expand Down
4 changes: 2 additions & 2 deletions gui/wxpython/iclass/statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def DeleteAllStatistics(self):


class Statistics:
"""Statistis conected to one class (category).
"""Statistis connected to one class (category).
It is Python counterpart of similar C structure.
But it adds some attributes or features used in wxIClass.
Expand Down Expand Up @@ -183,7 +183,7 @@ def SetStatistics(self, stats):


class BandStatistics:
"""Statistis conected to one band within class (category).
"""Statistis connected to one band within class (category).
:class:`Statistics`
"""
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/image2target/ii2t_gis_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ def OnWizard(self, event):
def ImportFile(self, filePath):
"""Tries to import file as vector or raster.
If successfull sets default region from imported map.
If successful sets default region from imported map.
"""
RunCommand('db.connect', flags='c')
mapName = os.path.splitext(os.path.basename(filePath))[0]
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/image2target/ii2t_mapdisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def __init__(self, parent, giface,
self.statusbarManager.Update()

def _setUpMapWindow(self, mapWindow):
# TODO: almost the smae implementation as for MapFrameBase (only names differ)
# TODO: almost the same implementation as for MapFrameBase (only names differ)
# enable or disable zoom history tool
mapWindow.zoomHistoryAvailable.connect(
lambda:
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/lmgr/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -2227,7 +2227,7 @@ def _updateCurrentMap(self, **kwargs):
self.GetMapDisplay().GetWindow().UpdateMap()

def OnMapCreated(self, name, ltype, add=None):
"""Decides wheter the map should be added to layer tree."""
"""Decides whether the map should be added to layer tree."""
if add is None:
# add new map into layer if globally enabled
if UserSettings.Get(group='cmd',
Expand Down
4 changes: 2 additions & 2 deletions gui/wxpython/lmgr/layertree.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def _setGradient(self, iType=None):
def GetSelections(self):
"""Returns a list of selected items.
This method is copied from customtreecontrol and overriden because
This method is copied from customtreecontrol and overridden because
with some version wx (?) multiple selection doesn't work.
Probably it is caused by another GetSelections method in treemixin.DragAndDrop?
"""
Expand Down Expand Up @@ -1886,7 +1886,7 @@ def OnEndDrag(self, event):
self.OnDrop(dropTarget, self._dragItem)

def OnDrop(self, dropTarget, dragItem):
# save everthing associated with item to drag
# save everything associated with item to drag
try:
old = dragItem # make sure this member exists
except:
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/mapdisp/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -1430,7 +1430,7 @@ def OnZoomMenu(self, event):

def SetProperties(self, render=False, mode=0, showCompExtent=False,
constrainRes=False, projection=False, alignExtent=True):
"""Set properies of map display window"""
"""Set properties of map display window"""
self.mapWindowProperties.autoRender = render
if self.statusbarManager:
self.statusbarManager.SetMode(mode)
Expand Down
6 changes: 3 additions & 3 deletions gui/wxpython/mapdisp/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ def __init__(self, giface, cmdfile=None, mapfile=None):
self.cmdfile = cmdfile

# list of layers for rendering added from cmd file
# TODO temporary solution, layer managment by different tools in GRASS
# should be resovled
# TODO temporary solution, layer management by different tools in GRASS
# should be resolved
self.ownedLayers = []
self.oldOverlays = []

Expand Down Expand Up @@ -576,7 +576,7 @@ def watcher(self):
# the check below disabled, it's too much invasive to call
# g.gisenv in the watcher...
# try:
# GISBASE and other system enviromental variables can not be used
# GISBASE and other system environmental variables can not be used
# since the process inherited them from GRASS
# raises exception when vaiable does not exists
# grass.gisenv()['GISDBASE']
Expand Down
Loading

0 comments on commit c6e81b9

Please sign in to comment.