fix some bugs with self contact row
This commit is contained in:
		
							parent
							
								
									1f93e36844
								
							
						
					
					
						commit
						fd5294bd21
					
				
					 1 changed files with 12 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -1333,12 +1333,6 @@ class RosterWindow:
 | 
			
		|||
		remove_from_roster_menuitem = xml.get_widget(
 | 
			
		||||
			'remove_from_roster_menuitem')
 | 
			
		||||
 | 
			
		||||
		if our_jid:
 | 
			
		||||
			for menuitem in (rename_menuitem, edit_groups_menuitem,
 | 
			
		||||
			above_subscription_separator, subscription_menuitem,
 | 
			
		||||
			remove_from_roster_menuitem):
 | 
			
		||||
				menuitem.set_no_show_all(True)
 | 
			
		||||
				menuitem.hide()
 | 
			
		||||
		# skip a separator
 | 
			
		||||
		information_menuitem = xml.get_widget('information_menuitem')
 | 
			
		||||
		history_menuitem = xml.get_widget('history_menuitem')
 | 
			
		||||
| 
						 | 
				
			
			@ -1443,6 +1437,14 @@ class RosterWindow:
 | 
			
		|||
			add_to_roster_menuitem.connect('activate',
 | 
			
		||||
				self.on_add_to_roster, contact, account)
 | 
			
		||||
 | 
			
		||||
		# Remove many items when it's self contact row
 | 
			
		||||
		if our_jid:
 | 
			
		||||
			for menuitem in (rename_menuitem, edit_groups_menuitem,
 | 
			
		||||
			above_subscription_separator, subscription_menuitem,
 | 
			
		||||
			remove_from_roster_menuitem):
 | 
			
		||||
				menuitem.set_no_show_all(True)
 | 
			
		||||
				menuitem.hide()
 | 
			
		||||
 | 
			
		||||
		# Unsensitive many items when account is offline
 | 
			
		||||
		if gajim.connections[account].connected < 2:
 | 
			
		||||
			for widget in [start_chat_menuitem, send_single_message_menuitem,
 | 
			
		||||
| 
						 | 
				
			
			@ -3206,6 +3208,10 @@ _('If "%s" accepts this request you will know his or her status.') % jid)
 | 
			
		|||
		if gajim.connections[account_dest].connected < 2:
 | 
			
		||||
			return
 | 
			
		||||
 | 
			
		||||
		# drop on self contact row
 | 
			
		||||
		if type_dest == 'self_contact':
 | 
			
		||||
			return
 | 
			
		||||
 | 
			
		||||
		if info == self.TARGET_TYPE_URI_LIST:
 | 
			
		||||
			# User dropped a file on the roster
 | 
			
		||||
			if len(path_dest) < 3:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue