diff --git a/TermTk/TTkCore/canvas.py b/TermTk/TTkCore/canvas.py index a4f2b2dc..99e7ce0d 100644 --- a/TermTk/TTkCore/canvas.py +++ b/TermTk/TTkCore/canvas.py @@ -193,7 +193,7 @@ class TTkCanvas: ''' NOTE: drawText is one of the most abused functions, - there is some reduntant code here in order to reduce the footprint + there is some redundant code here in order to reduce the footprint ''' if not self._visible: return diff --git a/TermTk/TTkCore/string.py b/TermTk/TTkCore/string.py index dafccb09..7c7dc349 100644 --- a/TermTk/TTkCore/string.py +++ b/TermTk/TTkCore/string.py @@ -307,7 +307,7 @@ class TTkString(): def addColor(self, color, match=None, posFrom=None, posTo=None): ''' Add the color of the entire string or a slice of it - If only the color is specified, the entire sting is colorized + If only the color is specified, the entire string is colorized :param color: the color to be used, defaults to :class:`~TermTk.TTkCore.color.TTkColor.RST` :type color: :class:`~TermTk.TTkCore.color.TTkColor` @@ -345,7 +345,7 @@ class TTkString(): def setColor(self, color, match=None, posFrom=None, posTo=None): ''' Set the color of the entire string or a slice of it - If only the color is specified, the entire sting is colorized + If only the color is specified, the entire string is colorized :param color: the color to be used, defaults to :class:`~TermTk.TTkCore.color.TTkColor.RST` :type color: :class:`~TermTk.TTkCore.color.TTkColor` diff --git a/TermTk/TTkWidgets/TTkModelView/treewidget.py b/TermTk/TTkWidgets/TTkModelView/treewidget.py index 53ee9172..9eae056c 100644 --- a/TermTk/TTkWidgets/TTkModelView/treewidget.py +++ b/TermTk/TTkWidgets/TTkModelView/treewidget.py @@ -235,7 +235,7 @@ class TTkTreeWidget(TTkAbstractScrollView): @pyTTkSlot() def _refreshCache(self): - ''' I save a representation fo the displayed tree in a cache array + ''' I save a representation of the displayed tree in a cache array to avoid eccessve recursion over the items and identify quickly the nth displayed line to improve the interaction diff --git a/TermTk/TTkWidgets/TTkModelView/treewidgetitem.py b/TermTk/TTkWidgets/TTkModelView/treewidgetitem.py index 6b0af244..a2fa1f55 100644 --- a/TermTk/TTkWidgets/TTkModelView/treewidgetitem.py +++ b/TermTk/TTkWidgets/TTkModelView/treewidgetitem.py @@ -142,7 +142,7 @@ class TTkTreeWidgetItem(TTkAbstractItemModel): self._children, key = lambda x : x.sortData(self._sortColumn), reverse = self._sortOrder == TTkK.DescendingOrder) - # Broadcast the sorting to the childrens + # Broadcast the sorting to the children if children: for c in self._children: c.dataChanged.disconnect(self.emitDataChanged) diff --git a/TermTk/TTkWidgets/combobox.py b/TermTk/TTkWidgets/combobox.py index 3479bd92..c21d7a83 100644 --- a/TermTk/TTkWidgets/combobox.py +++ b/TermTk/TTkWidgets/combobox.py @@ -44,7 +44,7 @@ class TTkComboBox(TTkWidget): self.editTextChanged = pyTTkSignal(str) TTkWidget.__init__(self, *args, **kwargs) self._name = kwargs.get('name' , 'TTkCheckbox' ) - # self.cehcked = pyTTkSignal() + # self.checked = pyTTkSignal() self._lineEdit = TTkLineEdit(parent=self) self._list = kwargs.get('list', [] ) self._insertPolicy = kwargs.get('insertPolicy', TTkK.InsertAtBottom ) @@ -220,4 +220,4 @@ class TTkComboBox(TTkWidget): def focusInEvent(self): if self._editable: - self._lineEdit.setFocus() \ No newline at end of file + self._lineEdit.setFocus() diff --git a/TermTk/TTkWidgets/radiobutton.py b/TermTk/TTkWidgets/radiobutton.py index 2150fe35..34081db6 100644 --- a/TermTk/TTkWidgets/radiobutton.py +++ b/TermTk/TTkWidgets/radiobutton.py @@ -69,7 +69,7 @@ class TTkRadioButton(TTkWidget): self.clicked = pyTTkSignal() TTkWidget.__init__(self, *args, **kwargs) self._name = kwargs.get('name' , 'TTkRadioButton' ) - # self.cehcked = pyTTkSignal() + # self.checked = pyTTkSignal() self._checked = kwargs.get('checked', False ) self._text = kwargs.get('text', '' ) self.setMinimumSize(3 + len(self._text), 1) diff --git a/TermTk/TTkWidgets/scrollbar.py b/TermTk/TTkWidgets/scrollbar.py index 5e8c9737..e32c96c3 100644 --- a/TermTk/TTkWidgets/scrollbar.py +++ b/TermTk/TTkWidgets/scrollbar.py @@ -107,7 +107,7 @@ class TTkScrollBar(TTkWidget): if asciiStep==0: asciiStep=1 # Force the slider to be at least one char wide asciiDrawingSize = size2 - asciiStep a = self._value - self._minimum - # covert i screen coordinates + # convert i screen coordinates aa = asciiDrawingSize * a // (self._maximum - self._minimum) bb = aa + asciiStep self._canvas.drawScroll(pos=(0,0),size=size,slider=(aa+1,bb+1),orientation=self._orientation, color=color) @@ -265,4 +265,4 @@ class TTkScrollBar(TTkWidget): def focusColor(self, color): if self.focusColor != color: self._focusColor = color - self.update() \ No newline at end of file + self.update() diff --git a/TermTk/TTkWidgets/widget.py b/TermTk/TTkWidgets/widget.py index 719112da..4c3c0646 100644 --- a/TermTk/TTkWidgets/widget.py +++ b/TermTk/TTkWidgets/widget.py @@ -194,7 +194,7 @@ class TTkWidget(TMouseEvents,TKeyEvents, TDragEvents): def paintEvent(self): ''' Paint Event callback, - ths need to be overridden in the widget. + this need to be overridden in the widget. ''' pass @@ -341,7 +341,7 @@ class TTkWidget(TMouseEvents,TKeyEvents, TDragEvents): if not self._enabled: return True # Mouse Drag has priority because it - # should be handled by the focussed widget + # should be handled by the focused widget # unless there is a Drag and Drop event ongoing if evt.evt == TTkK.Drag and not TTkHelper.isDnD(): if self.mouseDragEvent(evt): diff --git a/docs/MDNotes/TODO.md b/docs/MDNotes/TODO.md index beb88804..001ab3c0 100644 --- a/docs/MDNotes/TODO.md +++ b/docs/MDNotes/TODO.md @@ -51,7 +51,7 @@ ## Logs - [x] Log Class -- [ ] Run Logger on a separate thread (push sring to a queue) +- [ ] Run Logger on a separate thread (push string to a queue) - [ ] Include option to force print - [ ] Log helpers - [x] File and Stdout logger diff --git a/tutorial/002-layout.rst b/tutorial/002-layout.rst index e65bc53e..a7a4d0a0 100644 --- a/tutorial/002-layout.rst +++ b/tutorial/002-layout.rst @@ -152,7 +152,7 @@ Following is the code to execute `VBox Example`_ in pyTermTk_ import TermTk as ttk - # Set the VBoxLayout as defaut in the terminal widget + # Set the VBoxLayout as default in the terminal widget root = ttk.TTk(layout=ttk.TTkVBoxLayout()) # Attach 4 buttons to the root widget @@ -198,7 +198,7 @@ Following is the code to execute `HBox Example`_ in pyTermTk_ import TermTk as ttk - # Set the HBoxLayout as defaut in the terminal widget + # Set the HBoxLayout as default in the terminal widget root = ttk.TTk() root.setLayout(ttk.TTkHBoxLayout()) @@ -246,7 +246,7 @@ Following is the code to execute `HBox Example`_ in pyTermTk_ import TermTk as ttk - # Set the GridLayout as defaut in the terminal widget + # Set the GridLayout as default in the terminal widget gridLayout = ttk.TTkGridLayout(columnMinHeight=0,columnMinWidth=2) root = ttk.TTk(layout=gridLayout) @@ -290,7 +290,7 @@ Following is the code to execute `Nested Layouts Example`_ in pyTermTk_ import TermTk as ttk - # Set the GridLayout as defaut in the terminal widget + # Set the GridLayout as default in the terminal widget root = ttk.TTk() gridLayout = ttk.TTkGridLayout() diff --git a/tutorial/005-calculator.rst b/tutorial/005-calculator.rst index 2689f3c6..c35b9bd0 100644 --- a/tutorial/005-calculator.rst +++ b/tutorial/005-calculator.rst @@ -124,7 +124,7 @@ Based on the positions and sizes defined in the `design layout <#design>`_, I pl # Just to show off I am using another way to attach it to the grid layout winLayout.addWidget(btn0:=ttk.TTkButton(border=True, text="0"), 4,0, 1,2) - # Define the 2 algebric buttons + # Define the 2 algebraic buttons winLayout.addWidget(btnAdd:=ttk.TTkButton(border=True, text="+"), 1,3) winLayout.addWidget(btnSub:=ttk.TTkButton(border=True, text="-"), 2,3) diff --git a/tutorial/calculator/calculator.002.py b/tutorial/calculator/calculator.002.py index bd446713..0516c9a3 100755 --- a/tutorial/calculator/calculator.002.py +++ b/tutorial/calculator/calculator.002.py @@ -66,7 +66,7 @@ winLayout.addWidget(btn9, 3,2) # Just to show off I am using another way to attach it to the grid layout winLayout.addWidget(btn0:=ttk.TTkButton(border=True, text="0"), 4,0, 1,2) - # Define the 2 algebric buttons + # Define the 2 algebraic buttons winLayout.addWidget(btnAdd:=ttk.TTkButton(border=True, text="+"), 1,3) winLayout.addWidget(btnSub:=ttk.TTkButton(border=True, text="-"), 2,3) diff --git a/tutorial/calculator/calculator.003.py b/tutorial/calculator/calculator.003.py index 72f9c0d0..100c4771 100755 --- a/tutorial/calculator/calculator.003.py +++ b/tutorial/calculator/calculator.003.py @@ -67,7 +67,7 @@ winLayout.addWidget(btn9, 3,2) # Just to show off I am using another way to attach it to the grid layout winLayout.addWidget(btn0:=ttk.TTkButton(border=True, text="0"), 4,0, 1,2) - # Define the 2 algebric buttons + # Define the 2 algebraic buttons winLayout.addWidget(btnAdd:=ttk.TTkButton(border=True, text="+"), 1,3) winLayout.addWidget(btnSub:=ttk.TTkButton(border=True, text="-"), 2,3) diff --git a/tutorial/calculator/calculator.004.py b/tutorial/calculator/calculator.004.py index 0b91dc58..6115eb14 100755 --- a/tutorial/calculator/calculator.004.py +++ b/tutorial/calculator/calculator.004.py @@ -68,7 +68,7 @@ winLayout.addWidget(btn9, 3,2) # Just to show off I am using another way to attach it to the grid layout winLayout.addWidget(btn0:=ttk.TTkButton(border=True, text="0"), 4,0, 1,2) - # Define the 2 algebric buttons + # Define the 2 algebraic buttons winLayout.addWidget(btnAdd:=ttk.TTkButton(border=True, text="+"), 1,3) winLayout.addWidget(btnSub:=ttk.TTkButton(border=True, text="-"), 2,3) diff --git a/tutorial/calculator/calculator.005.py b/tutorial/calculator/calculator.005.py index 1460d553..a9b5e98e 100755 --- a/tutorial/calculator/calculator.005.py +++ b/tutorial/calculator/calculator.005.py @@ -68,7 +68,7 @@ winLayout.addWidget(btn9, 3,2) # Just to show off I am using another way to attach it to the grid layout winLayout.addWidget(btn0:=ttk.TTkButton(border=True, text="0"), 4,0, 1,2) - # Define the 2 algebric buttons + # Define the 2 algebraic buttons winLayout.addWidget(btnAdd:=ttk.TTkButton(border=True, text="+"), 1,3) winLayout.addWidget(btnSub:=ttk.TTkButton(border=True, text="-"), 2,3) diff --git a/tutorial/layout/example2.simple.vbox.py b/tutorial/layout/example2.simple.vbox.py index c7e00b95..4092227d 100755 --- a/tutorial/layout/example2.simple.vbox.py +++ b/tutorial/layout/example2.simple.vbox.py @@ -24,7 +24,7 @@ import TermTk as ttk - # Set the VBoxLayout as defaut in the terminal widget + # Set the VBoxLayout as default in the terminal widget root = ttk.TTk(layout=ttk.TTkVBoxLayout()) # Attach 4 buttons to the root widget diff --git a/tutorial/layout/example3.simple.hbox.py b/tutorial/layout/example3.simple.hbox.py index 705d2d0a..e98092e3 100755 --- a/tutorial/layout/example3.simple.hbox.py +++ b/tutorial/layout/example3.simple.hbox.py @@ -24,7 +24,7 @@ import TermTk as ttk - # Set the HBoxLayout as defaut in the terminal widget + # Set the HBoxLayout as default in the terminal widget root = ttk.TTk() root.setLayout(ttk.TTkHBoxLayout()) diff --git a/tutorial/layout/example4.simple.grid.py b/tutorial/layout/example4.simple.grid.py index 58a67863..70787e4e 100755 --- a/tutorial/layout/example4.simple.grid.py +++ b/tutorial/layout/example4.simple.grid.py @@ -24,7 +24,7 @@ import TermTk as ttk - # Set the GridLayout as defaut in the terminal widget + # Set the GridLayout as default in the terminal widget gridLayout = ttk.TTkGridLayout(columnMinHeight=0,columnMinWidth=2) root = ttk.TTk(layout=gridLayout) diff --git a/tutorial/layout/example5.nested.layouts.py b/tutorial/layout/example5.nested.layouts.py index a7f5d555..267f8f0c 100755 --- a/tutorial/layout/example5.nested.layouts.py +++ b/tutorial/layout/example5.nested.layouts.py @@ -24,7 +24,7 @@ import TermTk as ttk - # Set the GridLayout as defaut in the terminal widget + # Set the GridLayout as default in the terminal widget root = ttk.TTk() gridLayout = ttk.TTkGridLayout() diff --git a/tutorial/layout/example6.grid.span.py b/tutorial/layout/example6.grid.span.py index 30553e36..0f58bd44 100755 --- a/tutorial/layout/example6.grid.span.py +++ b/tutorial/layout/example6.grid.span.py @@ -24,7 +24,7 @@ import TermTk as ttk - # Set the GridLayout as defaut in the terminal widget + # Set the GridLayout as default in the terminal widget root = ttk.TTk() gridLayout = ttk.TTkGridLayout()