update_user => update_contact
This commit is contained in:
		
							parent
							
								
									6615a51a3a
								
							
						
					
					
						commit
						4ec2eea678
					
				
					 4 changed files with 11 additions and 11 deletions
				
			
		|  | @ -59,10 +59,10 @@ class EditGroupsDialog: | |||
| 		self.dialog.run() | ||||
| 		self.dialog.destroy() | ||||
| 		if self.changes_made: | ||||
| 			gajim.connections[self.account].update_user(self.user.jid, | ||||
| 			gajim.connections[self.account].update_contact(self.user.jid, | ||||
| 				self.user.name, self.user.groups) | ||||
| 
 | ||||
| 	def update_user(self): | ||||
| 	def update_contact(self): | ||||
| 		self.plugin.roster.remove_user(self.user, self.account) | ||||
| 		self.plugin.roster.add_contact_to_roster(self.user.jid, self.account) | ||||
| 
 | ||||
|  | @ -80,7 +80,7 @@ class EditGroupsDialog: | |||
| 		self.changes_made = True | ||||
| 		model.append((group, True)) | ||||
| 		self.user.groups.append(group) | ||||
| 		self.update_user() | ||||
| 		self.update_contact() | ||||
| 
 | ||||
| 	def group_toggled_cb(self, cell, path): | ||||
| 		self.changes_made = True | ||||
|  | @ -95,7 +95,7 @@ class EditGroupsDialog: | |||
| 			self.user.groups.append(model[path][0]) | ||||
| 		else: | ||||
| 			self.user.groups.remove(model[path][0]) | ||||
| 		self.update_user() | ||||
| 		self.update_contact() | ||||
| 
 | ||||
| 	def init_list(self): | ||||
| 		store = gtk.ListStore(str, bool) | ||||
|  |  | |||
|  | @ -465,7 +465,7 @@ class Interface: | |||
| 			if len(u.groups) == 0: | ||||
| 				u.groups = [_('General')] | ||||
| 			self.roster.add_contact_to_roster(u.jid, account) | ||||
| 			gajim.connections[account].update_user(u.jid, u.name, u.groups) | ||||
| 			gajim.connections[account].update_contact(u.jid, u.name, u.groups) | ||||
| 		else: | ||||
| 			keyID = '' | ||||
| 			attached_keys = gajim.config.get_per('accounts', account, | ||||
|  |  | |||
|  | @ -1601,8 +1601,8 @@ _('If "%s" accepts this request you will know his status.') %jid).get_response() | |||
| 		pass | ||||
| 
 | ||||
| 	def on_cell_edited(self, cell, row, new_text): | ||||
| 		'''When an iter is editer : | ||||
| 		if text has changed, rename the user''' | ||||
| 		'''When an iter is edited: | ||||
| 		if text has changed, rename the contact''' | ||||
| 		model = self.tree.get_model() | ||||
| 		iter = model.get_iter_from_string(row) | ||||
| 		path = model.get_path(iter) | ||||
|  | @ -1614,7 +1614,7 @@ _('If "%s" accepts this request you will know his status.') %jid).get_response() | |||
| 			if old_text != new_text: | ||||
| 				for u in self.contacts[account][jid]: | ||||
| 					u.name = new_text | ||||
| 				gajim.connections[account].update_user(jid, new_text, u.groups) | ||||
| 				gajim.connections[account].update_contact(jid, new_text, u.groups) | ||||
| 			self.draw_contact(jid, account) | ||||
| 		elif type == 'group': | ||||
| 			old_name = model.get_value(iter, 1) | ||||
|  | @ -1627,7 +1627,7 @@ _('If "%s" accepts this request you will know his status.') %jid).get_response() | |||
| 					user.groups.remove(old_name) | ||||
| 					user.groups.append(new_text) | ||||
| 					self.add_contact_to_roster(user.jid, account) | ||||
| 					gajim.connections[account].update_user(user.jid, user.name,  | ||||
| 					gajim.connections[account].update_contact(user.jid, user.name,  | ||||
| 																		user.groups) | ||||
| 		model.set_value(iter, 5, False) | ||||
| 		 | ||||
|  | @ -1912,7 +1912,7 @@ _('If "%s" accepts this request you will know his status.') %jid).get_response() | |||
| 		if not grp_dest in u.groups: | ||||
| 			u.groups.append(grp_dest) | ||||
| 			self.add_contact_to_roster(data, account) | ||||
| 		gajim.connections[account].update_user(u.jid, u.name, u.groups) | ||||
| 		gajim.connections[account].update_contact(u.jid, u.name, u.groups) | ||||
| 		if context.action == gtk.gdk.ACTION_MOVE: | ||||
| 			context.finish(True, True, etime) | ||||
| 		return | ||||
|  |  | |||
|  | @ -86,7 +86,7 @@ class VcardWindow: | |||
| 			self.user.name = new_name | ||||
| 			for i in self.plugin.roster.get_contact_iter(self.user.jid, self.account): | ||||
| 				self.plugin.roster.tree.get_model().set_value(i, 1, new_name) | ||||
| 			gajim.connections[self.account].update_user(self.user.jid, | ||||
| 			gajim.connections[self.account].update_contact(self.user.jid, | ||||
| 				self.user.name, self.user.groups) | ||||
| 		#log history ? | ||||
| 		oldlog = True | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue