Bug 334212

Summary: Offers to add to favorites applications already in favorites
Product: [Plasma] plasmashell Reporter: Antonio Rojas <arojas>
Component: Application Menu (Kicker)Assignee: Eike Hein <hein>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: master   
Target Milestone: 1.0   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Antonio Rojas 2014-05-02 09:46:52 UTC
When right-clicking in some of the favorite applications, it shows the "Add to favorites" option instead of "remove from favorites", so there is no way to remove them (from UI). Happens for dolphin and konqueror in the default favorites list.

Reproducible: Always
Comment 1 Eike Hein 2014-05-02 11:07:06 UTC
This happens because the default config specifies these as "dolphin.desktop" and "konqbrowser.desktop", but these apps don't have KF 5 ports yet and their KDE 4 versions end up having non-matching "kde4-dolphin.desktop" and "kde4-konqbrowser.desktop" storage ids, so the comparison fails -- I'm working on a workaround.
Comment 2 Eike Hein 2014-05-02 11:17:02 UTC
Git commit 12b8951e426e113af6c662390f45e48ff947ec85 by Eike Hein.
Committed on 02/05/2014 at 11:12.
Pushed by hein into branch 'master'.

Fix incorrect state of add/remove actions for some favorites.

KService::serviceByStorageId is quite lenient (which is nice), but
means we need to update to the storageid of what it ends up finding
instead of sticking to the one we started with, or the comparison
against the service instance backing the favorite can fail later.

Concretely, this currently happens when foo.desktop is turned into
kde4-foo.desktop for the unported apps in the default favorites.

M  +10   -2    applets/kicker/plugin/favoritesmodel.cpp

http://commits.kde.org/plasma-desktop/12b8951e426e113af6c662390f45e48ff947ec85