Commit Graph

197 Commits

Author SHA1 Message Date
Christian Heimes c5f05e45cf Patch #2167 from calvin: Remove unused imports 2008-02-23 17:40:11 +00:00
Georg Brandl 1ea8cb49ed #1726198: replace while 1: fp.readline() with file iteration. 2008-01-21 17:22:06 +00:00
Barry Warsaw 538561e466 Ported from 2.4 branch:
Patch by Ori Avtalion to fix a minor display glitch in the RightArrow.
2006-01-01 21:48:54 +00:00
Georg Brandl 7eb4b7d177 Fix all wrong instances of "it's". 2005-07-22 21:49:32 +00:00
Tim Peters 182b5aca27 Whitespace normalization, via reindent.py. 2004-07-18 06:16:08 +00:00
Martin v. Löwis 23b44a39ce Patch #812378: Normalize white space. 2003-10-24 20:09:23 +00:00
Barry Warsaw eb296d967b Fix for SF bug #780996, crash when no .pynche file exists and -d
option is not given.  If dbfile isn't given and can't be retrieved
from the optionsdb, just initialize it to the first element in
RGB_TXT.

Backport candidate.
2003-09-03 03:15:50 +00:00
Barry Warsaw 5c458052f0 FILETYPES: Newer XFree86 rgb.txt files use the key Xorg instead of
XConsortium.  Now we can recognize these files!
2002-10-21 14:25:24 +00:00
Barry Warsaw d9e0e1f422 Some fixes based on feedback from Hans Petter Langtangen.
build(): Fix the logic here for calculating fallbacks if the dbfile
isn't parseable.

main(): Fix the semantics for -d/--database; this should override any
database value found in the .pynche file.

Update some comments, and author contact info.

Bump to v1.4

Whitespace normalization.
2002-10-21 14:23:48 +00:00
Barry Warsaw 531e3932bf Fix a typo, update (only one) style improvement, whitespace
normalization.
2002-10-21 14:20:37 +00:00
Barry Warsaw e98e462dab Bump to version 1.3. Also document the new behavior of the chip widgets. 2001-08-23 16:15:21 +00:00
Barry Warsaw 924ea05e45 Bump to version 1.3 2001-08-23 16:15:02 +00:00
Barry Warsaw e47e97792a Implement some suggestions by Laura Creighton.
ChipWidget.__init__(): Added a message area just below the color
    name.  Both the message and name widgets are now FLAT, DISABLED
    Entry widgets instead of Labels.  This allows users to
    copy-n-paste the color names or color specs.  Also, the contents
    of both widgets are now driven by StringVars.

set_color(): This only sets the chip color; it does not set the name
    widgets.

set_name(): New method which only sets the name widget contents.

set_message(): New method which only sets the message widget contents.

ChipViewer.update_yourself(): Set the color, name, and message for
    each chip as follows: the first line always contains the color
    spec in #rrggbb format.  The second line will contain the color
    name, but slightly differently for each widget.  For the Selected
    widget, if the color exactly matches the Nearest color, the name
    is shown, otherwise the message field will be empty.  The name
    field of the Nearest widget will always contain the color name.
2001-08-23 16:14:45 +00:00
Barry Warsaw 780028e14c Change the way hex type-ins are displayed. The old way was way too
fragile.  Now the leading "0x" on hex numbers are displayed as labels
and the type-in entry fields just accept the hex digits.  Be sure to
strip off the "0x" string when displaying hex values too.

Also, de-string-module-ification, and other Python 2.x improvements.
2001-07-10 21:50:44 +00:00
Barry Warsaw ffa926d77e __init__(), save_views(): Catch ValueError along with IOError and
EOFError so any failures in unmarshalling are just ignored.  Use
print>> instead of sys.stderr.write().
2001-07-10 21:48:51 +00:00
Barry Warsaw 698c14936a Update a comment. 2001-07-10 21:45:27 +00:00
Barry Warsaw 179048fc5d __init__(): Use augmented assignments. 2001-07-10 21:44:59 +00:00
Barry Warsaw 8e4fa072f7 De-string-module-ification. 2001-07-10 21:44:24 +00:00
Barry Warsaw 60e1886e87 __version__: Bump to 1.2
De-string-module-ification.
2001-07-10 21:42:04 +00:00
Barry Warsaw 95cf9d9f4e __populate(): Use augmented assignments. 2001-07-10 21:39:41 +00:00
Barry Warsaw b4d8612f2b __delta(): Use augmented assignments. 2001-07-10 21:39:18 +00:00
Barry Warsaw 6c50ae0801 De-string-module-ification and other Python 2.x improvements. 2001-07-10 21:38:47 +00:00
Barry Warsaw 2803046992 Update a comment. 2001-07-10 21:37:28 +00:00
Barry Warsaw 3e481de337 Updated documentation, and bump the version number to 1.2. 2001-07-10 21:37:04 +00:00
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