Commit Graph

42 Commits

Author SHA1 Message Date
Serhiy Storchaka 3d569fd6dc
bpo-42630: Improve error reporting in Tkinter for absent default root (GH-23781)
* 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.
2020-12-19 12:17:08 +02:00
Serhiy Storchaka 662db125cd
bpo-37685: Fixed __eq__, __lt__ etc implementations in some classes. (GH-14952)
They now return NotImplemented for unsupported type of the other operand.
2019-08-08 08:42:54 +03:00
Georg Brandl bf76ce168c Make the Pynche tool work with Python 3. 2010-08-02 22:08:58 +00:00
Martin v. Löwis 23b44a39ce Patch #812378: Normalize white space. 2003-10-24 20:09:23 +00:00
Barry Warsaw 8e4fa072f7 De-string-module-ification. 2001-07-10 21:44:24 +00:00
Barry Warsaw 6a5522677a Helpwin.__init__(): Removed an unused local variable (via import)
reported by PyChecker.
2001-04-18 03:50:07 +00:00
Barry Warsaw 17a8b5d473 make_view_popups(): Catch import error which can occur if a viewer is
dynamically imported when Pynche is running via askcolor out of a
package.  If the ImportError occurs, try again, prepending the package
name and digging out the module.
1999-07-06 22:00:52 +00:00
Barry Warsaw 3369927322 Use the much nicer tkFileDialog for loading color name database files
(thanks Fred!)
1999-04-27 19:51:55 +00:00
Barry Warsaw 9af697b85d Implement dynamic external Viewer discovery.
PyncheWidget.__init__(): Add the extrapath argument which can be used
to pass in additional directories to search for Viewers.
1999-04-27 18:55:48 +00:00
Barry Warsaw 6e7f6ea756 Put the 'File' menu on the menubar even when modal, so users can get
to the 'load palette' entry.   Just don't put the quit button on
there.
1999-04-26 23:36:47 +00:00
Barry Warsaw 0604d72318 Lots of changes to support loading alternative color name database.
You can switch database by just loading the new one; the list window
and nearest colors adapt to the new database.

Some reorganizing of code.  Also, the name of the database file is
stored in the ~/.pynche pickle.  If it can't be loaded, fallbacks are
used.
1999-04-26 23:17:16 +00:00
Barry Warsaw ecb1a65f63 Helpwin.__init__(): The text widget should get focus. 1999-03-26 16:11:40 +00:00
Barry Warsaw 6403991a9d A start on the TestModExp applet
"Author" => "Contact"
1998-12-15 01:02:51 +00:00
Barry Warsaw ce0bbd270b Added Helpwin -- help in a text widget 1998-12-03 19:50:24 +00:00
Barry Warsaw e882b8a92e Updating 1998-11-18 00:21:09 +00:00
Barry Warsaw d9e5214c26 beep => bell
deiconify(): New method
1998-10-22 18:46:28 +00:00
Barry Warsaw ca07ba00ac Many changes to support a second mode of operation. Pynche can now be
run either as a standalone application (by running pynche or
pynche.pyw), or as a modal dialog inside another application.  This
can be done by importing pyColorChooser and running askcolor().  The
API for this is the same as the tkColorChooser.askcolor() API, namely:

    When `Okay' is hit, askcolor() returns ((r, g, b), "name").  When
    `Cancel' is hit, askcolor() returns (None, None).

Note the following differences:

    1. pyColorChooser.askcolor() takes an optional keyword `master'
       which if set tells Pynche to run as a modal dialog.  `master'
       is a Tkinter parent window.  Without the `master' keyword
       Pynche runs standalone.

    2. in pyColorChooser.askcolor() will return a Tk/X11 color name as
       "name" if there is an exact match, otherwise it will return a
       color spec, e.g. "#rrggbb".  tkColorChooser can't return a
       color name.

There are also some UI differences when running standalone vs. modal.
When modal, there is no "File" menu, but instead there are "Okay" and
"Cancel" buttons.

The implementation of all this is a bit of a hack, but it seems to
work moderately well.  I'm not guaranteeing the pyColorChooser.Chooser
class has the same semantics as the tkColorChooser.Chooser class.
1998-10-22 03:25:59 +00:00
Barry Warsaw 8a09e1ccda Saving/Restoring state into ~/.pynche file 1998-10-20 20:45:46 +00:00
Barry Warsaw bac609a69e Updated about text 1998-10-07 03:40:29 +00:00
Barry Warsaw 0926deacd5 Moved the main pynche.py file to Main.py. Added minimal driver
scripts pynche.py and pynche.pyw for Unix and Windows startup
respectively.  Document the .pyw file in the README.
1998-10-07 03:36:58 +00:00
Barry Warsaw 3886e3aebb Copyright CNRI 1998-10-06 20:49:20 +00:00
Barry Warsaw e7f4a47bbf Better initial color choosing 1998-10-06 19:50:33 +00:00
Barry Warsaw 3836503acd Converted to newstyle menubars 1998-10-06 19:39:34 +00:00
Barry Warsaw ad3a67cc84 Added version number in the About window 1998-10-06 18:52:59 +00:00
Barry Warsaw 9044b8e5e3 Added details window 1998-10-05 21:14:46 +00:00
Barry Warsaw eb61fbdba8 Docstring 1998-10-02 16:06:27 +00:00
Barry Warsaw bd36d6eccd Added the ListViewer 1998-10-02 16:05:48 +00:00
Barry Warsaw 86daeb7909 Added View button and popup of text widget 1998-10-01 16:46:16 +00:00
Barry Warsaw b26743ac48 Make sure the menubar is stretched 1998-10-01 14:26:26 +00:00
Barry Warsaw 03e8a31eb3 Get rid of Edit menu 1998-10-01 03:06:04 +00:00
Barry Warsaw a9b45580a3 Removed old cruft, added raw about dialog 1998-09-29 20:03:53 +00:00
Barry Warsaw a69c1ba0aa De PMW-ify 1998-09-28 23:38:44 +00:00
Barry Warsaw abae22fa5e Get rid of Entrywidget 1998-03-16 23:35:11 +00:00
Barry Warsaw a114eb5bd3 Use the new PyncheOptions widget 1998-03-16 23:08:35 +00:00
Barry Warsaw f67575d69d Integrate with OptionsWindow... not sure it should be modal 1998-03-10 00:17:01 +00:00
Barry Warsaw 552ac1795a Added about dialog 1998-02-17 22:25:23 +00:00
Barry Warsaw 93737b2da8 Added method to set selected color to nearest.
Collapsed `Options' group into `Current Color' group

Set delegate of reds, greens, blues
1998-02-17 03:09:19 +00:00
Barry Warsaw 79a7879318 fixed the generators 1998-02-13 21:28:14 +00:00
Barry Warsaw 29fe4ddd20 Added color strip widgets 1998-02-12 19:52:31 +00:00
Barry Warsaw 55d3ffa3c2 new interface to find_byname() 1998-02-11 18:55:50 +00:00
Barry Warsaw a6f591ac6b Interface changes, delegate chaining, type in widget addition 1998-02-11 17:19:54 +00:00
Barry Warsaw fefbf79ea4 Initial revision 1998-01-31 23:39:01 +00:00