Revision: 4647
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4647&view=rev
Author:   dsdale
Date:     2007-12-06 09:47:46 -0800 (Thu, 06 Dec 2007)

Log Message:
-----------
fixed a bug in rcsetup, see bug 1845057

Modified Paths:
--------------
    trunk/matplotlib/CHANGELOG
    trunk/matplotlib/lib/matplotlib/__init__.py
    trunk/matplotlib/lib/matplotlib/rcsetup.py

Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG  2007-12-06 17:09:53 UTC (rev 4646)
+++ trunk/matplotlib/CHANGELOG  2007-12-06 17:47:46 UTC (rev 4647)
@@ -1,3 +1,5 @@
+2007-12-06 fixed a bug in rcsetup, see bug 1845057 - DSD
+
 ===============================================================
 2007-11-27 Released 0.91.1 at revision 4517
 

Modified: trunk/matplotlib/lib/matplotlib/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/__init__.py 2007-12-06 17:09:53 UTC (rev 
4646)
+++ trunk/matplotlib/lib/matplotlib/__init__.py 2007-12-06 17:47:46 UTC (rev 
4647)
@@ -615,6 +615,15 @@
     if ret['datapath'] is None:
         ret['datapath'] = get_data_path()
 
+    if not ret['text.latex.preamble'] == ['']:
+        verbose.report("""
+*****************************************************************
+You have the following UNSUPPORTED LaTeX preamble customizations:
+%s
+Please do not ask for support with these customizations active.
+*****************************************************************
+"""% '\n'.join(ret['text.latex.preamble']), 'helpful')
+
     verbose.report('loaded rc file %s'%fname)
 
     return ret

Modified: trunk/matplotlib/lib/matplotlib/rcsetup.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/rcsetup.py  2007-12-06 17:09:53 UTC (rev 
4646)
+++ trunk/matplotlib/lib/matplotlib/rcsetup.py  2007-12-06 17:47:46 UTC (rev 
4647)
@@ -143,7 +143,7 @@
 
     if len(s)==6 and s.isalnum(): # looks like hex
         return '#' + s
-    
+
     if len(s)==7 and s.startswith('#') and s[1:].isalnum():
         return s
 
@@ -165,21 +165,6 @@
     'landscape', 'portrait',
     ])
 
-def validate_latex_preamble(s):
-    'return a list'
-    preamble_list = validate_stringlist(s)
-    if not preamble_list == ['']:
-        verbose.report("""
-*****************************************************************
-You have the following UNSUPPORTED LaTeX preamble customizations:
-%s
-Please do not ask for support with these customizations active.
-*****************************************************************
-"""% '\n'.join(preamble_list), 'helpful')
-    return preamble_list
-
-
-
 def validate_aspect(s):
     if s in ('auto', 'equal'):
         return s
@@ -198,7 +183,7 @@
         return float(s)
     except ValueError:
         raise ValueError('not a valid font size')
-    
+
 def validate_font_properties(s):
     parse_fontconfig_pattern(s)
     return s
@@ -353,7 +338,7 @@
     'text.color'          : ['k', validate_color],     # black
     'text.usetex'         : [False, validate_bool],
     'text.latex.unicode'  : [False, validate_bool],
-    'text.latex.preamble' : [[''], validate_latex_preamble],
+    'text.latex.preamble' : [[''], validate_stringlist],
     'text.dvipnghack'     : [False, validate_bool],
     'text.fontstyle'      : ['normal', str],
     'text.fontangle'      : ['normal', str],
@@ -369,7 +354,7 @@
     'mathtext.sf'         : ['sans\-serif', validate_font_properties],
     'mathtext.fontset'    : ['cm', validate_fontset],
     'mathtext.fallback_to_cm' : [True, validate_bool],
-    
+
     'image.aspect'        : ['equal', validate_aspect],  # equal, auto, a 
number
     'image.interpolation' : ['bilinear', str],
     'image.cmap'          : ['jet', str],        # one of gray, jet, etc


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to