Dont test for sys.platform == 'linux'
This excludes other unix systems which was not intended
This commit is contained in:
		
							parent
							
								
									02a9615b94
								
							
						
					
					
						commit
						e4a9ffe1ca
					
				
					 4 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
					@ -36,7 +36,7 @@ try:
 | 
				
			||||||
    DBusGMainLoop(set_as_default=True)
 | 
					    DBusGMainLoop(set_as_default=True)
 | 
				
			||||||
except ImportError:
 | 
					except ImportError:
 | 
				
			||||||
    supported = False
 | 
					    supported = False
 | 
				
			||||||
    if sys.platform == 'linux':  # windows and mac have no dbus
 | 
					    if sys.platform not in ('win32', 'darwin'):
 | 
				
			||||||
        print(_('D-Bus python bindings are missing in this computer'))
 | 
					        print(_('D-Bus python bindings are missing in this computer'))
 | 
				
			||||||
        print(_('D-Bus capabilities of Gajim cannot be used'))
 | 
					        print(_('D-Bus capabilities of Gajim cannot be used'))
 | 
				
			||||||
else:
 | 
					else:
 | 
				
			||||||
| 
						 | 
					@ -47,7 +47,7 @@ else:
 | 
				
			||||||
        supported = True # does user have D-Bus bindings?
 | 
					        supported = True # does user have D-Bus bindings?
 | 
				
			||||||
    except dbus.DBusException:
 | 
					    except dbus.DBusException:
 | 
				
			||||||
        supported = False
 | 
					        supported = False
 | 
				
			||||||
        if sys.platform == 'linux':  # windows and mac have no dbus
 | 
					        if sys.platform not in ('win32', 'darwin'):
 | 
				
			||||||
            print(_('D-Bus does not run correctly on this machine'))
 | 
					            print(_('D-Bus does not run correctly on this machine'))
 | 
				
			||||||
            print(_('D-Bus capabilities of Gajim cannot be used'))
 | 
					            print(_('D-Bus capabilities of Gajim cannot be used'))
 | 
				
			||||||
    except exceptions.SystemBusNotPresent:
 | 
					    except exceptions.SystemBusNotPresent:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1106,7 +1106,7 @@ class Interface:
 | 
				
			||||||
        if connected == invisible_show:
 | 
					        if connected == invisible_show:
 | 
				
			||||||
            return
 | 
					            return
 | 
				
			||||||
        # send currently played music
 | 
					        # send currently played music
 | 
				
			||||||
        if (pep_supported and sys.platform == 'linux' and
 | 
					        if (pep_supported and sys.platform not in ('win32', 'darwin') and
 | 
				
			||||||
                app.config.get_per('accounts', account, 'publish_tune')):
 | 
					                app.config.get_per('accounts', account, 'publish_tune')):
 | 
				
			||||||
            self.enable_music_listener()
 | 
					            self.enable_music_listener()
 | 
				
			||||||
        # enable location listener
 | 
					        # enable location listener
 | 
				
			||||||
| 
						 | 
					@ -2683,7 +2683,7 @@ class Interface:
 | 
				
			||||||
        self.remote_ctrl = None
 | 
					        self.remote_ctrl = None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Handle screensaver
 | 
					        # Handle screensaver
 | 
				
			||||||
        if sys.platform == 'linux':
 | 
					        if sys.platform not in ('win32', 'darwin'):
 | 
				
			||||||
            logind.enable()
 | 
					            logind.enable()
 | 
				
			||||||
            screensaver.enable()
 | 
					            screensaver.enable()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -82,7 +82,7 @@ class Notification:
 | 
				
			||||||
        self.daemon_capabilities = ['actions']
 | 
					        self.daemon_capabilities = ['actions']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Detect if actions are supported by the notification daemon
 | 
					        # Detect if actions are supported by the notification daemon
 | 
				
			||||||
        if sys.platform == 'linux':
 | 
					        if sys.platform not in ('win32', 'darwin'):
 | 
				
			||||||
            def on_proxy_ready(source, res, data=None):
 | 
					            def on_proxy_ready(source, res, data=None):
 | 
				
			||||||
                try:
 | 
					                try:
 | 
				
			||||||
                    proxy = Gio.DBusProxy.new_finish(res)
 | 
					                    proxy = Gio.DBusProxy.new_finish(res)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4962,7 +4962,7 @@ class RosterWindow:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                item = Gtk.CheckMenuItem(_('Publish Tune'))
 | 
					                item = Gtk.CheckMenuItem(_('Publish Tune'))
 | 
				
			||||||
                pep_submenu.append(item)
 | 
					                pep_submenu.append(item)
 | 
				
			||||||
                if sys.platform != 'linux':
 | 
					                if sys.platform in ('win32', 'darwin'):
 | 
				
			||||||
                    item.set_sensitive(False)
 | 
					                    item.set_sensitive(False)
 | 
				
			||||||
                else:
 | 
					                else:
 | 
				
			||||||
                    activ = app.config.get_per('accounts', account,
 | 
					                    activ = app.config.get_per('accounts', account,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue