mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-10-30 18:22:25 -04:00 
			
		
		
		
	Linux systray notifications: Ignore DBUS errors when sending notifications
This commit is contained in:
		
							parent
							
								
									d2bbfc22c6
								
							
						
					
					
						commit
						153f902099
					
				| @ -50,9 +50,13 @@ class KDENotifier(DBUSNotifier): | |||||||
|             replaces_id = self.dbus.UInt32() |             replaces_id = self.dbus.UInt32() | ||||||
|         event_id = '' |         event_id = '' | ||||||
|         timeout, body, summary = self.get_msg_parms(timeout, body, summary) |         timeout, body, summary = self.get_msg_parms(timeout, body, summary) | ||||||
|  |         try: | ||||||
|             self._notify.Notify('calibre', replaces_id, event_id, self.ICON, summary, body, |             self._notify.Notify('calibre', replaces_id, event_id, self.ICON, summary, body, | ||||||
|                 self.dbus.Array(signature='s'), self.dbus.Dictionary(signature='sv'), |                 self.dbus.Array(signature='s'), self.dbus.Dictionary(signature='sv'), | ||||||
|                 timeout) |                 timeout) | ||||||
|  |         except: | ||||||
|  |             import traceback | ||||||
|  |             traceback.print_exc() | ||||||
| 
 | 
 | ||||||
| class FDONotifier(DBUSNotifier): | class FDONotifier(DBUSNotifier): | ||||||
| 
 | 
 | ||||||
| @ -64,9 +68,13 @@ class FDONotifier(DBUSNotifier): | |||||||
|         if replaces_id is None: |         if replaces_id is None: | ||||||
|             replaces_id = self.dbus.UInt32() |             replaces_id = self.dbus.UInt32() | ||||||
|         timeout, body, summary = self.get_msg_parms(timeout, body, summary) |         timeout, body, summary = self.get_msg_parms(timeout, body, summary) | ||||||
|  |         try: | ||||||
|             self._notify.Notify('calibre', replaces_id, self.ICON, summary, body, |             self._notify.Notify('calibre', replaces_id, self.ICON, summary, body, | ||||||
|                 self.dbus.Array(signature='s'), self.dbus.Dictionary(signature='sv'), |                 self.dbus.Array(signature='s'), self.dbus.Dictionary(signature='sv'), | ||||||
|                 timeout) |                 timeout) | ||||||
|  |         except: | ||||||
|  |             import traceback | ||||||
|  |             traceback.print_exc() | ||||||
| 
 | 
 | ||||||
| class QtNotifier(Notifier): | class QtNotifier(Notifier): | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user