Bug 365618 - system tray entries does not get removed after disabling them while the widgets are locked
Summary: system tray entries does not get removed after disabling them while the widge...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Tray widget (show other bugs)
Version: 5.7.3
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-13 16:07 UTC by Till Schäfer
Modified: 2016-09-20 13:04 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Till Schäfer 2016-07-13 16:07:24 UTC
disabled system tray entries are not directly removed from the system tray. instead they stay there until the system tray is reloaded (e.g. system reboot, logout/login)

Reproducible: Always

Steps to Reproduce:
activated an extra item (e.g. weather widget) in system tray settings and apply the settings. After this re-enter the settings and disable the item. 

Actual Results:  
the disabled item remains in the system tray

Expected Results:  
it should be removed
Comment 1 Marco Martin 2016-08-16 12:13:17 UTC
are widgets locked?
Comment 2 Till Schäfer 2016-08-17 13:32:16 UTC
you are right: the condition to trigger this bug is that the widgets are locked

Nevertheless the behavior is not consistent in several ways: 
- it is possible to add a new entry, while the widgets are locked, but it is not possible to remove the entry afterwards
- the configuration dialog is not aware of the widget locking, i.e. it allows a modification while the widgets are locked.
- usually, the locking only affects the widgets placement and not the widgets configuration (e.g. the folder view still allows the configuration of the folder path, etc)

=> I still think it should be fixed in the way, that the entry gets removed, even in the locked stat
Comment 3 avlas 2016-09-17 06:33:24 UTC
Also, if entries to the system tray are added while the plasma desktop is locked, these entries are appended to plasma-org.kde.plasma.desktop-appletsrc each time the plasma desktop (re-)starts (see example below). System tray entries become naive to previous configuration, and old entries and their specifications remain in plasma-org.kde.plasma.desktop-appletsrc but are not of any use:

[Containments][6][Applets][98]
immutability=1
plugin=org.kde.plasma.volume

[Containments][6][Applets][98][Configuration][ConfigDialog]
DialogHeight=780
DialogWidth=1040

[Containments][6][Applets][98][Configuration][General]
maximumVolume=150

[Containments][6][Applets][135]
immutability=1
plugin=org.kde.plasma.volume

As there are quite a few entries in the system tray and the desktop is reload quite frequently, this creates quite some frustration and a lot of garbage in plasma-org.kde.plasma.desktop-appletsrc
Comment 4 Marco Martin 2016-09-20 13:04:19 UTC
Git commit c506c4b669747395755d1ff2b5dde1540b09ad0b by Marco Martin.
Committed on 20/09/2016 at 13:02.
Pushed by mart into branch 'Plasma/5.8'.

better bookeeping of the config

be able to destroy applets even when locked: delete their config
by hand.
Except in one case: when the applet gets automatically destroyed
by dbus activation do *not* clear the config, it should be
reused next time.
Related: bug 365569

M  +14   -4    applets/systemtray/systemtray.cpp

http://commits.kde.org/plasma-workspace/c506c4b669747395755d1ff2b5dde1540b09ad0b