mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-10-30 10:12: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() | ||||
|         event_id = '' | ||||
|         timeout, body, summary = self.get_msg_parms(timeout, body, summary) | ||||
|         self._notify.Notify('calibre', replaces_id, event_id, self.ICON, summary, body, | ||||
|         try: | ||||
|             self._notify.Notify('calibre', replaces_id, event_id, self.ICON, summary, body, | ||||
|                 self.dbus.Array(signature='s'), self.dbus.Dictionary(signature='sv'), | ||||
|                 timeout) | ||||
|         except: | ||||
|             import traceback | ||||
|             traceback.print_exc() | ||||
| 
 | ||||
| class FDONotifier(DBUSNotifier): | ||||
| 
 | ||||
| @ -64,9 +68,13 @@ class FDONotifier(DBUSNotifier): | ||||
|         if replaces_id is None: | ||||
|             replaces_id = self.dbus.UInt32() | ||||
|         timeout, body, summary = self.get_msg_parms(timeout, body, summary) | ||||
|         self._notify.Notify('calibre', replaces_id, self.ICON, summary, body, | ||||
|         try: | ||||
|             self._notify.Notify('calibre', replaces_id, self.ICON, summary, body, | ||||
|                 self.dbus.Array(signature='s'), self.dbus.Dictionary(signature='sv'), | ||||
|                 timeout) | ||||
|         except: | ||||
|             import traceback | ||||
|             traceback.print_exc() | ||||
| 
 | ||||
| class QtNotifier(Notifier): | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user