mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Auto merge of #7824 - mrobinson:transient-notifications, r=glennw
Make Linux build notifications transient Continuous non-transient notifications, common in workflows involving many syntax errors, can completely take over the message tray. Making Linux build notifications transient prevents them from stacking up in Gnome Shell without having to click them individually. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7824) <!-- Reviewable:end -->
This commit is contained in:
commit
03f6415eb4
1 changed files with 1 additions and 1 deletions
|
@ -35,7 +35,7 @@ def notify_linux(title, text):
|
||||||
bus = dbus.SessionBus()
|
bus = dbus.SessionBus()
|
||||||
notify_obj = bus.get_object("org.freedesktop.Notifications", "/org/freedesktop/Notifications")
|
notify_obj = bus.get_object("org.freedesktop.Notifications", "/org/freedesktop/Notifications")
|
||||||
method = notify_obj.get_dbus_method("Notify", "org.freedesktop.Notifications")
|
method = notify_obj.get_dbus_method("Notify", "org.freedesktop.Notifications")
|
||||||
method(title, 0, "", text, "", [], [], -1)
|
method(title, 0, "", text, "", [], {"transient": True}, -1)
|
||||||
except:
|
except:
|
||||||
raise Exception("Please make sure that the Python dbus module is installed!")
|
raise Exception("Please make sure that the Python dbus module is installed!")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue