removed is_initial in 'enable_dbus'
This commit is contained in:
		
							parent
							
								
									0314a99347
								
							
						
					
					
						commit
						c503bb7227
					
				
					 1 changed files with 3 additions and 10 deletions
				
			
		
							
								
								
									
										11
									
								
								src/gajim.py
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								src/gajim.py
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -859,23 +859,16 @@ class Interface:
 | 
			
		|||
	def save_config(self):
 | 
			
		||||
		parser.write()
 | 
			
		||||
 | 
			
		||||
	def enable_dbus(self, is_initial = False):
 | 
			
		||||
	def enable_dbus(self):
 | 
			
		||||
		if 'remote_control' not in globals():
 | 
			
		||||
			import remote_control
 | 
			
		||||
		if not hasattr(self, 'remote') or not self.remote:
 | 
			
		||||
			try:
 | 
			
		||||
				self.remote = remote_control.Remote(self)
 | 
			
		||||
			except remote_control.DbusNotSupported:
 | 
			
		||||
				if not is_initial: # show only the first time
 | 
			
		||||
					dialog = dialogs.ErrorDialog(
 | 
			
		||||
					_('D-Bus is not present on this machine'),
 | 
			
		||||
_('Please install D-Bus if you want to use remote control.')).get_response()
 | 
			
		||||
				self.remote = None
 | 
			
		||||
				return False
 | 
			
		||||
			except remote_control.SessionBusNotPresent:
 | 
			
		||||
				if not is_initial: # show only the first time
 | 
			
		||||
					dialog = dialogs.ErrorDialog(_('Session bus is not started'),
 | 
			
		||||
_('Your system is running without session bus daemon. \n See: http://trac.gajim.org/wiki/GajimDBus for instructions on how to enable it.')).get_response()
 | 
			
		||||
				self.remote = None
 | 
			
		||||
				return False
 | 
			
		||||
		else:
 | 
			
		||||
| 
						 | 
				
			
			@ -949,7 +942,7 @@ _('Your system is running without session bus daemon. \n See: http://trac.gajim.
 | 
			
		|||
 | 
			
		||||
		self.roster = roster_window.RosterWindow(self)
 | 
			
		||||
		if gajim.config.get('use_dbus'):
 | 
			
		||||
			self.enable_dbus(True)
 | 
			
		||||
			self.enable_dbus()
 | 
			
		||||
		else:
 | 
			
		||||
			self.disable_dbus()
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue