[Python-checkins] r63204 - in sandbox/trunk/ttk-gsoc: Doc/library/ttk.rst Lib/lib-tk/Ttk.py Lib/tkinter/ttk.py README

guilherme.polo python-checkins at python.org
Tue May 13 15:36:51 CEST 2008


Author: guilherme.polo
Date: Tue May 13 15:36:50 2008
New Revision: 63204

Log:
Corrected some typos;
Updated README so it matches current state of docs.


Modified:
   sandbox/trunk/ttk-gsoc/Doc/library/ttk.rst
   sandbox/trunk/ttk-gsoc/Lib/lib-tk/Ttk.py
   sandbox/trunk/ttk-gsoc/Lib/tkinter/ttk.py
   sandbox/trunk/ttk-gsoc/README

Modified: sandbox/trunk/ttk-gsoc/Doc/library/ttk.rst
==============================================================================
--- sandbox/trunk/ttk-gsoc/Doc/library/ttk.rst	(original)
+++ sandbox/trunk/ttk-gsoc/Doc/library/ttk.rst	Tue May 13 15:36:50 2008
@@ -12,7 +12,7 @@
 has been introduced in Tk 8.5. If you do not have Python compiled against
 Tk 8.5 you may still use this module as long as you have Tile installed and
 you will also miss other features of the new Tk, like anti-aliased font
-rendering under X11, window transparency (on X11 you will need a compositing 
+rendering under X11, window transparency (on X11 you will need a composition
 window manager), and others.
 
 The basic idea of :mod:`Ttk` is to separate, to the extent possible, the code 
@@ -65,7 +65,7 @@
 :class:`Sizegrip` and :class:`Treeview`. And all them are subclasses of 
 :class:`Widget`.
 
-Like it was told before, you will notice look & feel changes aswell changes
+Like it was told before, you will notice look & feel changes as well changes
 in the styling code. To demonstrate the latter, a simple example follows.
 
 Tk code::
@@ -95,7 +95,7 @@
 Standard Options
 ^^^^^^^^^^^^^^^^
 
-:class:`Ttk.Widget` accepts the following options, aswell all the other Ttk
+:class:`Ttk.Widget` accepts the following options, as well all the other Ttk
 widgets:
 
    +-----------+--------------------------------------------------------------+
@@ -108,10 +108,10 @@
    |           | which may only be specified when the window is created       |
    +-----------+--------------------------------------------------------------+
    | cursor    | Specifies the mouse cursor to be used for the widget. If set |
-   |           | to the emptry string (the default), the cursor is inherited  |
+   |           | to the empty string (the default), the cursor is inherited   |
    |           | for the parent widget.                                       |
    +-----------+--------------------------------------------------------------+
-   | takefocus | Determines wheter the window accepts the focus during        |
+   | takefocus | Determines whether the window accepts the focus during       |
    |           | keyboard traversal. 0, 1 or an empty is return. If 0 is      |
    |           | returned, it means that the window should be skipped entirely|
    |           | during keyboard traversal. If 1, it means that the window    |
@@ -175,7 +175,7 @@
    |              | * none: the default. display the image if present,        |
    |              |   otherwise the text.                                     |
    +--------------+-----------------------------------------------------------+
-   | width        | If greather than zero, specifies how much space, in       |
+   | width        | If greater than zero, specifies how much space, in        |
    |              | character widths, to allocate for the text label, if less |
    |              | than zero, specifies a minimum width. If zero or          |
    |              | unspecified, the natural width of the text label is used. |
@@ -203,7 +203,7 @@
    | flag       | description                                                 |
    +============+=============================================================+
    | active     | The mouse cursor is over the widget and pressing a mouse    |
-   |            | button will cause soem action to occur                      |
+   |            | button will cause some action to occur                      |
    +------------+-------------------------------------------------------------+
    | disabled   | Widget is disabled under program control                    |
    +------------+-------------------------------------------------------------+
@@ -219,7 +219,7 @@
    |            | background window, and cleared for those in the foreground  |
    |            | window                                                      |
    +------------+-------------------------------------------------------------+
-   | readonly   | Widget should not allow user mofidication                   |
+   | readonly   | Widget should not allow user modification                   |
    +------------+-------------------------------------------------------------+
    | alternate  | A widget-specific alternate display format                  |
    +------------+-------------------------------------------------------------+
@@ -394,7 +394,7 @@
    +-----------+--------------------------------------------------------------+
    | sticky    | Specifies how the child window is positioned within the pane |
    |           | area. Value is a string containing zero or more of the       |
-   |           | characteres "n", "s", "e" or "w". Each letter refers to a    |
+   |           | characters "n", "s", "e" or "w". Each letter refers to a     |
    |           | side (north, south, east or west) that the child window will |
    |           | stick to, as per the :meth:`grid` geometry manager.          |
    +-----------+--------------------------------------------------------------+
@@ -428,7 +428,7 @@
 * The name of a child window
 * A positional specification of the form "@x,y", which identifies the tab
 * The literal string "current", which identifies the currently-selected tab
-* The literal string "end", which returns the numer of tabs (only valid for
+* The literal string "end", which returns the number of tabs (only valid for
   :meth:`Notebook.index`)
 
 
@@ -487,7 +487,7 @@
 
       *pos* is either the string end, an integer index, or the name of a 
       managed child. If *child* is already managed by the notebook, moves it to 
-      the specified positon.
+      the specified position.
 
       See `Tab Options`_ for the list of available options.
 
@@ -558,20 +558,20 @@
    +----------+---------------------------------------------------------------+
    | mode     | One of "determinate" or "indeterminate".                      |
    +----------+---------------------------------------------------------------+
-   | maximum  | A number specifying the maxium value. Defaults to 100.        |
+   | maximum  | A number specifying the maximum value. Defaults to 100.       |
    +----------+---------------------------------------------------------------+
    | value    | The current value of the progress bar. In "determinate" mode, |
-   |          | this represents the amount of work completed. In "inderminate"|
-   |          | mode, it is interpreted as modulo maximum; that is, the       |
-   |          | progress bar completes one "cycle" when its value increases by|
-   |          | maximum.                                                      |
+   |          | this represents the amount of work completed. In              |
+   |          | "indeterminate" mode, it is interpreted as modulo maximum;    |
+   |          | that is, the progress bar completes one "cycle" when its value|
+   |          | increases by maximum.                                         |
    +----------+---------------------------------------------------------------+
    | variable | A name which is linked to the option value. If specified, the |
    |          | value of the progressbar is automatically set to the value of |
    |          | this name whenever the latter is modified.                    |
    +----------+---------------------------------------------------------------+
-   | pahse    | Read-only option. The widget periodically increments the value|
-   |          | of this option whever its value is greater than 0 and, in     |
+   | phase    | Read-only option. The widget periodically increments the value|
+   |          | of this option whenever its value is greater than 0 and, in   |
    |          | determinate mode, less than maximum. This option may be used  |
    |          | by the current theme to provide additional animation effects. |
    +----------+---------------------------------------------------------------+
@@ -743,7 +743,7 @@
    |        | remaining values are assumed empty. If there are more values  |
    |        | than columns, the extra values are ignored.                   |
    +--------+---------------------------------------------------------------+
-   | open   | True/False value indicating wheter the item's children should |
+   | open   | True/False value indicating whether the item's children should|
    |        | be displayed or hidden.                                       |
    +--------+---------------------------------------------------------------+
    | tags   | A list of tags associated with this item.                     |
@@ -826,7 +826,7 @@
       
       If *column* is specified, returns the bounding box of that cell. If the 
       *item* is not visible (i.e., if it is a descendant of a closed item or is 
-      scrolled offscren), returns an empty string.
+      scrolled offscreen), returns an empty string.
 
 
    .. method:: get_children(item)
@@ -988,7 +988,7 @@
       Ensure that *item* is visible.
               
       Sets all of *item*'s ancestors open option to True, and scrolls the 
-      widget if necessarry so that *item* is within the visible portion of 
+      widget if necessary so that *item* is within the visible portion of 
       the tree.
 
 
@@ -1061,7 +1061,7 @@
 Ttk Styling
 -----------
 
-Each widget is assigned a style, which especifies the set of elements making
+Each widget is assigned a style, which specifies the set of elements making
 up the widget and how they are arranged, along with dynamic and default
 settings for element options. By default the style name is the same as
 the widget's class prefixed by a "T" (except the root style that is "." and
@@ -1201,7 +1201,7 @@
       But if "from" is used, then :meth:`element_create` will clone an existing
       element. *args* is expected to contain a themename, which is from where
       the element will be cloned, and optionally an element to clone from.
-      If this element to clone from is not especified, an empty element will
+      If this element to clone from is not specified, an empty element will
       be used. *kw* is discarded here.
 
    

Modified: sandbox/trunk/ttk-gsoc/Lib/lib-tk/Ttk.py
==============================================================================
--- sandbox/trunk/ttk-gsoc/Lib/lib-tk/Ttk.py	(original)
+++ sandbox/trunk/ttk-gsoc/Lib/lib-tk/Ttk.py	Tue May 13 15:36:50 2008
@@ -35,7 +35,7 @@
         loadtk(self)
         if REQUIRE_TILE: 
             # XXX Maybe I should catch a possible TclError and display 
-            #     a Warning telling Ttk won't be available ? Or maye I 
+            #     a Warning telling Ttk won't be available ? Or maybe I 
             #     shouldn't be doing this at all, the users could then 
             #     write the next line
             self.tk.eval('package require tile')
@@ -85,7 +85,7 @@
 
         opt_val = []
         # each value in mapdict is expected to be a sequence, where each item
-        # is another sequence containg a state (or several) and a value for it
+        # is another sequence containing a state (or several) and a value for it
         for state, val in value:
             if not isinstance(state, basestring):
                 # lets believe it is a sequence and group these multiple states
@@ -717,7 +717,7 @@
                 * The string "current", which identifies the 
                   currently-selected tab
                 * The string "end", which returns the number of tabs (only
-                  valis for method index)
+                  valid for method index)
         """
         Widget.__init__(self, master, "ttk::notebook", cnf, kw)
 
@@ -762,7 +762,7 @@
 
         pos is either the string end, an integer index, or the name of
         a managed child. If child is already managed by the notebook, 
-        moves it to the specified positon."""
+        moves it to the specified position."""
         self.tk.call(self._w, "insert", pos, child, *(_format_optdict(kw)))
 
 
@@ -803,7 +803,7 @@
             Shift-Control-Tab: selects the tab preceding the currently
                                selected one
 
-            Alt-K: where K is the mnemomic (underlined) character of any
+            Alt-K: where K is the mnemonic (underlined) character of any
                    tab, will select that tab.
 
         Multiple notebooks in a single toplevel may be enabled for
@@ -842,11 +842,11 @@
 
 
     def insert(self, pos, child, **kw):
-        """Inserts a pane at the especified positions.
+        """Inserts a pane at the specified positions.
 
         pos is either the string end, and integer index, or the name
         of a child. If child is already managed by the paned window,
-        moves it to the especified position."""
+        moves it to the specified position."""
         self.tk.call(self._w, "insert", pos, child, *(_format_optdict(kw)))
 
 
@@ -1028,7 +1028,7 @@
         
         If column is specified, returns the bounding box of that cell.
         If the item is not visible (i.e., if it is a descendant of a 
-        closed item or is scrolled offscren), returns an empty string."""
+        closed item or is scrolled offscreen), returns an empty string."""
         return self.tk.call(self._w, "bbox", item, column)
 
 
@@ -1199,7 +1199,7 @@
         """Ensure that item is visible.
         
         Sets all of item's ancestors open option to True, and scrolls 
-        the widget if necessarry so that item is within the visible 
+        the widget if necessary so that item is within the visible 
         portion of the tree."""
         self.tk.call(self._w, "see", item)
 

Modified: sandbox/trunk/ttk-gsoc/Lib/tkinter/ttk.py
==============================================================================
--- sandbox/trunk/ttk-gsoc/Lib/tkinter/ttk.py	(original)
+++ sandbox/trunk/ttk-gsoc/Lib/tkinter/ttk.py	Tue May 13 15:36:50 2008
@@ -35,7 +35,7 @@
         loadtk(self)
         if REQUIRE_TILE: 
             # XXX Maybe I should catch a possible TclError and display 
-            #     a Warning telling Ttk won't be available ? Or maye I 
+            #     a Warning telling Ttk won't be available ? Or maybe I 
             #     shouldn't be doing this at all, the users could then 
             #     write the next line
             self.tk.eval('package require tile')
@@ -85,7 +85,7 @@
 
         opt_val = []
         # each value in mapdict is expected to be a sequence, where each item
-        # is another sequence containg a state (or several) and a value for it
+        # is another sequence containing a state (or several) and a value for it
         for state, val in value:
             if not isinstance(state, str):
                 # lets believe it is a sequence and group these multiple states
@@ -717,7 +717,7 @@
                 * The string "current", which identifies the 
                   currently-selected tab
                 * The string "end", which returns the number of tabs (only
-                  valis for method index)
+                  valid for method index)
         """
         Widget.__init__(self, master, "ttk::notebook", cnf, kw)
 
@@ -762,7 +762,7 @@
 
         pos is either the string end, an integer index, or the name of
         a managed child. If child is already managed by the notebook, 
-        moves it to the specified positon."""
+        moves it to the specified position."""
         self.tk.call(self._w, "insert", pos, child, *(_format_optdict(kw)))
 
 
@@ -803,7 +803,7 @@
             Shift-Control-Tab: selects the tab preceding the currently
                                selected one
 
-            Alt-K: where K is the mnemomic (underlined) character of any
+            Alt-K: where K is the mnemonic (underlined) character of any
                    tab, will select that tab.
 
         Multiple notebooks in a single toplevel may be enabled for
@@ -842,11 +842,11 @@
 
 
     def insert(self, pos, child, **kw):
-        """Inserts a pane at the especified positions.
+        """Inserts a pane at the specified positions.
 
         pos is either the string end, and integer index, or the name
         of a child. If child is already managed by the paned window,
-        moves it to the especified position."""
+        moves it to the specified position."""
         self.tk.call(self._w, "insert", pos, child, *(_format_optdict(kw)))
 
 
@@ -1028,7 +1028,7 @@
         
         If column is specified, returns the bounding box of that cell.
         If the item is not visible (i.e., if it is a descendant of a 
-        closed item or is scrolled offscren), returns an empty string."""
+        closed item or is scrolled offscreen), returns an empty string."""
         return self.tk.call(self._w, "bbox", item, column)
 
 
@@ -1199,7 +1199,7 @@
         """Ensure that item is visible.
         
         Sets all of item's ancestors open option to True, and scrolls 
-        the widget if necessarry so that item is within the visible 
+        the widget if necessary so that item is within the visible 
         portion of the tree."""
         self.tk.call(self._w, "see", item)
 

Modified: sandbox/trunk/ttk-gsoc/README
==============================================================================
--- sandbox/trunk/ttk-gsoc/README	(original)
+++ sandbox/trunk/ttk-gsoc/README	Tue May 13 15:36:50 2008
@@ -19,23 +19,22 @@
 Reading the Documentation
 =========================
 
-There are just a ttk.rst and two .diffs at Doc/library and while you
-could read the ttk.rst with any editor you will probably want to read
-it nicely formatted as html.
+There are just ttk.rst and tk.rst.diff files at Doc/library and while you
+could read the ttk.rst with any editor you will probably want to read it 
+nicely formatted as html.
 To generate this html, you will have to checkout the python trunk 
 repository (the one I tested with the docs):
 
    $ svn co http://svn.python.org/projects/python/trunk python-trunk
 
-And then apply both .diffs using patch -p0 < file.diff. Note that
-these diffs aren't really necessary, so you may skip this. Next you
-have to place ttk-gsoc/Doc/library/ttk.rst in python-trunk/Doc/library
+And then, optionally, apply tk.rst.diff using patch -p0 < file.diff. Next 
+you have to place ttk-gsoc/Doc/library/ttk.rst in python-trunk/Doc/library
 and then cd into python-trunk/Doc/library and do:
 
    $ make html
 
-After it completes, you can use your browser to read the Ttk documentation
-(incomplete for now). The path to the ttk.html will be something like 
+After it completes, you can use your browser to read the Ttk documentation. 
+The path to the ttk.html will be something like:
 file:///SOMEPATH/python-trunk/Doc/build/html/library/ttk.html
 
 


More information about the Python-checkins mailing list