0
0
mirror of https://github.com/python/cpython.git synced 2024-11-28 16:45:42 +01:00
Commit Graph

13 Commits

Author SHA1 Message Date
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
615a66a5ef (ChipViewer): Make frame sticky NSEW to fix geometry problem. 1998-11-18 03:15:19 +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
ddb9fc1ebd Added docstring 1998-10-02 15:58:50 +00:00
Barry Warsaw
65f0b6be47 Add a nice divider 1998-10-01 14:26:04 +00:00
Barry Warsaw
aa40b556fd Groove for debugging 1998-10-01 03:07:20 +00:00
Barry Warsaw
d7d4725dba Added an extra frame in widget heirarchy in case I want to add
separators later
1998-09-29 17:36:43 +00:00
Barry Warsaw
dc492e6738 Un PMW-ified 1998-09-29 15:44:20 +00:00
Barry Warsaw
31ac518dd7 Cosmetic 1998-03-10 00:16:09 +00:00
Barry Warsaw
37400e8943 Better dimensions 1998-02-11 18:54:23 +00:00
Barry Warsaw
b6db1b94c5 mered Greg's suggestions, added docstring 1998-01-30 21:11:52 +00:00
Barry Warsaw
7080a7f69e Initial revision 1998-01-29 23:48:55 +00:00