mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 981146 - Make a dbus-based notification appear when the build completes (if the build took >300s, a pre-existing limit) on some Linux systems. (Works on Fedora, doesn't work on Debian/Ubuntu -- just needs someone to perform the trivial work [if you run Debian] of determining what packages are needed to make this patch's additions work. Patches welcome!) r=gps
--HG-- extra : rebase_source : 0e37b98ad2481df7bae906d5c67ecd94a22fabda
This commit is contained in:
parent
c725f3de8b
commit
05c3bd3642
@ -25,6 +25,7 @@ class DebianBootstrapper(BaseBootstrapper):
|
||||
'libxt-dev',
|
||||
'mercurial',
|
||||
'mesa-common-dev',
|
||||
'python-dbus',
|
||||
'python-dev',
|
||||
'python-setuptools',
|
||||
'unzip',
|
||||
|
@ -403,7 +403,19 @@ class Build(MachCommandBase):
|
||||
self.run_process([notifier, '-title',
|
||||
'Mozilla Build System', '-group', 'mozbuild',
|
||||
'-message', 'Build complete'], ensure_exit_code=False)
|
||||
except which.WhichError:
|
||||
elif sys.platform.startswith('linux'):
|
||||
try:
|
||||
import dbus
|
||||
bus = dbus.SessionBus()
|
||||
notify = bus.get_object('org.freedesktop.Notifications',
|
||||
'/org/freedesktop/Notifications')
|
||||
method = notify.get_dbus_method('Notify',
|
||||
'org.freedesktop.Notifications')
|
||||
method('Mozilla Build System', 0, '', 'Build complete', '', [], [], -1)
|
||||
except (dbus.exceptions.DBusException, ImportError):
|
||||
pass
|
||||
|
||||
except (which.WhichError, ImportError):
|
||||
pass
|
||||
except Exception as e:
|
||||
self.log(logging.WARNING, 'notifier-failed', {'error':
|
||||
|
Loading…
Reference in New Issue
Block a user