Skip to content

Commit

Permalink
⁉️ Trim trailing whitespace *.md; *.rst
Browse files Browse the repository at this point in the history
⁉️  Not sure if the generated *.rst stuff is intended to have
whitespace or not, so seperating this from the other commits, so easy to
revert if necessary.
  • Loading branch information
Metallicow committed Jan 16, 2018
1 parent 1257f42 commit 936d722
Show file tree
Hide file tree
Showing 32 changed files with 416 additions and 416 deletions.
6 changes: 3 additions & 3 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- For bugs or other problems please provide the following details in addition to
your issue report, if applicable. See also https://wxpython.org/pages/how-to-submit-issue/
<!-- For bugs or other problems please provide the following details in addition to
your issue report, if applicable. See also https://wxpython.org/pages/how-to-submit-issue/
For issues about building on Linux, please read this page before reporting it here:
https://wxpython.org/blog/2017-08-17-builds-for-linux-with-pip/
-->
Expand Down
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- Be sure to set the issue number that this PR fixes or implements below, and give
a good description. If this PR is for a new feature or enhancement, then it's
okay to remove the "Fixes #..." below, but be sure to give an even better
a good description. If this PR is for a new feature or enhancement, then it's
okay to remove the "Fixes #..." below, but be sure to give an even better
description of the PR in that case.
See also https://wxpython.org/pages/contributor-guide/ -->

Fixes #NNNN
Expand Down
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Changes in this release include the following:
* Fixed wx.richtext.RichTextBuffer.GetExtWildcard to return a tuple of 2
values, as was done in Classic. (#594)

* Various fixes in UltimateListCtrl, HyperTreeList and CheckListCtrlMixin.
* Various fixes in UltimateListCtrl, HyperTreeList and CheckListCtrlMixin.
(#592, #349, #612)

* Fixes in TextEditMixin to ensure that the new value is passed in the
Expand Down
52 changes: 26 additions & 26 deletions docs/MigrationGuide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ available in Phoenix::



Static Methods
--------------
Static Methods
--------------

In the distant past when SWIG was generating wrapper code for C++ static
methods it would create a standalone function named ``ClassName_MethodName``
Expand All @@ -130,7 +130,7 @@ the problem simply change the underscore to a dot, for example you should
change this::

c = wx.SystemSettings_GetColour(wx.SYS_COLOUR_MENUTEXT)

to this::

c = wx.SystemSettings.GetColour(wx.SYS_COLOUR_MENUTEXT)
Expand Down Expand Up @@ -199,28 +199,28 @@ that is using the old names to use the new ones instead::
wx.NORMAL = wx.FONTWEIGHT_NORMAL
wx.LIGHT = wx.FONTWEIGHT_LIGHT
wx.BOLD = wx.FONTWEIGHT_BOLD

wx.NORMAL = wx.FONTSTYLE_NORMAL
wx.ITALIC = wx.FONTSTYLE_ITALIC
wx.SLANT = wx.FONTSTYLE_SLANT

wx.SOLID = wx.PENSTYLE_SOLID
wx.DOT = wx.PENSTYLE_DOT
wx.LONG_DASH = wx.PENSTYLE_LONG_DASH
wx.SHORT_DASH = wx.PENSTYLE_SHORT_DASH
wx.DOT_DASH = wx.PENSTYLE_DOT_DASH
wx.USER_DASH = wx.PENSTYLE_USER_DASH
wx.TRANSPARENT = wx.PENSTYLE_TRANSPARENT
wx.DOT = wx.PENSTYLE_DOT
wx.LONG_DASH = wx.PENSTYLE_LONG_DASH
wx.SHORT_DASH = wx.PENSTYLE_SHORT_DASH
wx.DOT_DASH = wx.PENSTYLE_DOT_DASH
wx.USER_DASH = wx.PENSTYLE_USER_DASH
wx.TRANSPARENT = wx.PENSTYLE_TRANSPARENT

wx.STIPPLE_MASK_OPAQUE = wx.BRUSHSTYLE_STIPPLE_MASK_OPAQUE
wx.STIPPLE_MASK = wx.BRUSHSTYLE_STIPPLE_MASK
wx.STIPPLE = wx.BRUSHSTYLE_STIPPLE
wx.BDIAGONAL_HATCH = wx.BRUSHSTYLE_BDIAGONAL_HATCH
wx.CROSSDIAG_HATCH = wx.BRUSHSTYLE_CROSSDIAG_HATCH
wx.FDIAGONAL_HATCH = wx.BRUSHSTYLE_FDIAGONAL_HATCH
wx.CROSS_HATCH = wx.BRUSHSTYLE_CROSS_HATCH
wx.HORIZONTAL_HATCH = wx.BRUSHSTYLE_HORIZONTAL_HATCH
wx.VERTICAL_HATCH = wx.BRUSHSTYLE_VERTICAL_HATCH
wx.STIPPLE_MASK_OPAQUE = wx.BRUSHSTYLE_STIPPLE_MASK_OPAQUE
wx.STIPPLE_MASK = wx.BRUSHSTYLE_STIPPLE_MASK
wx.STIPPLE = wx.BRUSHSTYLE_STIPPLE
wx.BDIAGONAL_HATCH = wx.BRUSHSTYLE_BDIAGONAL_HATCH
wx.CROSSDIAG_HATCH = wx.BRUSHSTYLE_CROSSDIAG_HATCH
wx.FDIAGONAL_HATCH = wx.BRUSHSTYLE_FDIAGONAL_HATCH
wx.CROSS_HATCH = wx.BRUSHSTYLE_CROSS_HATCH
wx.HORIZONTAL_HATCH = wx.BRUSHSTYLE_HORIZONTAL_HATCH
wx.VERTICAL_HATCH = wx.BRUSHSTYLE_VERTICAL_HATCH



Expand All @@ -238,9 +238,9 @@ or other conditional statement to see if it is safe to use, like this::

if someWindow:
someWindow.doSomething()



wx.PyAssertionError --> wx.wxAssertionError
-------------------------------------------

Expand Down Expand Up @@ -412,16 +412,16 @@ where the data object should fetch from or copy to a specific memory location.
wx.DataObjectSimple.__init__(self)
self.SetFormat(wx.DataFormat("my data format"))
self.myData = bytes(value)

def GetDataSize(self):
return len(self.myData)

def GetDataHere(self, buf):
# copy our local data value to buf
assert isinstance(buf, memoryview)
buf[:] = self.myData
return True

def SetData(self, buf):
# copy from buf to our local data value
assert isinstance(buf, memoryview)
Expand Down
26 changes: 13 additions & 13 deletions docs/sphinx/rest_substitutions/overviews/DocstringsGuidelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ these fields are recognized and formatted nicely:

* ``param``, ``parameter``, ``arg``, ``argument``, ``key``,
``keyword``: Description of a parameter.

* ``type``: Type of a parameter.

* ``raises``, ``raise``, ``except``, ``exception``: That (and when) a
specific exception is raised.

* ``var``, ``ivar``, ``cvar``: Description of a variable.

* ``returns``, ``return``: Description of the return value.
Expand Down Expand Up @@ -168,19 +168,19 @@ admonitions:
a severe limitation of a method, class or function. In the Phoenix
world, this may also indicate that a particular widget is not
supported under one or more platforms;

3. ``.. deprecated::`` : used to mark deprecated methods, classes or
functions;

4. ``.. availability::`` : normally employed to make the user
understand on which platform(s) a particular functionality is
supported/available;

5. ``.. seealso::`` or ``:see:`` : added primarily to facilitate the
browsing of the docs, this admonition should be employed every time
you think a user may be interested in seeing a related/similar
method or a function providing an alternative implementation;

6. ``.. todo::`` : used to mark incomplete methods/functions, or
simply as a remainder for the user and the developer that some more
functionality needs to be added.
Expand All @@ -196,7 +196,7 @@ this::
- The note contains all indented body elements
following.
- It includes this bullet list.


|
Expand Down Expand Up @@ -244,21 +244,21 @@ documentation, please follow these conventions:
2. At the very top of the snippet file (on the first line), put your
name, or your alias, or anything you use as internet name preceeded
by a double-hash, i.e.:

``##Andrea Gavana``


So that your source code looks more or less like this::

##Chris Barker
#!/usr/bin/env python
"""
A simple test of the GridBagSizer
http://wiki.wxpython.org/index.cgi/WriteItYourself
"""

# Whatever code here...
def SendSizeEvent(self):
def SendSizeEvent(self):
self.AdjustMySize()


Expand Down Expand Up @@ -293,7 +293,7 @@ especially on Linux/Mac platforms.
If you wish to contribute a screenshot of a widget to be included in
the documentation, please follow these conventions:

- If the widget is a class belonging to the main `wx` namespace,
- If the widget is a class belonging to the main `wx` namespace,
use the full class name in lower case (i.e., `wx.Frame` ==>
`wx.frame.png`);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ using :meth:`wx.DC.Blit`(), or to be used as a drawing surface.
.. seealso:: :ref:`wx.MemoryDC` for an example of drawing onto a bitmap.


All wxPython platforms support XPMs for small bitmaps and icons.
All wxPython platforms support XPMs for small bitmaps and icons.



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Introduction
------------

A book control is a convenient way of displaying multiple pages of information, displayed one page at a time.
A book control is a convenient way of displaying multiple pages of information, displayed one page at a time.
wxPython has five variants of this control:

- :ref:`wx.Choicebook`: controlled by a :ref:`wx.Choice`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ By calling :meth:`wx.FileHistory.UseMenu` you can associate a file
menu with the file history. The menu will then be used for appending
filenames that are added to the history.

.. note::
.. note::

Please notice that currently if the history already contained
filenames when UseMenu() is called (e.g. when initializing a second
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ background of a window::

data = wx.ColourData()
data.SetChooseFull(True)

for i in xrange(16):
colour = wx.Colour(i*16, i*16, i*16)
data.SetCustomColour(i, colour)
Expand Down Expand Up @@ -186,14 +186,14 @@ The wildcard may be a specification for multiple types of file with a
description for each, such as::

wildcard = "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"



.. _dirdialog overview:

DirDialog Overview
-------------------


This dialog shows a directory selector dialog, allowing the user to
select a single directory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ Here is what can be done:
:ref:`wx.DateTime` resulting in a new :ref:`wx.DateTime` object and also 2
objects of the same span class can be added together giving another
object of the same class.

* **Subtraction**: the same types of operations as above are allowed
and, additionally, a difference between two :ref:`wx.DateTime` objects
can be taken and this will yield :ref:`wx.TimeSpan`.

* **Multiplication**: a :ref:`wx.TimeSpan` or :ref:`wx.DateSpan` object can
be multiplied by an integer number resulting in an object of the
same type.
Expand Down
8 changes: 4 additions & 4 deletions docs/sphinx/rest_substitutions/overviews/dialog_overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ bottom of the dialog. This is done as follows, in
new :ref:`wx.ScrolledWindow` object, using the old top-level sizer for
the scrolled window and creating a new top-level sizer to lay out
the scrolled window and standard button sizer.


.. _layout adaptation code:

Customising scrolling adaptation
Expand Down Expand Up @@ -134,8 +134,8 @@ not fool-proof, and may fail in the following situations:
- The dialog makes assumptions about the sizer hierarchy, for example
to show or hide children of the top-level sizer. However, the
original sizer hierarchy will still hold until `Show` or `ShowModal`
is called.
is called.

You can help make sure that your dialogs will continue to function
after adaptation by:

Expand Down
34 changes: 17 additions & 17 deletions docs/sphinx/rest_substitutions/overviews/dnd_overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ by the user elsewhere, you should implement the following steps:
initialized with the data you wish to drag. For example::

my_data = wx.TextDataObject("This text will be dragged.")



- **Drag start**: To start the dragging process (typically in response
to a mouse click) you must call :meth:`wx.DropSource.DoDragDrop` like
this::

dragSource = wx.DropSource(self)
dragSource.SetData(my_data)
result = dragSource.DoDragDrop(True)



- **Dragging**: The call to `DoDragDrop()` blocks the program until
the user releases the mouse button (unless you override the
:meth:`wx.DropSource.GiveFeedback` function to do something
Expand All @@ -42,23 +42,23 @@ by the user elsewhere, you should implement the following steps:
Windows or any program supporting the XDnD protocol under X
Windows), the corresponding :ref:`wx.DropTarget` methods are called -
see below.

- **Processing the result**: `DoDragDrop()` returns an effect code
which is one of the values of :ref:`wx.DragResult`::

if result == wx.DragCopy:
# Copy the data
CopyMyData()

elif result == wx.DragMove:
# Move the data
MoveMyData()

else:
# Default, do nothing
pass
pass


To be a `drop` target, i.e. to receive the data dropped by the user
you should follow the instructions below:

Expand All @@ -70,7 +70,7 @@ you should follow the instructions below:
methods. Alternatively, you may derive from :ref:`wx.TextDropTarget`
or :ref:`wx.FileDropTarget` and override their `OnDropText()` or
`OnDropFiles()` method.

- **Drop**: When the user releases the mouse over a window, wxPython
asks the associated :ref:`wx.DropTarget` object if it accepts the
data. For this, a :ref:`wx.DataObject` must be associated with the
Expand All @@ -79,11 +79,11 @@ you should follow the instructions below:
well, then :meth:`wx.DropTarget.OnData` will get called and the
:ref:`wx.DataObject` belonging to the drop target can get filled
with data.

- **The end**: After processing the data, `DoDragDrop()` returns
either ``wx.DragCopy`` or ``wx.DragMove`` depending on the state of
the keys ``Ctrl``, ``Shift`` and ``Alt`` at the moment of the
drop. There is currently no way for the drop target to change this
return code.


Loading

0 comments on commit 936d722

Please sign in to comment.