Some users don't want their status to be restored. Make it an option.
This commit is contained in:
		
							parent
							
								
									01dc17d825
								
							
						
					
					
						commit
						dc8b56c9ed
					
				
					 2 changed files with 11 additions and 6 deletions
				
			
		| 
						 | 
					@ -274,6 +274,7 @@ class Config:
 | 
				
			||||||
			'autopriority_dnd': [ opt_int, 20],
 | 
								'autopriority_dnd': [ opt_int, 20],
 | 
				
			||||||
			'autopriority_invisible': [ opt_int, 10],
 | 
								'autopriority_invisible': [ opt_int, 10],
 | 
				
			||||||
			'autoconnect': [ opt_bool, False, '', True ],
 | 
								'autoconnect': [ opt_bool, False, '', True ],
 | 
				
			||||||
 | 
								'dont_restore_last_status': [ opt_bool, False, _('If enabled, don\'t restore the last status that was used.') ],
 | 
				
			||||||
			'autoreconnect': [ opt_bool, True ],
 | 
								'autoreconnect': [ opt_bool, True ],
 | 
				
			||||||
			'active': [ opt_bool, True],
 | 
								'active': [ opt_bool, True],
 | 
				
			||||||
			'proxy': [ opt_str, '', '', True ],
 | 
								'proxy': [ opt_str, '', '', True ],
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										12
									
								
								src/gajim.py
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								src/gajim.py
									
										
									
									
									
								
							| 
						 | 
					@ -2777,12 +2777,16 @@ class Interface:
 | 
				
			||||||
		# dict of account that want to connect sorted by status
 | 
							# dict of account that want to connect sorted by status
 | 
				
			||||||
		for a in gajim.connections:
 | 
							for a in gajim.connections:
 | 
				
			||||||
			if gajim.config.get_per('accounts', a, 'autoconnect'):
 | 
								if gajim.config.get_per('accounts', a, 'autoconnect'):
 | 
				
			||||||
 | 
									if not gajim.config.get_per('accounts', a,
 | 
				
			||||||
 | 
									'dont_restore_last_status'):
 | 
				
			||||||
					self.roster.send_status(a,
 | 
										self.roster.send_status(a,
 | 
				
			||||||
					gajim.config.get_per('accounts', a, 
 | 
											gajim.config.get_per('accounts',
 | 
				
			||||||
					'last_status'),
 | 
											a, 'last_status'),
 | 
				
			||||||
						helpers.from_one_line(
 | 
											helpers.from_one_line(
 | 
				
			||||||
					gajim.config.get_per('accounts', a,
 | 
											gajim.config.get_per('accounts',
 | 
				
			||||||
					'last_status_msg')))
 | 
											a, 'last_status_msg')))
 | 
				
			||||||
 | 
									else:
 | 
				
			||||||
 | 
										self.roster.send_status(a, 'online', '')
 | 
				
			||||||
		return False
 | 
							return False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	def show_systray(self):
 | 
						def show_systray(self):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue