mailr20650 - in /trunk: docs/latex/fetch_docstrings.py graphics/__init__.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on August 20, 2013 - 21:58:
Author: bugman
Date: Tue Aug 20 21:58:00 2013
New Revision: 20650

URL: http://svn.gna.org/viewcvs/relax?rev=20650&view=rev
Log:
The fetch_docstrings.py script now asks for the Unix '/' separator through 
graphics.fetch_icon().

This is a final fix for bug 21042 (https://gna.org/bugs/?21042).

The graphics.fetch_icon() function now accepts the 'sep' argument.  This 
defaults to os.sep.  But 
the docs/latex/fetch_docstrings.py script uses the Unix '/' separator to 
obtain a LaTeX correct path
on MS Windows.


Modified:
    trunk/docs/latex/fetch_docstrings.py
    trunk/graphics/__init__.py

Modified: trunk/docs/latex/fetch_docstrings.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/docs/latex/fetch_docstrings.py?rev=20650&r1=20649&r2=20650&view=diff
==============================================================================
--- trunk/docs/latex/fetch_docstrings.py (original)
+++ trunk/docs/latex/fetch_docstrings.py Tue Aug 20 21:58:00 2013
@@ -258,14 +258,14 @@
 
         # Add the user function class icon.
         if self.uf_class:
-            icon = fetch_icon(self.uf_class.gui_icon, size='128x128', 
format=None, full_path=False)
+            icon = fetch_icon(self.uf_class.gui_icon, size='128x128', 
format=None, sep='/', full_path=False)
             if icon:
                 self.file.write("\includegraphics[bb=0 0 18 18]{%s} \hfill " 
% icon)
             else:
                 self.file.write("\hfill ")
 
         # Add the user function icon.
-        icon = fetch_icon(self.uf.gui_icon, size='128x128', format=None, 
full_path=False)
+        icon = fetch_icon(self.uf.gui_icon, size='128x128', format=None, 
sep='/', full_path=False)
         if icon:
             self.file.write("\includegraphics[bb=0 0 18 18]{%s}\n" % icon)
         else:

Modified: trunk/graphics/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/graphics/__init__.py?rev=20650&r1=20649&r2=20650&view=diff
==============================================================================
--- trunk/graphics/__init__.py (original)
+++ trunk/graphics/__init__.py Tue Aug 20 21:58:00 2013
@@ -35,7 +35,7 @@
 WIZARD_IMAGE_PATH = status.install_path + sep + 'graphics' + sep + 'wizards' 
+ sep
 
 
-def fetch_icon(icon=None, size='16x16', format='png', full_path=True):
+def fetch_icon(icon=None, size='16x16', format='png', sep=sep, 
full_path=True):
     """Return the path to the specified icon.
 
     The icon code consists of two parts separated by the '.' character.  
These are:
@@ -51,6 +51,8 @@
     @type size:         str
     @keyword format:    The format of the icon, defaulting to PNG images.  
This can be changed to 'eps.gz' for example, or None for no file ending.
     @type format:       str
+    @keyword sep:       The path separator.  This allows a different path to 
the default operating system path to be used.
+    @type sep:          str
     @keyword full_path: A flag which if True will cause the absolute path to 
be returned.  If False, the relative path will be returned.
     @type full_path:    bool
     @return:            The icon path, for example 
'oxygen_icons/16x16/actions/document-open.png'.




Related Messages


Powered by MHonArc, Updated Tue Aug 20 22:00:02 2013