StatusNotifier 1.0 adds support for DBus Menu, which lets us pass the GtkMenu object to the DE via DBus and let the DE display the menu natively. This means that mgaapplet and net_applet do not have to manage this themselves anymore, and their menu will be visually identical to other menus from other apps, for a better integration with the DE. Moreover, this also means a much lower virtual memory usage. In my testing with a simple script, the virtual memory usage is 300 MB lower (500 MB instead of 800 MB). The resident memory is only 5-10 MB lower (~45 MB instead of 55 MB). I will also edit the code a bit to only load StatusNotifier if SNI is supported, i.e. on Plasma only for now. I will work on topic/systray again as we must sync their release with StatusNotifier 1.0 (my new code won't work with the current StatusNotifier 0.1 currently in Cauldron).
The maintainer of StatusNotifier just told me that 1.0 should be released this week-end if nothing goes wrong meanwhile. :)
URL: https://github.com/jjk-jacky/statusnotifier/tree/introspection => https://github.com/jjk-jacky/statusnotifier/tree/next
CC: (none) => thierry.vignaud
1.0.0 released a few hours ago: https://github.com/jjk-jacky/statusnotifier/releases/tag/1.0.0
URL: https://github.com/jjk-jacky/statusnotifier/tree/next => https://github.com/jjk-jacky/statusnotifier/releases/tag/1.0.0
Created attachment 9069 [details] Use DBus Menu from mgaapplet Here is the patch for mgaapplet. It requires StatusNotifier 1.0. Some stats, for comparison, after a right-click on the status icon: StatusNotifier without DBus Menu: VIRT 922 MB RES 98.1 MB SHR 35.9 MB StatusNotifier with DBus Menu: (without displaying the About dialog) VIRT 637 MB RES 91.1 MB SHR 29.6 MB GtkStatusIcon: VIRT 918 MB RES 99.6 MB SHR 36.4 MB
Created attachment 9070 [details] Use DBus Menu from net_applet And here is the patch for net_applet. It also requires StatusNotifier 1.0. Some more stats, after a right-click on the status icon: StatusNotifier without DBus Menu: VIRT 902 MB RES 84.3 MB SHR 30.0 MB StatusNotifier with DBus Menu: VIRT 546 MB RES 77.6 MB SHR 24.3 MB GtkStatusIcon: VIRT 824 MB RES 84.5 MB SHR 30.4 MB
Note that both patches are incompatible with the version of StatusNotifier currently in Cauldron (0.1). They both require 1.0, but compiled with the ./configure --enable-introspection=yes --enable-dbusmenu --enable-gtk-doc command, else DBus Menu won't be enabled. Also note the new --enable-introspection=yes argument which will let you clean the spec a bit. Also, the current mgaapplet and net_applet scripts in Cauldron won't work with StatusNotifier 1.0, so conflicts in the RPM spec files must be set accordingly. Please do not forget to include the fix for bug 20434 before pushing new RPMs. The dependency should ideally be put in a place where we don't need to worry about it again.
CC: (none) => mageia, rverscheldeWhiteboard: (none) => Must be pushed at the same time as StatusNotifier 1.0 (not backward compatible)
For some reason, the right-click doesn't trigger anything on a clean reboot. It looks like the DBus Menu is not working if net_applet is launched too early. Still investigating. Do not commit anything yet, please.
Status comment: (none) => Not ready for checkin, see comment 6!
maybe you can do a branch in git this will be simpler and will be merged when ready ;)
(In reply to Nicolas Lécureuil from comment #7) > maybe you can do a branch in git this will be simpler and will be merged > when ready ;) Nan, this won't help me find the problem. :)
Depends on: (none) => 20459
(In reply to Frédéric Buclin from comment #6) > For some reason, the right-click doesn't trigger anything on a clean reboot. > It looks like the DBus Menu is not working if net_applet is launched too > early. Still investigating. If I put a sleep(3) early in net_applet, then things are working fine. I wonder if there is some latency with something else (what?) which is not ready yet when net_applet is called.
Created attachment 9084 [details] Use DBus Menu from net_applet, v2 With a timer, things are working fine on my machine. I kept the code for the context_menu signal, just in case there is something wrong with DBusMenu. I will check if mgaapplet needs the same fix or not.
Attachment 9070 is obsolete: 0 => 1
Created attachment 9085 [details] Use DBus Menu from net_applet, v2 (rebased due to the release of 2.29)
Attachment 9084 is obsolete: 0 => 1
Looks like mgaapplet doesn't need this fix, so we are good to go. :)
commit 8baa7d8813dee41c9150ddb0a8139c8895cb1b93 Author: Frédéric Buclin <LpSolit@...> Date: Sat Mar 11 19:52:30 2017 +0100 Use DBus Menu + StatusNotifier 1.0 (mga#20410) --- Commit Link: http://gitweb.mageia.org/software/drakx-net/commit/?id=8baa7d8813dee41c9150ddb0a8139c8895cb1b93
commit 74fafa20c2a11d9c59db1016342eca1d240d7ce7 Author: Frédéric Buclin <LpSolit@...> Date: Sat Mar 11 19:45:14 2017 +0100 Use DBus Menu + StatusNotifier 1.0 (mga#20410) --- Commit Link: http://gitweb.mageia.org/software/mgaonline/commit/?id=74fafa20c2a11d9c59db1016342eca1d240d7ce7
Released and submitted drakx-net 2.30 and mgaonline 3.20, to go with statusnotifier 1.0.0.
Status comment: Not ready for checkin, see comment 6! => (none)Status: ASSIGNED => RESOLVEDResolution: (none) => FIXED