"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "gui/analyses/elements/model_list.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.

model_list.py  (relax-4.1.3.src.tar.bz2):model_list.py  (relax-5.0.0.src.tar.bz2)
############################################################################### ###############################################################################
# # # #
# Copyright (C) 2009-2010 Michael Bieri # # Copyright (C) 2009-2010 Michael Bieri #
# Copyright (C) 2009-2013 Edward d'Auvergne # # Copyright (C) 2009-2013,2016 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 32 skipping to change at line 32
# Module docstring. # Module docstring.
"""Auto-analysis GUI element for the control of lists of models.""" """Auto-analysis GUI element for the control of lists of models."""
# Python module imports. # Python module imports.
import wx import wx
from wx.lib import scrolledpanel from wx.lib import scrolledpanel
import wx.lib.mixins.listctrl import wx.lib.mixins.listctrl
# relax module imports. # relax module imports.
import dep_check
from graphics import fetch_icon from graphics import fetch_icon
from gui.fonts import font from gui.fonts import font
from gui.message import Question from gui.message import Question
from gui.misc import add_border from gui.misc import add_border
from gui.string_conv import list_to_gui, str_to_gui from gui.string_conv import list_to_gui, str_to_gui
from status import Status; status = Status() from status import Status; status = Status()
class Model_list: class Model_list:
"""The model list GUI element.""" """The model list GUI element."""
skipping to change at line 103 skipping to change at line 104
# Initialise the model selection window. # Initialise the model selection window.
self.model_win = Model_sel_window(self.models, self.params, self.model_d esc, size=self.size, border=self.border) self.model_win = Model_sel_window(self.models, self.params, self.model_d esc, size=self.size, border=self.border)
# Horizontal packing for this element. # Horizontal packing for this element.
sizer = wx.BoxSizer(wx.HORIZONTAL) sizer = wx.BoxSizer(wx.HORIZONTAL)
# Add a label. # Add a label.
label = self.parent.add_static_text(sizer, self.parent, text=self.desc, width=self.parent.width_text) label = self.parent.add_static_text(sizer, self.parent, text=self.desc, width=self.parent.width_text)
# Spacer. # Spacer.
sizer.AddSpacer((self.parent.spacer_horizontal, -1)) if dep_check.wx_classic:
sizer.AddSpacer((self.parent.spacer_horizontal, -1))
else:
sizer.AddSpacer(self.parent.spacer_horizontal)
# The text input field. # The text input field.
self.field = self.parent.add_text_control(sizer, self.parent, text=list_ to_gui(self.GetValue()), editable=False) self.field = self.parent.add_text_control(sizer, self.parent, text=list_ to_gui(self.GetValue()), editable=False)
# Spacer. # Spacer.
sizer.AddSpacer((self.parent.spacer_horizontal, -1)) if dep_check.wx_classic:
sizer.AddSpacer((self.parent.spacer_horizontal, -1))
else:
sizer.AddSpacer(self.parent.spacer_horizontal)
# Add the button. # Add the button.
self.button = self.parent.add_button_open(sizer, self.parent, icon=fetch _icon("oxygen.actions.flag-blue", "16x16"), text="Modify", fn=self.modify, width =self.parent.width_button, height=label.GetSize()[1]+8) self.button = self.parent.add_button_open(sizer, self.parent, icon=fetch _icon("oxygen.actions.flag-blue", "16x16"), text="Modify", fn=self.modify, width =self.parent.width_button, height=label.GetSize()[1]+8)
# Tooltip. # Tooltip.
if self.tooltip: if self.tooltip:
label.SetToolTipString(self.tooltip) label.SetToolTip(wx.ToolTip(self.tooltip))
self.field.SetToolTipString(self.tooltip) self.field.SetToolTip(wx.ToolTip(self.tooltip))
if self.tooltip_button: if self.tooltip_button:
self.button.SetToolTipString(self.tooltip_button) self.button.SetToolTip(wx.ToolTip(self.tooltip_button))
# Add the contents to the main box. # Add the contents to the main box.
box.Add(sizer, 0, wx.ALL|wx.EXPAND, 0) box.Add(sizer, 0, wx.ALL|wx.EXPAND, 0)
def Enable(self, enable=True): def Enable(self, enable=True):
"""Enable or disable the element. """Enable or disable the element.
@keyword enable: The flag specifying if the element should be enabled or disabled. @keyword enable: The flag specifying if the element should be enabled or disabled.
@type enable: bool @type enable: bool
""" """
 End of changes. 6 change blocks. 
6 lines changed or deleted 13 lines changed or added

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