Author: bugman Date: Thu Mar 1 16:15:40 2012 New Revision: 15427 URL: http://svn.gna.org/viewcvs/relax?rev=15427&view=rev Log: The finish button in the new analysis wizard has been renamed to "Start". This is based on feedback from Hessam Rezaei-Ghaleh. Now all of the text and icons for the wizards can be programmatically changed. Modified: 1.3/gui/analyses/wizard.py 1.3/gui/wizard.py Modified: 1.3/gui/analyses/wizard.py URL: http://svn.gna.org/viewcvs/relax/1.3/gui/analyses/wizard.py?rev=15427&r1=15426&r2=15427&view=diff ============================================================================== --- 1.3/gui/analyses/wizard.py (original) +++ 1.3/gui/analyses/wizard.py Thu Mar 1 16:15:40 2012 @@ -52,6 +52,9 @@ # Set up the wizard. self.wizard = Wiz_window(size_x=850, size_y=700, title='Set parameter values') + + # Change the finish button. + self.wizard.TEXT_FINISH = " Start" # Add the new analysis panel. self.new_page = New_analysis_page(self.wizard) Modified: 1.3/gui/wizard.py URL: http://svn.gna.org/viewcvs/relax/1.3/gui/wizard.py?rev=15427&r1=15426&r2=15427&view=diff ============================================================================== --- 1.3/gui/wizard.py (original) +++ 1.3/gui/wizard.py Thu Mar 1 16:15:40 2012 @@ -1029,6 +1029,21 @@ # Some class variables. _size_button = (100, 33) + ICON_APPLY = paths.icon_22x22.dialog_ok_apply + ICON_BACK = paths.icon_22x22.go_previous_view + ICON_CANCEL = paths.icon_22x22.dialog_cancel + ICON_FINISH = paths.icon_22x22.dialog_ok + ICON_NEXT = paths.icon_22x22.go_next_view + ICON_OK = paths.icon_22x22.dialog_ok + ICON_SKIP = paths.icon_22x22.skip + TEXT_APPLY = " Apply" + TEXT_BACK = " Back" + TEXT_CANCEL = " Cancel" + TEXT_FINISH = " Apply" + TEXT_NEXT = " Next" + TEXT_OK = " OK" + TEXT_SKIP = " Skip" + def __init__(self, parent=None, size_x=400, size_y=400, title='', border=10, style=wx.DEFAULT_DIALOG_STYLE): """Set up the window. @@ -1150,8 +1165,8 @@ # The back button (only for multi-pages, after the first). if self._num_pages > 1 and i > 0: # Create the button. - button = buttons.ThemedGenBitmapTextButton(self, -1, None, " Back") - button.SetBitmapLabel(wx.Bitmap(paths.icon_22x22.go_previous_view, wx.BITMAP_TYPE_ANY)) + button = buttons.ThemedGenBitmapTextButton(self, -1, None, self.TEXT_BACK) + button.SetBitmapLabel(wx.Bitmap(self.ICON_BACK, wx.BITMAP_TYPE_ANY)) button.SetFont(font.normal) button.SetToolTipString("Return to the previous page") button.SetMinSize(self._size_button) @@ -1165,8 +1180,8 @@ # The apply button. if self._button_apply_flag[i]: # Create the button. - button = buttons.ThemedGenBitmapTextButton(self, -1, None, " Apply") - button.SetBitmapLabel(wx.Bitmap(paths.icon_22x22.dialog_ok_apply, wx.BITMAP_TYPE_ANY)) + button = buttons.ThemedGenBitmapTextButton(self, -1, None, self.TEXT_APPLY) + button.SetBitmapLabel(wx.Bitmap(self.ICON_APPLY, wx.BITMAP_TYPE_ANY)) button.SetFont(font.normal) button.SetToolTipString("Apply the operation") button.SetMinSize(self._size_button) @@ -1180,8 +1195,8 @@ # The skip button. if self._button_skip_flag[i]: # Create the button. - button = buttons.ThemedGenBitmapTextButton(self, -1, None, " Skip") - button.SetBitmapLabel(wx.Bitmap(paths.icon_22x22.skip, wx.BITMAP_TYPE_ANY)) + button = buttons.ThemedGenBitmapTextButton(self, -1, None, self.TEXT_SKIP) + button.SetBitmapLabel(wx.Bitmap(self.ICON_SKIP, wx.BITMAP_TYPE_ANY)) button.SetFont(font.normal) button.SetToolTipString("Skip the operation") button.SetMinSize(self._size_button) @@ -1195,8 +1210,8 @@ # The next button (only for multi-pages, excluding the last). if self._num_pages > 1 and i < self._num_pages - 1: # Create the button. - button = buttons.ThemedGenBitmapTextButton(self, -1, None, " Next") - button.SetBitmapLabel(wx.Bitmap(paths.icon_22x22.go_next_view, wx.BITMAP_TYPE_ANY)) + button = buttons.ThemedGenBitmapTextButton(self, -1, None, self.TEXT_NEXT) + button.SetBitmapLabel(wx.Bitmap(self.ICON_NEXT, wx.BITMAP_TYPE_ANY)) button.SetFont(font.normal) button.SetToolTipString("Move to the next page") button.SetMinSize(self._size_button) @@ -1206,8 +1221,8 @@ # The OK button (only for single pages). if self._num_pages == 1: - button = buttons.ThemedGenBitmapTextButton(self, -1, None, " OK") - button.SetBitmapLabel(wx.Bitmap(paths.icon_22x22.dialog_ok, wx.BITMAP_TYPE_ANY)) + button = buttons.ThemedGenBitmapTextButton(self, -1, None, self.TEXT_OK) + button.SetBitmapLabel(wx.Bitmap(self.ICON_OK, wx.BITMAP_TYPE_ANY)) button.SetFont(font.normal) button.SetToolTipString("Accept the operation") button.SetMinSize(self._size_button) @@ -1217,8 +1232,8 @@ # The finish button (only for the last page with multi-pages). if self._num_pages > 1 and i == self._num_pages - 1: - button = buttons.ThemedGenBitmapTextButton(self, -1, None, " Finish") - button.SetBitmapLabel(wx.Bitmap(paths.icon_22x22.dialog_ok, wx.BITMAP_TYPE_ANY)) + button = buttons.ThemedGenBitmapTextButton(self, -1, None, self.TEXT_FINISH) + button.SetBitmapLabel(wx.Bitmap(self.ICON_FINISH, wx.BITMAP_TYPE_ANY)) button.SetFont(font.normal) button.SetToolTipString("Accept the operation") button.SetMinSize(self._size_button) @@ -1230,8 +1245,8 @@ self._button_sizers[i].AddSpacer(15) # The cancel button. - button = buttons.ThemedGenBitmapTextButton(self, -1, None, " Cancel") - button.SetBitmapLabel(wx.Bitmap(paths.icon_22x22.dialog_cancel, wx.BITMAP_TYPE_ANY)) + button = buttons.ThemedGenBitmapTextButton(self, -1, None, self.TEXT_CANCEL) + button.SetBitmapLabel(wx.Bitmap(self.ICON_CANCEL, wx.BITMAP_TYPE_ANY)) button.SetFont(font.normal) button.SetToolTipString("Abort the operation") button.SetMinSize(self._size_button)