Author: bugman Date: Wed Nov 12 17:49:29 2014 New Revision: 26547 URL: http://svn.gna.org/viewcvs/relax?rev=26547&view=rev Log: More shifting of wx.NewId() calls for popup menus to module namespaces to conserve IDs.
Modified: trunk/gui/components/molecule.py trunk/gui/components/relax_data.py trunk/gui/components/relax_data_meta.py Modified: trunk/gui/components/molecule.py URL: http://svn.gna.org/viewcvs/relax/trunk/gui/components/molecule.py?rev=26547&r1=26546&r2=26547&view=diff ============================================================================== --- trunk/gui/components/molecule.py (original) +++ trunk/gui/components/molecule.py Wed Nov 12 17:49:29 2014 @@ -1,7 +1,7 @@ ############################################################################### # # # Copyright (C) 2009-2011 Michael Bieri # -# Copyright (C) 2010-2013 Edward d'Auvergne # +# Copyright (C) 2010-2014 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -37,6 +37,13 @@ from user_functions.data import Uf_info; uf_info = Uf_info() +# Some IDs for the menu entries. +MENU_MOLECULE_NAME = wx.NewId() +MENU_MOLECULE_TYPE = wx.NewId() +MENU_BMRB_THIOL_STATE = wx.NewId() + + + class Molecule(Base_list): """The GUI element for listing loaded molecules.""" @@ -163,17 +170,17 @@ # The right click popup menu. self.popup_menus = [ { - 'id': wx.NewId(), + 'id': MENU_MOLECULE_NAME, 'text': "&Name the molecule", 'icon': fetch_icon(uf_info.get_uf('molecule.name').gui_icon), 'method': self.action_molecule_name }, { - 'id': wx.NewId(), + 'id': MENU_MOLECULE_TYPE, 'text': "Set the molecule &type", 'icon': fetch_icon(uf_info.get_uf('molecule.type').gui_icon), 'method': self.action_molecule_type }, { - 'id': wx.NewId(), + 'id': MENU_BMRB_THIOL_STATE, 'text': "Set the thiol &state", 'icon': fetch_icon(uf_info.get_uf('bmrb.thiol_state').gui_icon), 'method': self.action_bmrb_thiol_state Modified: trunk/gui/components/relax_data.py URL: http://svn.gna.org/viewcvs/relax/trunk/gui/components/relax_data.py?rev=26547&r1=26546&r2=26547&view=diff ============================================================================== --- trunk/gui/components/relax_data.py (original) +++ trunk/gui/components/relax_data.py Wed Nov 12 17:49:29 2014 @@ -41,6 +41,17 @@ from user_functions.data import Uf_info; uf_info = Uf_info() +# Some IDs for the menu entries. +MENU_RELAX_DATA_DELETE = wx.NewId() +MENU_RELAX_DATA_DISPLAY = wx.NewId() +MENU_SPECTROMETER_FREQUENCY = wx.NewId() +MENU_RELAX_DATA_PEAK_INTENSITY_TYPE = wx.NewId() +MENU_RELAX_DATA_TEMP_CALIBRATION = wx.NewId() +MENU_RELAX_DATA_TEMP_CONTROL = wx.NewId() +MENU_RELAX_DATA_TYPE = wx.NewId() + + + class Relax_data_list(Base_list): """The GUI element for listing loaded relaxation data.""" @@ -257,37 +268,37 @@ # The right click popup menu. self.popup_menus = [ { - 'id': wx.NewId(), + 'id': MENU_RELAX_DATA_DELETE, 'text': "&Delete the relaxation data", 'icon': fetch_icon(uf_info.get_uf('relax_data.delete').gui_icon), 'method': self.action_relax_data_delete }, { - 'id': wx.NewId(), + 'id': MENU_RELAX_DATA_DISPLAY, 'text': "Dis&play the relaxation data", 'icon': fetch_icon(uf_info.get_uf('relax_data.display').gui_icon), 'method': self.action_relax_data_display }, { - 'id': wx.NewId(), + 'id': MENU_SPECTROMETER_FREQUENCY, 'text': "Set the relaxation data &frequency", 'icon': fetch_icon(uf_info.get_uf('spectrometer.frequency').gui_icon), 'method': self.action_spectrometer_frequency }, { - 'id': wx.NewId(), + 'id': MENU_RELAX_DATA_PEAK_INTENSITY_TYPE, 'text': "Set the peak &intensity type", 'icon': fetch_icon(uf_info.get_uf('relax_data.peak_intensity_type').gui_icon), 'method': self.action_relax_data_peak_intensity_type }, { - 'id': wx.NewId(), + 'id': MENU_RELAX_DATA_TEMP_CALIBRATION, 'text': "Set the temperature &calibration", 'icon': fetch_icon(uf_info.get_uf('relax_data.temp_calibration').gui_icon), 'method': self.action_relax_data_temp_calibration }, { - 'id': wx.NewId(), + 'id': MENU_RELAX_DATA_TEMP_CONTROL, 'text': "Set the temperature c&ontrol", 'icon': fetch_icon(uf_info.get_uf('relax_data.temp_control').gui_icon), 'method': self.action_relax_data_temp_control }, { - 'id': wx.NewId(), + 'id': MENU_RELAX_DATA_TYPE, 'text': "Set the relaxation data &type", 'icon': fetch_icon(uf_info.get_uf('relax_data.type').gui_icon), 'method': self.action_relax_data_type Modified: trunk/gui/components/relax_data_meta.py URL: http://svn.gna.org/viewcvs/relax/trunk/gui/components/relax_data_meta.py?rev=26547&r1=26546&r2=26547&view=diff ============================================================================== --- trunk/gui/components/relax_data_meta.py (original) +++ trunk/gui/components/relax_data_meta.py Wed Nov 12 17:49:29 2014 @@ -35,6 +35,14 @@ from user_functions.data import Uf_info; uf_info = Uf_info() +# Some IDs for the menu entries. +MENU_RELAX_DATA_DISPLAY = wx.NewId() +MENU_RELAX_DATA_PEAK_INTENSITY_TYPE = wx.NewId() +MENU_RELAX_DATA_TEMP_CALIBRATION = wx.NewId() +MENU_RELAX_DATA_TEMP_CONTROL = wx.NewId() + + + class Relax_data_meta_list(Base_list): """The GUI element for listing loaded relaxation data.""" @@ -198,22 +206,22 @@ # The right click popup menu. self.popup_menus = [ { - 'id': wx.NewId(), + 'id': MENU_RELAX_DATA_DISPLAY, 'text': "Dis&play the relaxation data", 'icon': fetch_icon(uf_info.get_uf('relax_data.display').gui_icon), 'method': self.action_relax_data_display }, { - 'id': wx.NewId(), + 'id': MENU_RELAX_DATA_PEAK_INTENSITY_TYPE, 'text': "Set the peak &intensity type", 'icon': fetch_icon(uf_info.get_uf('relax_data.peak_intensity_type').gui_icon), 'method': self.action_relax_data_peak_intensity_type }, { - 'id': wx.NewId(), + 'id': MENU_RELAX_DATA_TEMP_CALIBRATION, 'text': "Set the temperature &calibration", 'icon': fetch_icon(uf_info.get_uf('relax_data.temp_calibration').gui_icon), 'method': self.action_relax_data_temp_calibration }, { - 'id': wx.NewId(), + 'id': MENU_RELAX_DATA_TEMP_CONTROL, 'text': "Set the temperature c&ontrol", 'icon': fetch_icon(uf_info.get_uf('relax_data.temp_control').gui_icon), 'method': self.action_relax_data_temp_control _______________________________________________ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits