From e4a9ffe1caac4480ee8b49526793c3c486654333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Sat, 10 Nov 2018 19:28:31 +0100 Subject: [PATCH] Dont test for sys.platform == 'linux' This excludes other unix systems which was not intended --- gajim/common/dbus_support.py | 4 ++-- gajim/gui_interface.py | 4 ++-- gajim/notify.py | 2 +- gajim/roster_window.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gajim/common/dbus_support.py b/gajim/common/dbus_support.py index b8d4d26b2..dc4c4e06d 100644 --- a/gajim/common/dbus_support.py +++ b/gajim/common/dbus_support.py @@ -36,7 +36,7 @@ try: DBusGMainLoop(set_as_default=True) except ImportError: 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 capabilities of Gajim cannot be used')) else: @@ -47,7 +47,7 @@ else: supported = True # does user have D-Bus bindings? except dbus.DBusException: 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 capabilities of Gajim cannot be used')) except exceptions.SystemBusNotPresent: diff --git a/gajim/gui_interface.py b/gajim/gui_interface.py index c59af7af4..3df5f8684 100644 --- a/gajim/gui_interface.py +++ b/gajim/gui_interface.py @@ -1106,7 +1106,7 @@ class Interface: if connected == invisible_show: return # 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')): self.enable_music_listener() # enable location listener @@ -2683,7 +2683,7 @@ class Interface: self.remote_ctrl = None # Handle screensaver - if sys.platform == 'linux': + if sys.platform not in ('win32', 'darwin'): logind.enable() screensaver.enable() diff --git a/gajim/notify.py b/gajim/notify.py index 4baa899d5..8ca8f7e97 100644 --- a/gajim/notify.py +++ b/gajim/notify.py @@ -82,7 +82,7 @@ class Notification: self.daemon_capabilities = ['actions'] # 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): try: proxy = Gio.DBusProxy.new_finish(res) diff --git a/gajim/roster_window.py b/gajim/roster_window.py index 01ec78749..b4d3f3914 100644 --- a/gajim/roster_window.py +++ b/gajim/roster_window.py @@ -4962,7 +4962,7 @@ class RosterWindow: item = Gtk.CheckMenuItem(_('Publish Tune')) pep_submenu.append(item) - if sys.platform != 'linux': + if sys.platform in ('win32', 'darwin'): item.set_sensitive(False) else: activ = app.config.get_per('accounts', account,