http://bugs.winehq.org/show_bug.cgi?id=10277
--- Comment #23 from Ambro ambro@b4ever.net 2008-07-05 13:05:44 --- It's a fact that Windows deletes shortcuts by deleting .lnk files. Yes, there would be a problem with desktop shortcuts specifically, becouse Wine tends to delete them, so the uninstallers might check if they still exist before calling "delete" on them. But this is no problem for the start menu, as the .lnk files reside in private folders which are invisible to the user. Actually, wine could keep desktop shortcuts in a private folder as well and avoid the hassle with deleting them.
For my plan to work, each shortcut should have independent .menu files. Currently, when wineshelllink is adding a shortcut to an existing menu, it overwrites the corresponding .menu file and automatically adds all prevous menu entries to the new one. This is problematic, becouse when deleting a shortcut, wine would have to actually parse the menu file and remove only the shortcut's entry from it (<FileName>). So the idea is that when a shortcut is being created, only new files would be added to the xdg database. This way deleting them would cause no harm to other menu entries. I've tried splitting a .menu file with multiple entries in parts so that each one has just one <Filename> entry, and KDE merges the entries properly. I'm modifying wineshellink right now to do this.