Author: bugman Date: Tue Aug 20 21:59:40 2013 New Revision: 20651 URL: http://svn.gna.org/viewcvs/relax?rev=20651&view=rev Log: Merged revisions 20650 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r20650 | bugman | 2013-08-20 21:58:00 +0200 (Tue, 20 Aug 2013) | 9 lines 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: branches/relax_disp/ (props changed) branches/relax_disp/docs/latex/fetch_docstrings.py branches/relax_disp/graphics/__init__.py Propchange: branches/relax_disp/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Tue Aug 20 21:59:40 2013 @@ -1,1 +1,1 @@ -/trunk:1-20648 +/trunk:1-20650 Modified: branches/relax_disp/docs/latex/fetch_docstrings.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/docs/latex/fetch_docstrings.py?rev=20651&r1=20650&r2=20651&view=diff ============================================================================== --- branches/relax_disp/docs/latex/fetch_docstrings.py (original) +++ branches/relax_disp/docs/latex/fetch_docstrings.py Tue Aug 20 21:59:40 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: branches/relax_disp/graphics/__init__.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/graphics/__init__.py?rev=20651&r1=20650&r2=20651&view=diff ============================================================================== --- branches/relax_disp/graphics/__init__.py (original) +++ branches/relax_disp/graphics/__init__.py Tue Aug 20 21:59:40 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'.