예제 #1
0
    def destroy(self):

        for func in notify_funcs:
            Implementation.unregisterNotify(self.setColors,
                                            'ccpnmr.Analysis.Color', func)

        PulldownList.destroy(self)
예제 #2
0
    def unregisterNotify(self,
                         notify,
                         classname,
                         funcname='',
                         application=None,
                         keyword=None,
                         modifyList=True):

        if application is None:
            application = self.application

        if modifyList:
            if application is None:
                key = funcname
            else:
                key = (funcname, application, keyword)
            try:
                cc = self.notifies[classname]
                ff = cc[key]
                ff.remove(notify)
                if not ff:
                    del cc[key]
                if not cc:
                    del self.notifies[classname]
            except:  # already been unregistered
                pass

        if self.application:
            self.application.unregisterNotify(notify, classname, funcname,
                                              keyword)
        elif application:
            Application.unregisterNotify(notify, classname, funcname,
                                         application, keyword)
        else:
            Implementation.unregisterNotify(notify, classname, funcname)
예제 #3
0
  def destroy(self):

    for func in ('__init__','delete'):
      Implementation.unregisterNotify(self.updateMolSystems, 'ccp.molecule.MolSystem.MolSystem', func)
      Implementation.unregisterNotify(self.updateChains, 'ccp.molecule.MolSystem.Chain', func)

    BasePopup.destroy(self)
예제 #4
0
    def destroy(self):

        for func in notify_funcs:
            Implementation.unregisterNotify(self.setExperiments,
                                            'ccp.nmr.Nmr.Experiment', func)

        PulldownMenu.destroy(self)
예제 #5
0
    def destroy(self):

        for func in notify_funcs:
            Implementation.unregisterNotify(self.setAxisLabels,
                                            'ccpnmr.Analysis.AxisPanel', func)

        PulldownMenu.destroy(self)
예제 #6
0
    def destroy(self):

        for func in notify_funcs:
            Implementation.unregisterNotify(self.setAxisTypes,
                                            'ccpnmr.Analysis.AxisType', func)

        ScrolledListbox.destroy(self)
예제 #7
0
    def destroy(self):

        #print 'PanelTypeList destroy'
        for func in notify_funcs:
            Implementation.unregisterNotify(self.setPanelTypes,
                                            'ccpnmr.Analysis.PanelType', func)

        PulldownMenu.destroy(self)
예제 #8
0
  def destroy(self):

    self.spectrum_list.destroy()
    self.expt_list.destroy()

    for func in notify_funcs:
      Implementation.unregisterNotify(self.setExperiments, 'ccp.nmr.Nmr.Experiment', func)
      Implementation.unregisterNotify(self.setSpectra, 'ccp.nmr.Nmr.DataSource', func)
예제 #9
0
    def destroy(self):

        for func in notify_funcs:
            Implementation.unregisterNotify(self.setChains,
                                            'ccp.molecule.MolSystem.Chain',
                                            func)

        PulldownMenu.destroy(self)
예제 #10
0
  def doUnregisters(self):

    try:
      Implementation.unregisterNotify(self.updateAfter, self.refClassName,
                                    'delete')
    except AttributeError:
      # refClassName may be an abstract class, 
      # in which case registering will fail
      return
예제 #11
0
    def destroy(self):

        for func in ('__init__', 'delete', 'setName'):
            for clazz in ('ccp.nmr.NmrConstraint.DistanceConstraintList', ):
                Implementation.unregisterNotify(self.updateConstraintLists,
                                                clazz, func)
        for func in ('__init__', 'delete'):
            Implementation.unregisterNotify(
                self.updateConstraintSets,
                'ccp.nmr.NmrConstraint.NmrConstraintStore', func)

        BasePopup.destroy(self)
예제 #12
0
def unregisterNotify(notify, classname, funcname, application = None, keyword = None):

  if application is None or keyword is None:
    assert application is None and keyword is None, 'application = %s, keyword = %s, both must be None' % (application, keyword)
    return GenImp.unregisterNotify(notify, classname, funcname)

  if funcname not in allowedNotifyFuncs:
    raise GenImp.ApiError('illegal funcname "%s", must be in %s' % (funcname, allowedNotifyFuncs))

  try:
    notifies = GenImp.getClassFromFullName(classname)._notifies
    notifies = notifies[(funcname, application, keyword)]
    notifies.remove(notify)
  except:
    pass
예제 #13
0
    def destroy(self):

        for func in notify_funcs:
            Implementation.unregisterNotify(
                self.setSpectrumViews, 'ccpnmr.Analysis.SpectrumWindowView',
                func)
        Implementation.unregisterNotify(self.setSpectrumViews,
                                        'ccp.nmr.Nmr.Experiment', 'setName')
        Implementation.unregisterNotify(self.setSpectrumViews,
                                        'ccp.nmr.Nmr.DataSource', 'setName')

        PulldownMenu.destroy(self)
예제 #14
0
  def destroy(self):

    for func in notify_funcs:
      Implementation.unregisterNotify(self.setSpectra, 'ccp.nmr.Nmr.DataSource', func)

    PulldownMenu.destroy(self)
예제 #15
0
  def doUnregisters(self):

    Implementation.unregisterNotify(self.updateAfter, self.refClassName, 
                                    'delete')