Prevent a tb when trying to remove a group. Fix #4275.
This commit is contained in:
		
							parent
							
								
									c335a96199
								
							
						
					
					
						commit
						8c4eddebef
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
					@ -2700,10 +2700,6 @@ class RosterWindow:
 | 
				
			||||||
			on_canceled)
 | 
								on_canceled)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	def on_remove_group_item_activated(self, widget, group, account):
 | 
						def on_remove_group_item_activated(self, widget, group, account):
 | 
				
			||||||
		dialogs.ConfirmationDialogCheck(_('Remove Group'),
 | 
					 | 
				
			||||||
			_('Do you want to remove group %s from the roster?' % group),
 | 
					 | 
				
			||||||
			_('Remove also all contacts in this group from your roster'),
 | 
					 | 
				
			||||||
			on_response_ok=on_ok)
 | 
					 | 
				
			||||||
		def on_ok(checked):
 | 
							def on_ok(checked):
 | 
				
			||||||
			for contact in gajim.contacts.get_contacts_from_group(account, group):
 | 
								for contact in gajim.contacts.get_contacts_from_group(account, group):
 | 
				
			||||||
				if not checked:
 | 
									if not checked:
 | 
				
			||||||
| 
						 | 
					@ -2711,6 +2707,10 @@ class RosterWindow:
 | 
				
			||||||
				else:
 | 
									else:
 | 
				
			||||||
					gajim.connections[account].unsubscribe(contact.jid)
 | 
										gajim.connections[account].unsubscribe(contact.jid)
 | 
				
			||||||
					self.remove_contact(contact.jid, account, backend=True)
 | 
										self.remove_contact(contact.jid, account, backend=True)
 | 
				
			||||||
 | 
							dialogs.ConfirmationDialogCheck(_('Remove Group'),
 | 
				
			||||||
 | 
								_('Do you want to remove group %s from the roster?' % group),
 | 
				
			||||||
 | 
								_('Remove also all contacts in this group from your roster'),
 | 
				
			||||||
 | 
								on_response_ok=on_ok)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	def on_assign_pgp_key(self, widget, contact, account):
 | 
						def on_assign_pgp_key(self, widget, contact, account):
 | 
				
			||||||
		attached_keys = gajim.config.get_per('accounts', account,
 | 
							attached_keys = gajim.config.get_per('accounts', account,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue