linuxmint/Cinnamon — pull request #1424 by OutsiderPerspective (2012-11-25 18:32:28+00:00)
Title: Replaced the linear numbering of getUnique<blah> functions

(which counts up from 1 to find a free file name) with a call to
uuid.uuidv1.

This provides unique GUID tagged entries which allows synchronizing
~/.local/share/applications files more easily between two computers.

Instead of:
alacarte-made-1.desktop

we get:
alacarte-made-aa49738a-2ac8-11e2-869b-1c6f65c8b78b.desktop

Both are functionally the same to the end user, but easier for
synchronization purposes (i.e. with rsync or Unison) since name
collisions are avoided.

The problem with using a hash function is that currently when you edit a shortcut that is already in the local user directory, it's not resaved, so the hash function would wind up not representing the contents anyway.

So if the user created a launcher to SpecialProgramA, the later changes it to point to SpecialProgramB, the filename would still hold the MD5 of SpecialProgramA. If they then later recreate a launcher to SpecialProgramA, you'd have a filename clash you'd have to deal with.

The UUID ensures the filename is unique, and after an initial sync, that editing a launcher on one computer means you're editing that specific launcher.