Author: bugman Date: Mon May 28 18:05:19 2012 New Revision: 16486 URL: http://svn.gna.org/viewcvs/relax?rev=16486&view=rev Log: Fixes for user function calls in the spin viewer and the pipe editor. Modified: branches/uf_redesign/gui/pipe_editor.py branches/uf_redesign/gui/spin_viewer/tree.py Modified: branches/uf_redesign/gui/pipe_editor.py URL: http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/pipe_editor.py?rev=16486&r1=16485&r2=16486&view=diff ============================================================================== --- branches/uf_redesign/gui/pipe_editor.py (original) +++ branches/uf_redesign/gui/pipe_editor.py Mon May 28 18:05:19 2012 @@ -39,7 +39,7 @@ from gui.misc import add_border from gui.paths import icon_16x16, icon_22x22, WIZARD_IMAGE_PATH from gui.string_conv import gui_to_str, str_to_gui -from gui.uf_objects import Uf_storage +from gui.uf_objects import Uf_storage; uf_store = Uf_storage() class Pipe_editor(wx.Frame): @@ -255,20 +255,17 @@ @type event: wx event """ - # The user function storage singleton. - store = Uf_storage() - # Launch the respective user functions. if event.GetEventObject() == self.button_create: - store['pipe.create'](event, parent=self) + uf_store['pipe.create'](event, wx_parent=self) elif event.GetEventObject() == self.button_copy: - store['pipe.copy'](event, parent=self) + uf_store['pipe.copy'](event, wx_parent=self) elif event.GetEventObject() == self.button_delete: - store['pipe.delete'](event, parent=self) + uf_store['pipe.delete'](event, wx_parent=self) elif event.GetEventObject() == self.button_hybrid: - store['pipe.hybridise'](event, parent=self) + uf_store['pipe.hybridise'](event, wx_parent=self) elif event.GetEventObject() == self.button_switch: - store['pipe.switch'](event, parent=self) + uf_store['pipe.switch'](event, wx_parent=self) def add_logo(self, box): Modified: branches/uf_redesign/gui/spin_viewer/tree.py URL: http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/spin_viewer/tree.py?rev=16486&r1=16485&r2=16486&view=diff ============================================================================== --- branches/uf_redesign/gui/spin_viewer/tree.py (original) +++ branches/uf_redesign/gui/spin_viewer/tree.py Mon May 28 18:05:19 2012 @@ -201,7 +201,7 @@ """ # Call the dialog. - uf_store['molecule.create'](parent=self.gui.spin_viewer) + uf_store['molecule.create'](wx_parent=self.gui.spin_viewer) def create_residue(self, event): @@ -212,7 +212,7 @@ """ # Call the dialog. - uf_store['residue.create'](parent=self.gui.spin_viewer, mol_name=self.info['mol_name']) + uf_store['residue.create'](wx_parent=self.gui.spin_viewer, mol_name=self.info['mol_name']) def create_spin(self, event): @@ -223,7 +223,7 @@ """ # Call the dialog. - uf_store['spin.create'](parent=self.gui.spin_viewer, mol_name=self.info['mol_name'], res_num=self.info['res_num'], res_name=self.info['res_name']) + uf_store['spin.create'](wx_parent=self.gui.spin_viewer, mol_name=self.info['mol_name'], res_num=self.info['res_num'], res_name=self.info['res_name']) def delete_molecule(self, event):