Commit Graph

173 Commits

Author SHA1 Message Date
Barry Warsaw
2720d380e9 update_yourself(): Removed unused local variable reported by
PyChecker.
2001-04-18 03:53:29 +00:00
Barry Warsaw
31c2dae39c __init__(): Removed unused local variable reported by PyChecker. 2001-04-18 03:52:54 +00:00
Barry Warsaw
741eae0b31 StripWidget.__init__(), update_yourself(): Removed some unused local
variables reported by PyChecker.

__togglegentype(): PyChecker accurately reported that the variable
__gentypevar was unused -- actually this whole method is currently
unused so comment it out.
2001-04-18 03:51:55 +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
cc8a60cdf6 Bump the version to 1.1 2001-04-18 03:49:00 +00:00
Barry Warsaw
6330b52327 There have been a few new Python releases <wink> in the 2 years since
this tool was last touched!  Update some of the introductory material
and bump the version to 1.1.
2001-04-18 03:48:41 +00:00
Barry Warsaw
1bbc048310 Special case around some of the nastier annoyances with the type-in
fields.  You can now backspace out the 0 in 0x0, and you can clear the
field when in decimal mode.  There are still some oddities about
typing into these fields, but it should be much less annoying.  The
real solution is to ditch the update-while-typing "feature".
2001-02-01 21:31:58 +00:00
Barry Warsaw
74a7ece9f3 Move the "from Tkinter import *" out of the method and into the module
scope (still inside the __name__=='__main__' guard).  Necessitated by
recent addition of nested scopes.
2001-02-01 20:52:08 +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
a853adc110 Document that for askcolor(), databasefile and wantspec can now be set
on every invocation, instead of just the first.
1999-04-27 18:57:00 +00:00
Barry Warsaw
80d83e38ab askcolor(): databasefile and wantspec can now be set on every
invocation, instead of just the first.
1999-04-27 18:56:35 +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
f3ebf90d2c Add a module global variable ADDTOVIEW to conform to dynamic viewer
lookup protocol.
1999-04-27 18:54:12 +00:00
Barry Warsaw
2095b2fe14 Added docstring describing Viewer interface.
set_colordb(): Call Viewers' colordb_changed() method if they have
them.  Notifies them of changes to the color name database.
1999-04-27 18:53:29 +00:00
Barry Warsaw
b61a28e240 add a comment 1999-04-27 18:43:47 +00:00
Barry Warsaw
7b2812211a When selecting a radio button in the TextViewer (to change a specific
text widget attribute), the color the attribute currently has is set
in the main widget.
1999-04-27 15:56:53 +00:00
Barry Warsaw
f5e98572e5 Change Black/White button labels to not include the arrow 1999-04-27 15:56:02 +00:00
Barry Warsaw
74109a149e Describe namedcolors.txt 1999-04-26 23:50:04 +00:00
Barry Warsaw
3e9c75d3f2 An alternative Netscape database 1999-04-26 23:49:23 +00:00
Barry Warsaw
a25223faf4 Describe how to load a new database 1999-04-26 23:48:17 +00:00
Barry Warsaw
821d8b73e8 Describe the Color database files 1999-04-26 23:46:25 +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
3f01c724fd Tim Peter's sister's 140 named colors that NS and MSIE understand
(with some controversy surrounding AliceBlue :-)
1999-04-26 23:27:38 +00:00
Barry Warsaw
a04988a8dd The "Web-safe" colors (all #rrggbb style) 1999-04-26 23:26:43 +00:00
Barry Warsaw
375b11635b The HTML 4.0 guaranteed colors. 1999-04-26 23:26:23 +00:00
Barry Warsaw
d515a7ea3d Set the version number to 1.0 -- I think it's stable enough 1999-04-26 23:18:07 +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
c2aadcd96a Added /usr/lib/X11/rgb.txt in front of X/rgb.txt for Linuxers 1999-04-23 16:24:00 +00:00
Guido van Rossum
dcb0a57874 Avoid totally empty files. 1999-04-10 14:00:28 +00:00
Barry Warsaw
ecb1a65f63 Helpwin.__init__(): The text widget should get focus. 1999-03-26 16:11:40 +00:00
Barry Warsaw
61ba0721db Removed unnecessary import `from PyncheWidget import PyncheWidget' 1999-03-26 15:59:51 +00:00
Barry Warsaw
ef30092207 Added most of the mechanism to change the strips from color variations
to color constants (i.e. red constant, green constant, blue
constant).  But I haven't hooked this up yet because the UI gets more
crowded and the arrows don't reflect the correct values.

Added "Go to Black" and "Go to White" buttons.
1998-12-15 01:04:38 +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
eb6b9b7ebb Untabification and other cruft 1998-12-03 19:49:45 +00:00
Barry Warsaw
d0e1e51385 docstring(): Function for returning __doc__ % globals() 1998-12-03 19:49:13 +00:00
Barry Warsaw
3fe1b14c96 A little more tweakage 1998-11-18 03:45:09 +00:00
Barry Warsaw
615a66a5ef (ChipViewer): Make frame sticky NSEW to fix geometry problem. 1998-11-18 03:15:19 +00:00
Barry Warsaw
93990de252 tweak version number 1998-11-18 03:09:18 +00:00
Barry Warsaw
e882b8a92e Updating 1998-11-18 00:21:09 +00:00
Barry Warsaw
cf1daad891 Brief update on the slightly changed API of pyColorChooser.askcolor().
Added a To Do list.
1998-10-22 19:00:38 +00:00
Barry Warsaw
2be858230a __init__(): Removed initialcolor keyword.
show(): added color keyword here so that the selected color can be
chosen on each invocation of askcolor().

Also fixed this class, and askcolor() so that the same Chooser
instance can be re-used instead of creating a new one on each
invocation of askcolor().

Added a module function save() which can be used to explicitly save
the option database in ~/.pynche.  This does not happen automatically
when used as a modal.
1998-10-22 18:51:22 +00:00
Barry Warsaw
f72d580d5e sticky should be NSEW to fix pixel weirdness at right edge 1998-10-22 18:48:45 +00:00
Barry Warsaw
4ab5ae2ad0 Error message goes to stderr
canceled() takes an optional flag so that the canceled flag can be
cleared.
1998-10-22 18:48:01 +00:00
Barry Warsaw
d9e5214c26 beep => bell
deiconify(): New method
1998-10-22 18:46:28 +00:00
Barry Warsaw
877d299292 Fixed running of standalone via command line. Also, only do save from
main() so that run-as-modal doesn't automatically save database.
1998-10-22 18:45:52 +00:00
Barry Warsaw
3dd1c39c80 Describe all the new features 1998-10-22 04:14:24 +00:00
Barry Warsaw
a20f6af862 Chooser.__init__(): Added `wantspec' keyword to conform exactly to
tkColorChooser.askcolor() interface (i.e. don't return a color name
even if there is an exact match).
1998-10-22 03:44:52 +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