Commit Graph

455 Commits

Author SHA1 Message Date
Serhiy Storchaka e3a9adba32
[3.8] bpo-42759: Fix equality comparison of Variable and Font in Tkinter (GH-23968) (GH-24026)
Objects which belong to different Tcl interpreters are now always
different, even if they have the same name.
(cherry picked from commit 1df56bc059)
2021-01-01 19:39:36 +02:00
Serhiy Storchaka fc6534f205
[3.8] Rename Tkinter tests for widget options (GH-23944) (GH-23946)
Every test for widget option starts now with "test_configure_"
to distinguish it from tests for widget commands.
(cherry picked from commit c1ae21c965)
2020-12-26 12:38:13 +02:00
Serhiy Storchaka 80c445cafb
[3.8] bpo-42630: Improve error reporting in Tkinter for absent default root (GH-23781) (GH-23854)
* Tkinter functions and constructors which need a default root window
  raise now RuntimeError with descriptive message instead of obscure
  AttributeError or NameError if it is not created yet or cannot
  be created automatically.

* Add tests for all functions which use default root window.

* Fix import in the pynche script.

(cherry picked from commit 3d569fd6dc)
2020-12-19 16:38:37 +02:00
Miss Islington (bot) 13d40c2a41
bpo-40219: Lowered ttk LabeledScale dummy (GH-21467)
(cherry picked from commit b9ced83cf4)

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
2020-12-15 12:02:03 -08:00
Miss Islington (bot) 12d2306a1d
bpo-42328: Skip some tests with themes vista and xpnative on Windows 7 (GH-23612)
(cherry picked from commit f3c3ea91a7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-12-03 01:07:13 -08:00
Miss Islington (bot) a5b0c17e0d
bpo-42142: Try to fix timeouts in ttk tests (GH-23474)
Instead of using wait_visibility() which waits event <VisibilityNotify> in dead loop
use update() which should proceed all queued events.
(cherry picked from commit 6cc2c419f6)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-11-30 00:42:56 -08:00
Miss Islington (bot) 8388a33307
bpo-42370: Check element before making mouse click in ttk tests (GH-23491)
(cherry picked from commit b0b428510c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-11-24 09:54:32 -08:00
Miss Islington (bot) ad49526c80
bpo-42328: Fix tkinter.ttk.Style.map(). (GH-23300)
The function accepts now the representation of the default state as
empty sequence (as returned by Style.map()).
The structure of the result is now the same on all platform
and does not depend on the value of wantobjects.
(cherry picked from commit dd844a2916)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-11-23 00:51:22 -08:00
Miss Skeleton (bot) f8ebb7b62e
bpo-41831: Restore str implementation of __str__ in tkinter.EventType (GH-22355)
(cherry picked from commit eb38c6b7aa)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-10-09 13:21:15 -07:00
Miss Skeleton (bot) 86938548d5
bpo-41831: Add tests for tkinter.Event.__repr__ (GH-22354)
(cherry picked from commit f25323a307)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-10-09 12:05:26 -07:00
Miss Skeleton (bot) 3d103e0695
bpo-41306: Allow scale value to not be rounded (GH-21715)
This fixes the test failure with Tk 6.8.10 which is caused by changes to how Tk rounds the `from`, `to` and `tickinterval` arguments. This PR uses `noconv` if the patchlevel is greater than or equal to 8.6.10 (credit to Serhiy for this idea as it is much simpler than what I previously proposed).

Going into more detail for those who want it, the Tk change was made in [commit 591f68c](591f68cb38) and means that the arguments listed above are rounded relative to the value of `from`. However, when rounding the `from` argument ([line 623](591f68cb38/generic/tkScale.cGH-L623)), it is rounded relative to itself (i.e. rounding `0`) and therefore the assigned value for `from` is always what is given (no matter what values of `from` and `resolution`).

Automerge-Triggered-By: @pablogsal
(cherry picked from commit aecf036738)

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
2020-10-08 09:14:33 -07:00
Miss Islington (bot) 6d372ef194
fix `EventType` bases
`StrEnum` does not exist in 3.8, so use original `(str, enum.Enum)` bases.
2020-09-22 11:30:47 -07:00
Miss Islington (bot) 104adedf64
bpo-41384: Raise TclError in tkinter.OptionMenu (GH-21601)
... when an unknown option is passed.  TypeError was being raised because a 2to3 fix was missing.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit f1d40f941a)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2020-07-26 22:14:49 -04:00
Miss Islington (bot) 636a850ed8
bpo-39152: add missing ttk.Scale.configure return value (GH-17815)
tkinter.ttk.Scale().configure([name]) now returns a configuration tuple for name
or a list thereof for all options. Based on patch Giovanni Lombardo.
(cherry picked from commit 5ea7bb25e3)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-01-05 09:07:30 -08:00
Terry Jan Reedy df647f3340
[3.8] bpo-39136: Fixed typos (GH-17720)
funtion -> function; configuraton -> configuration; defintitions -> definitions;
focusses -> focuses; necesarily -> necessarily; follwing -> following;
Excape -> Escape,

(cherry picked from commit 6c7bb38ff2)
2019-12-28 19:05:15 -05:00
Serhiy Storchaka d360346640
[3.8] bpo-38738: Fix formatting of True and False. (GH-17083) (GH-17125)
* "Return true/false" is replaced with "Return ``True``/``False``"
  if the function actually returns a bool.
* Fixed formatting of some True and False literals (now in monospace).
* Replaced "True/False" with "true/false" if it can be not only bool.
* Replaced some 1/0 with True/False if it corresponds the code.
* "Returns <bool>" is replaced with "Return <bool>".
(cherry picked from commit 138ccbb022)
2019-11-12 18:54:10 +02:00
Miss Islington (bot) dc191245d8
bpo-13153: Use OS native encoding for converting between Python and Tcl. (GH-16545)
On Windows use UTF-16 (or UTF-32 for 32-bit Tcl_UniChar) with the
"surrogatepass" error handler for converting to/from Tcl Unicode objects.

On Linux use UTF-8 with the "surrogateescape" error handler for converting
to/from Tcl String objects.

Converting strings from Tcl to Python and back now never fails
(except MemoryError).
(cherry picked from commit 06cb94bc84)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-10-04 03:28:54 -07:00
Miss Islington (bot) 4bd1d05ee2
Fix typos mostly in comments, docs and test names (GH-15209)
(cherry picked from commit 39d87b5471)

Co-authored-by: Min ho Kim <minho42@gmail.com>
2019-08-30 13:42:54 -07:00
Zackery Spytz 50866e9ed3 bpo-25451: Add transparency methods to tkinter.PhotoImage. (GH-10406) 2019-04-05 13:17:13 +03:00
Ned Deily aeca373b33
bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk (GH-12011) 2019-02-24 02:28:24 -05:00
Serhiy Storchaka 569d12f448
Fix yet one error in checking Tcl version. (GH-10189) 2018-10-28 20:58:04 +02:00
Serhiy Storchaka 18d57b4d62
Fix checking for bugfix Tcl version. (GH-10185) 2018-10-28 19:48:36 +02:00
Juliette Monsel 1deea5e539 bpo-34936: Fix TclError in tkinter.Spinbox.selection_element(). (GH-9760) 2018-10-18 22:28:31 +03:00
Juliette Monsel bf034715db bpo-23831: Add moveto method to the tkinter.Canvas widget. (GH-9768) 2018-10-12 19:44:10 +03:00
Serhiy Storchaka dc0d571b64
bpo-34964: Make Tkinter sources more readable by adding blank lines. (GH-9822) 2018-10-12 19:01:00 +03:00
Juliette Monsel af5658ae93 bpo-34829: Add missing selection_ methods to the Tkinter Spinbox. (GH-9617)
Implement the methods selection_from(), selection_range(), selection_present()
and selection_to() for Tkinter Spinbox.
2018-10-08 19:29:24 +03:00
Serhiy Storchaka c75c1e0e8a
bpo-34189: Fix checking for bugfix Tcl version. (GH-8397) 2018-07-22 21:41:48 +03:00
Serhiy Storchaka e271ca78e3
bpo-34189: Add simple tests for new Tk widget options. (GH-8396) 2018-07-22 19:50:14 +03:00
Serhiy Storchaka 5bb5bbfca8
bpo-33974: Fix passing special characters to ttk widgets. (GH-7986)
Fix passing lists and tuples of strings containing special characters
'"', '\\', '{', '}' and '\n' as options to tkinter.ttk widgets.
2018-06-30 09:20:28 +03:00
Andrés Delfino 4b685bf719 bpo-33283: Mention PNG as a supported format by Tcl/Tk. (GH-6479) 2018-04-17 08:34:35 +03:00
Garvit Khatri 3ab44c0783 bpo-33096: Fix ttk.Treeview.insert. (GH-6228)
Allow ttk.Treeview.insert to insert iid that has a false boolean value.
Note iid=0 and iid=False would be same.
2018-03-26 10:02:05 +03:00
Cheryl Sabella 74382a3f17 bpo-32857: Raise error when tkinter after_cancel() is called with None. (GH-5701) 2018-03-04 12:41:47 +02:00
Alan D Moore a48e78a0b7 bpo-32585: Add tkinter.ttk.Spinbox. (#5221) 2018-02-09 02:03:55 +02:00
Serhiy Storchaka 97f1ca1673
[3.8] bpo-31508: Remove support of arguments in tkinter.ttk.Treeview.selection. (GH-3651)
It was deprecated in 3.6.
2018-02-01 18:49:21 +02:00
Mike 53f7a7c281 bpo-32297: Few misspellings found in Python source code comments. (#4803)
* Fix multiple typos in code comments

* Add spacing in comments (test_logging.py, test_math.py)

* Fix spaces at the beginning of comments in test_logging.py
2017-12-14 13:04:53 +02:00
Serhiy Storchaka 2fad102354 bpo-27319, bpo-31508: Document deprecation in Treeview.selection(). (#3667)
Defer removing old behavior to 3.8.
Document new feature of selection_set() and friends.
2017-09-24 14:34:09 +03:00
Victor Stinner cd7e9c1b67 ttk: fix LabeledScale and OptionMenu destroy() method (#3025)
bpo-31135: Call the parent destroy() method even if the used
attribute doesn't exist.

The LabeledScale.destroy() method now also explicitly clears label
and scale attributes to help the garbage collector to destroy all
widgets.
2017-08-08 19:41:21 +02:00
csabella a568e52733 bpo-25684: ttk.OptionMenu radiobuttons weren't unique (#2276)
between instances of OptionMenu.
2017-07-31 12:30:09 +03:00
Serhiy Storchaka a92adf8f07 bpo-30310: Add a test for non-ascii font family. (#1567) (#1832) 2017-05-27 17:01:31 +03:00
Vijay Kumar 128641d17e Fix spelling mistakes in tkinter.py (#1716)
Ran the docstrings through spell checker, and fixed spelling issues.
2017-05-22 19:23:52 +03:00
Serhiy Storchaka bdf6b910f9 bpo-29776: Use decorator syntax for properties. (#585) 2017-03-19 08:40:32 +02:00
Terry Jan Reedy 0ba0defb00 Issue 28923: Remove editor artifacts from Tix.py, 2016-12-22 00:02:36 -05:00
Terry Jan Reedy c67983b829 Issue 28923: Remove editor artifacts from Tix.py. 2016-12-21 23:59:47 -05:00
Serhiy Storchaka 016a9acb26 Issue #27939: Fixed bugs in tkinter.ttk.LabeledScale and tkinter.Scale caused
by representing the scale as float value internally in Tk.  tkinter.IntVar
now works if float value is set to underlying Tk variable.
2016-10-30 18:52:02 +02:00
Serhiy Storchaka 32c0d3ada5 Issue #27939: Fixed bugs in tkinter.ttk.LabeledScale and tkinter.Scale caused
by representing the scale as float value internally in Tk.  tkinter.IntVar
now works if float value is set to underlying Tk variable.
2016-10-30 18:49:52 +02:00
Serhiy Storchaka b1f5287952 Issue #27025: Generated names for Tkinter widgets now start by the "!" prefix
for readability (was "`").
2016-10-25 09:43:48 +03:00
Serhiy Storchaka 407c8acd90 Issue #25464: Fixed HList.header_exists() in tkinter.tix module by addin
a workaround to Tix library bug.
2016-10-24 23:49:10 +03:00
Serhiy Storchaka 071dec2027 Issue #25464: Fixed HList.header_exists() in tkinter.tix module by addin
a workaround to Tix library bug.
2016-10-24 23:47:28 +03:00
Serhiy Storchaka 1aca3899fb Issue #27611: Fixed support of default root window in the tkinter.tix module.
Added the master parameter in the DisplayStyle constructor.
2016-09-25 16:52:13 +03:00
Serhiy Storchaka e6f0199c19 Issue #27611: Fixed support of default root window in the tkinter.tix module. 2016-09-25 16:46:10 +03:00