"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "gui/wizards/wiz_objects.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.

wiz_objects.py  (relax-4.1.3.src.tar.bz2):wiz_objects.py  (relax-5.0.0.src.tar.bz2)
skipping to change at line 250 skipping to change at line 250
panel_sizer = wx.BoxSizer(wx.VERTICAL) panel_sizer = wx.BoxSizer(wx.VERTICAL)
# The text. # The text.
text = wx.StaticText(panel, -1, self.main_text, style=wx.TE_MULTILINE) text = wx.StaticText(panel, -1, self.main_text, style=wx.TE_MULTILINE)
text.SetFont(font.normal) text.SetFont(font.normal)
# Wrap the text. # Wrap the text.
text.Wrap(self._main_size - 20) text.Wrap(self._main_size - 20)
# The text size. # The text size.
x, y = text.GetSizeTuple() x, y = text.GetSize()
# Scrolling needed. # Scrolling needed.
if y > max_y-10: if y > max_y-10:
# Set the panel size. # Set the panel size.
panel.SetInitialSize((self._main_size, max_y)) panel.SetInitialSize((self._main_size, max_y))
# No scrolling. # No scrolling.
else: else:
# Rewrap the text. # Rewrap the text.
text.Wrap(self._main_size) text.Wrap(self._main_size)
skipping to change at line 449 skipping to change at line 449
single_page = False single_page = False
# Loop over each page. # Loop over each page.
for i in range(self._num_pages): for i in range(self._num_pages):
# The back button (only for multi-pages, after the first). # The back button (only for multi-pages, after the first).
if not single_page and i > 0: if not single_page and i > 0:
# Create the button. # Create the button.
button = buttons.ThemedGenBitmapTextButton(self, -1, None, self. TEXT_BACK) button = buttons.ThemedGenBitmapTextButton(self, -1, None, self. TEXT_BACK)
button.SetBitmapLabel(wx.Bitmap(self.ICON_BACK, wx.BITMAP_TYPE_A NY)) button.SetBitmapLabel(wx.Bitmap(self.ICON_BACK, wx.BITMAP_TYPE_A NY))
button.SetFont(font.normal) button.SetFont(font.normal)
button.SetToolTipString("Return to the previous page.") button.SetToolTip(wx.ToolTip("Return to the previous page."))
button.SetMinSize(self._size_button) button.SetMinSize(self._size_button)
self._button_sizers[i].Add(button, 0, wx.ADJUST_MINSIZE, 0) self._button_sizers[i].Add(button, 0, wx.ADJUST_MINSIZE, 0)
self.Bind(wx.EVT_BUTTON, self._go_back, button) self.Bind(wx.EVT_BUTTON, self._go_back, button)
self._buttons[i]['back'] = button self._buttons[i]['back'] = button
# Spacer. # Spacer.
self._button_sizers[i].AddSpacer(5) self._button_sizers[i].AddSpacer(5)
# The apply button. # The apply button.
if self._button_apply_flag[i]: if self._button_apply_flag[i]:
# Create the button. # Create the button.
button = buttons.ThemedGenBitmapTextButton(self, -1, None, self. TEXT_APPLY) button = buttons.ThemedGenBitmapTextButton(self, -1, None, self. TEXT_APPLY)
button.SetBitmapLabel(wx.Bitmap(self.ICON_APPLY, wx.BITMAP_TYPE_ ANY)) button.SetBitmapLabel(wx.Bitmap(self.ICON_APPLY, wx.BITMAP_TYPE_ ANY))
button.SetFont(font.normal) button.SetFont(font.normal)
if single_page: if single_page:
button.SetToolTipString("Apply the operation and leave the w indow open.") button.SetToolTip(wx.ToolTip("Apply the operation and leave the window open."))
else: else:
button.SetToolTipString("Apply the operation and stay on the current page.") button.SetToolTip(wx.ToolTip("Apply the operation and stay o n the current page."))
button.SetMinSize(self._size_button) button.SetMinSize(self._size_button)
self._button_sizers[i].Add(button, 0, wx.ADJUST_MINSIZE, 0) self._button_sizers[i].Add(button, 0, wx.ADJUST_MINSIZE, 0)
self.Bind(wx.EVT_BUTTON, self._pages[i]._apply, button) self.Bind(wx.EVT_BUTTON, self._pages[i]._apply, button)
self._buttons[i]['apply'] = button self._buttons[i]['apply'] = button
# Spacer. # Spacer.
self._button_sizers[i].AddSpacer(5) self._button_sizers[i].AddSpacer(5)
# The skip button. # The skip button.
if self._button_skip_flag[i]: if self._button_skip_flag[i]:
# Create the button. # Create the button.
button = buttons.ThemedGenBitmapTextButton(self, -1, None, self. TEXT_SKIP) button = buttons.ThemedGenBitmapTextButton(self, -1, None, self. TEXT_SKIP)
button.SetBitmapLabel(wx.Bitmap(self.ICON_SKIP, wx.BITMAP_TYPE_A NY)) button.SetBitmapLabel(wx.Bitmap(self.ICON_SKIP, wx.BITMAP_TYPE_A NY))
button.SetFont(font.normal) button.SetFont(font.normal)
button.SetToolTipString("Skip the operation and move to the next page.") button.SetToolTip(wx.ToolTip("Skip the operation and move to the next page."))
button.SetMinSize(self._size_button) button.SetMinSize(self._size_button)
self._button_sizers[i].Add(button, 0, wx.ADJUST_MINSIZE, 0) self._button_sizers[i].Add(button, 0, wx.ADJUST_MINSIZE, 0)
self.Bind(wx.EVT_BUTTON, self._skip, button) self.Bind(wx.EVT_BUTTON, self._skip, button)
self._buttons[i]['skip'] = button self._buttons[i]['skip'] = button
# Spacer. # Spacer.
self._button_sizers[i].AddSpacer(5) self._button_sizers[i].AddSpacer(5)
# The next button (only for multi-pages, excluding the last). # The next button (only for multi-pages, excluding the last).
if not single_page and i < self._num_pages - 1: if not single_page and i < self._num_pages - 1:
# Create the button. # Create the button.
button = buttons.ThemedGenBitmapTextButton(self, -1, None, self. TEXT_NEXT) button = buttons.ThemedGenBitmapTextButton(self, -1, None, self. TEXT_NEXT)
button.SetBitmapLabel(wx.Bitmap(self.ICON_NEXT, wx.BITMAP_TYPE_A NY)) button.SetBitmapLabel(wx.Bitmap(self.ICON_NEXT, wx.BITMAP_TYPE_A NY))
button.SetFont(font.normal) button.SetFont(font.normal)
button.SetToolTipString("Apply the operation and move to the nex t page.") button.SetToolTip(wx.ToolTip("Apply the operation and move to th e next page."))
button.SetMinSize(self._size_button) button.SetMinSize(self._size_button)
self._button_sizers[i].Add(button, 0, wx.ADJUST_MINSIZE, 0) self._button_sizers[i].Add(button, 0, wx.ADJUST_MINSIZE, 0)
self.Bind(wx.EVT_BUTTON, self._go_next, button) self.Bind(wx.EVT_BUTTON, self._go_next, button)
self._buttons[i]['next'] = button self._buttons[i]['next'] = button
# The OK button (only for single pages). # The OK button (only for single pages).
if single_page: if single_page:
button = buttons.ThemedGenBitmapTextButton(self, -1, None, self. TEXT_OK) button = buttons.ThemedGenBitmapTextButton(self, -1, None, self. TEXT_OK)
button.SetBitmapLabel(wx.Bitmap(self.ICON_OK, wx.BITMAP_TYPE_ANY )) button.SetBitmapLabel(wx.Bitmap(self.ICON_OK, wx.BITMAP_TYPE_ANY ))
button.SetFont(font.normal) button.SetFont(font.normal)
button.SetToolTipString("Apply the operation and close the windo w.") button.SetToolTip(wx.ToolTip("Apply the operation and close the window."))
button.SetMinSize(self._size_button) button.SetMinSize(self._size_button)
self._button_sizers[i].Add(button, 0, wx.ADJUST_MINSIZE, 0) self._button_sizers[i].Add(button, 0, wx.ADJUST_MINSIZE, 0)
self.Bind(wx.EVT_BUTTON, self._ok, button) self.Bind(wx.EVT_BUTTON, self._ok, button)
self._buttons[i]['ok'] = button self._buttons[i]['ok'] = button
# The finish button (only for the last page with multi-pages). # The finish button (only for the last page with multi-pages).
if not single_page and i == self._num_pages - 1: if not single_page and i == self._num_pages - 1:
button = buttons.ThemedGenBitmapTextButton(self, -1, None, self. TEXT_FINISH) button = buttons.ThemedGenBitmapTextButton(self, -1, None, self. TEXT_FINISH)
button.SetBitmapLabel(wx.Bitmap(self.ICON_FINISH, wx.BITMAP_TYPE _ANY)) button.SetBitmapLabel(wx.Bitmap(self.ICON_FINISH, wx.BITMAP_TYPE _ANY))
button.SetFont(font.normal) button.SetFont(font.normal)
button.SetToolTipString("Apply the operation and close the wizar d.") button.SetToolTip(wx.ToolTip("Apply the operation and close the wizard."))
button.SetMinSize(self._size_button) button.SetMinSize(self._size_button)
self._button_sizers[i].Add(button, 0, wx.ADJUST_MINSIZE, 0) self._button_sizers[i].Add(button, 0, wx.ADJUST_MINSIZE, 0)
self.Bind(wx.EVT_BUTTON, self._ok, button) self.Bind(wx.EVT_BUTTON, self._ok, button)
self._buttons[i]['finish'] = button self._buttons[i]['finish'] = button
# Spacer. # Spacer.
self._button_sizers[i].AddSpacer(15) self._button_sizers[i].AddSpacer(15)
# The cancel button. # The cancel button.
button = buttons.ThemedGenBitmapTextButton(self, -1, None, self.TEXT _CANCEL) button = buttons.ThemedGenBitmapTextButton(self, -1, None, self.TEXT _CANCEL)
button.SetBitmapLabel(wx.Bitmap(self.ICON_CANCEL, wx.BITMAP_TYPE_ANY )) button.SetBitmapLabel(wx.Bitmap(self.ICON_CANCEL, wx.BITMAP_TYPE_ANY ))
button.SetFont(font.normal) button.SetFont(font.normal)
if single_page: if single_page:
button.SetToolTipString("Abort the operation and close the windo w.") button.SetToolTip(wx.ToolTip("Abort the operation and close the window."))
else: else:
button.SetToolTipString("Abort the operation and close the wizar d.") button.SetToolTip(wx.ToolTip("Abort the operation and close the wizard."))
button.SetMinSize(self._size_button) button.SetMinSize(self._size_button)
self._button_sizers[i].Add(button, 0, wx.ADJUST_MINSIZE, 0) self._button_sizers[i].Add(button, 0, wx.ADJUST_MINSIZE, 0)
self.Bind(wx.EVT_BUTTON, self._cancel, button) self.Bind(wx.EVT_BUTTON, self._cancel, button)
self._buttons[i]['cancel'] = button self._buttons[i]['cancel'] = button
# Flag to suppress later button addition. # Flag to suppress later button addition.
self._buttons_built = True self._buttons_built = True
def _cancel(self, event=None): def _cancel(self, event=None):
"""Cancel the operation. """Cancel the operation.
 End of changes. 10 change blocks. 
10 lines changed or deleted 10 lines changed or added

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