the network manager widget in the panel shows a status icon (wireless connected, connection strenght, or ethernet connected, or wwan, or disconnected), however when i add a system tray widget to the desktop the network manager widget inside shows only as the blue NM icon. Reproducible: Always Steps to Reproduce: 1. add widget 'system tray' to the desktop Actual Results: 2. observe that the network manager in the system tray shows as blue NM icon Expected Results: 2. the network manager in the system tray should display the same icon as network manager in the panel (and network manager inside a system tray in a panel)
Unfortunately currently there is no way to fix this problem without causing a regression where the plasmoid on the desktop would look like the tray icon. The systray widget is not supposed to be used outside a panel and since this is a rare case I do not think it is worth implementating.
I intended to remove the panel altogether - given plasmas awsomeness of: everything is a widget and can go everywhere - this is almost possible. Only the network status icon can seemingly only be shown in the panel. NM widget on the desktop directly is the folded-out version and NM widget in a systray on the desktop is the blue NM icon. But, yes it may be a rare case. Thanks for your explanation, though.
Lamarque, I'm not sure I understand: the network manager widget is an ordinary PopupApplet, and surely it can show the representation in the systray also elsewhere. I'm not sure I understand your comment, the reasoning behind it, or the bug itself entirely, since "it should just not happen", however...
It can, the problem is how to detect if Plasma NM should be shown as an icon or popped up. I am using containment()->containmentType() for that. If it returns Plasma::Containment::PanelContainment or Plasma::Containment::CustomPanelContainment then the Plasma NM will be an icon, if not then it will be shown popped up. Systray widget is not a panel containment, so Plasma NM is shown popped up. If someone change systray widget containment type to Plasma::Containment::PanelContainment then this bug can be fixed.
Ah, that's wrong then. Don't check the containment type, but set a minimum size on the graphicsWidget(), this will take care of collapsing and expanding the widget, without any containment-specific hacks.
Created attachment 74780 [details] Plasma NM without panel containment workaround (In reply to comment #5) > Ah, that's wrong then. Don't check the containment type, but set a minimum > size on the graphicsWidget(), this will take care of collapsing and > expanding the widget, without any containment-specific hacks. Well, I did that long time ago and I remember at least with problem with it: the popup background is transparent when the applet is not in a panel containment. I have just tested it and it still happens if I remove the check for panel containment (see attached screenshot).
Hmmm I guess I can let the systray icon be updated even when not in a panel containment. That should fix this bug and do not add a regression about the problem I described above.
Git commit e276f04f438773361fda03e3dc8f4c125d396431 by Lamarque V. Souza. Committed on 24/10/2012 at 18:49. Pushed by lvsouza into branch 'master'. Update systray icon even when not in a panel containment. This is usefull when using systray widget outside a panel. FIXED-IN: 0.9.0.6 M +0 -1 applet/networkmanager.cpp M +1 -1 plasma_nm_version.h http://commits.kde.org/networkmanagement/e276f04f438773361fda03e3dc8f4c125d396431
Git commit fde7dc426d59d8981101a5cc2f6cdd794709f3aa by Lamarque V. Souza. Committed on 24/10/2012 at 18:49. Pushed by lvsouza into branch 'nm09'. Update systray icon even when not in a panel containment. This is usefull when using systray widget outside a panel. FIXED-IN: 0.9.0.6 M +0 -1 applet/networkmanager.cpp M +1 -1 plasma_nm_version.h http://commits.kde.org/networkmanagement/fde7dc426d59d8981101a5cc2f6cdd794709f3aa