"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "gui/icons.py" between
relax-4.1.3.src.tar.bz2 and relax-5.0.0.src.tar.bz2

About: relax allows the study of molecular dynamics through the analysis of experimental NMR data. Organic molecules, proteins, RNA, DNA, sugars, and other biomolecules are all supported.

icons.py  (relax-4.1.3.src.tar.bz2):icons.py  (relax-5.0.0.src.tar.bz2)
############################################################################### ###############################################################################
# # # #
# Copyright (C) 2011 Edward d'Auvergne # # Copyright (C) 2011,2019 Edward d'Auvergne #
# # # #
# This file is part of the program relax (http://www.nmr-relax.com). # # This file is part of the program relax (http://www.nmr-relax.com). #
# # # #
# This program is free software: you can redistribute it and/or modify # # This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by # # it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or # # the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. # # (at your option) any later version. #
# # # #
# This program is distributed in the hope that it will be useful, # # This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of # # but WITHOUT ANY WARRANTY; without even the implied warranty of #
skipping to change at line 31 skipping to change at line 31
# Module docstring. # Module docstring.
"""All of the icons for relax.""" """All of the icons for relax."""
# Python module imports. # Python module imports.
from os import sep from os import sep
import sys import sys
import wx import wx
# relax module imports. # relax module imports.
import dep_check
from status import Status; status = Status() from status import Status; status = Status()
class Relax_icons(wx.IconBundle): class Relax_icons(wx.IconBundle):
"""The icon bundle class of the main relax icons.""" """The icon bundle singleton class of the main relax icons."""
# Class variable for storing the class instance (for the singleton).
_instance = None
def __new__(self, *args, **kargs):
"""Replacement method for implementing the singleton design pattern."""
# First instantiation.
if self._instance is None:
# Instantiate.
self._instance = wx.IconBundle.__new__(self, *args, **kargs)
# Already instantiated, so return the instance.
return self._instance
def setup(self): def setup(self):
"""Set up the icons after the main app is created.""" """Set up the icons after the main app is created."""
# This is disabled on Macs. # This is disabled on Macs.
if not 'darwin' in sys.platform: if not 'darwin' in sys.platform:
self.AddIconFromFile(status.install_path + sep + 'graphics' + sep + if dep_check.wx_classic:
'ulysses.ico', wx.BITMAP_TYPE_ANY) self.AddIconFromFile(status.install_path + sep + 'graphics' + se
p + 'ulysses.ico', wx.BITMAP_TYPE_ANY)
else:
self.AddIcon(status.install_path + sep + 'graphics' + sep + 'uly
sses.ico', wx.BITMAP_TYPE_ANY)
 End of changes. 4 change blocks. 
2 lines changed or deleted 17 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)