示例#1
0
 def _add_address(self):
     ea = gmAddressWidgets.cAddressEAPnl(self, -1)
     ea.address_holder = self.__identity
     dlg = gmEditArea.cGenericEditAreaDlg2(self, -1, edit_area=ea)
     dlg.SetTitle(_('Adding new address'))
     if dlg.ShowModal() == wx.ID_OK:
         return True
     return False
示例#2
0
	def _add_address(self):
		ea = gmAddressWidgets.cAddressEAPnl(self, -1)
		ea.address_holder = self.__identity
		dlg = gmEditArea.cGenericEditAreaDlg2(self, -1, edit_area = ea)
		dlg.SetTitle(_('Adding new address'))
		if dlg.ShowModal() == wx.ID_OK:
			return True
		return False
示例#3
0
	def _on_add_new_address_button_pressed(self, event):
		ea = gmAddressWidgets.cAddressEAPnl(self, -1)
		ea.address_holder = self.__unit
		ea.type_is_editable = False
		dlg = gmEditArea.cGenericEditAreaDlg2(self, -1, edit_area = ea)
		dlg.SetTitle(_('Adding new address'))
		if dlg.ShowModal() != wx.ID_OK:
			return False
		self.__refresh()
		return True
示例#4
0
 def _on_add_new_address_button_pressed(self, event):
     ea = gmAddressWidgets.cAddressEAPnl(self, -1)
     ea.address_holder = self.__unit
     ea.type_is_editable = False
     dlg = gmEditArea.cGenericEditAreaDlg2(self, -1, edit_area=ea)
     dlg.SetTitle(_('Adding new address'))
     if dlg.ShowModal() != wx.ID_OK:
         return False
     self.__refresh()
     return True
示例#5
0
 def _edit_address(self, address):
     ea = gmAddressWidgets.cAddressEAPnl(self, -1, address=address)
     ea.address_holder = self.__identity
     dlg = gmEditArea.cGenericEditAreaDlg2(self, -1, edit_area=ea)
     dlg.SetTitle(_('Editing address'))
     if dlg.ShowModal() == wx.ID_OK:
         # did we add an entirely new address ?
         # if so then unlink the old one as implied by "edit"
         if ea.address['pk_address'] != address['pk_address']:
             self.__identity.unlink_address(address=address)
         return True
     return False
示例#6
0
	def _edit_address(self, address):
		ea = gmAddressWidgets.cAddressEAPnl(self, -1, address = address)
		ea.address_holder = self.__identity
		dlg = gmEditArea.cGenericEditAreaDlg2(self, -1, edit_area = ea)
		dlg.SetTitle(_('Editing address'))
		if dlg.ShowModal() == wx.ID_OK:
			# did we add an entirely new address ?
			# if so then unlink the old one as implied by "edit"
			if ea.address['pk_address'] != address['pk_address']:
				self.__identity.unlink_address(address = address)
			return True
		return False