Exemple #1
0
 def add_button_clicked(self, obj):
     from .. import EditPersonRef
     try:
         ref = PersonRef()
         ref.rel = _('Godfather')
         EditPersonRef(self.dbstate, self.uistate, self.track, ref,
                       self.add_callback)
     except WindowActiveError:
         pass
 def add_button_clicked(self, obj):
     from .. import EditPersonRef
     try:
         ref = PersonRef()
         ref.rel = _('Godfather')
         EditPersonRef(
             self.dbstate, self.uistate, self.track,
             ref, self.add_callback)
     except WindowActiveError:
         pass
Exemple #3
0
 def _handle_drag(self, row, obj):
     """
     And event reference that is from a drag and drop has
     an unknown event reference type
     """
     from .. import EditPersonRef
     try:
         ref = PersonRef(obj)
         ref.rel = _('Unknown')
         EditPersonRef(self.dbstate, self.uistate, self.track, ref,
                       self.add_callback)
     except WindowActiveError:
         pass
 def _handle_drag(self, row, obj):
     """
     And event reference that is from a drag and drop has
     an unknown event reference type
     """
     from .. import EditPersonRef
     try:
         ref = PersonRef(obj)
         ref.rel = _('Unknown')
         EditPersonRef(
             self.dbstate, self.uistate, self.track,
             ref, self.add_callback)
     except WindowActiveError:
         pass
Exemple #5
0
    def handle_extra_type(self, objtype, obj):
        """
        Called when a person is dropped onto the list.  objtype will be
        'person-link' and obj will contain a person handle.
        """
        person = self.dbstate.db.get_person_from_handle(obj)

        from .. import EditPersonRef
        try:
            ref = PersonRef()
            ref.rel = _('Unknown')
            if person:
                ref.ref = person.get_handle()
            EditPersonRef(self.dbstate, self.uistate, self.track, ref,
                          self.add_callback)
        except WindowActiveError:
            pass
    def handle_extra_type(self, objtype, obj):
        """
        Called when a person is dropped onto the list.  objtype will be
        'person-link' and obj will contain a person handle.
        """
        person = self.dbstate.db.get_person_from_handle(obj)

        from .. import EditPersonRef
        try:
            ref = PersonRef()
            ref.rel = _('Unknown')
            if person:
                ref.ref = person.get_handle()
            EditPersonRef(
                self.dbstate, self.uistate, self.track,
                ref, self.add_callback)
        except WindowActiveError:
            pass