Hi everyone, I noticed, that no notification is displayed, if the applet is disabled by the gsettings.
How to reproduce:
1. Start nm-applet, if it isn't already
2. Make sure, that you get a notification, when interacting with
NetworkManager (e.g. connecting to a network)
3. Execute gsettings set org.gnome.nm-applet show-applet 'false'
4. Interact with NetworkManager (e.g. through nmtui) to repeat the
steps in 1.
5. Notice, that there is no notification shown
What I expected:
As the option only says "show-applet", we should still see the
notifications.
Solution?
I had a look at the source and with this diff I could produce the
expected behavior:
diff --git a/src/applet.c b/src/applet.c
index 81e2ac5..7d411c7 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -884,9 +884,6 @@ applet_do_notify (NMApplet *applet,
g_return_if_fail (summary != NULL);
g_return_if_fail (message != NULL);
- if (!gtk_status_icon_is_embedded (applet->status_icon))
- return;
-
/* if we're not acting as a secret agent, don't notify either */
if (!applet->agent)
return;
It is running on my system right now, but I don't know if this breaks
anything else.
The originating commit b74deac92d8192591ddbb62f2e2b1b7101a5e95d doesn't
say why the notification shouldn't be shown, if the applet isn't
visible. But in my opinion it doesn't make sense to not show the
notification, only because the applet isn't shown. Additionally we now
have the gsettings to control what should be shown, which wasn't the
case when this commit was made, as far as I can tell.
Please excuse any formal mistakes I made, as it is my first time using a
mailing list.
Hendrik
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ networkmanager-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/networkmanager-list
