gb.desktop, Make DesktopActions.class to manage Actions better and add to DesktopFile.class
[GB.DESKTOP]
- NEW: make DesktopAction object, contains .Key .Name .Exec properties and .Delete method
- NEW: add _DesktopFile_Actions.class to manage actions.
- NEW: add DesktopActions property to DesktopFile.class.
- NEW: DesktopFile._Data , hidden property returns the Collection used by DesktopFile internally.
- NEW: DesktopAction.Properties returns a list of all properties in the action including Exec and all Name/Name[Lang] items.
- NEW: ANY property name can be used, for example hDesktopFile.DesktopAction["MyAction"].Description , if it does not exist it will be created.
Notes.. I have made this to best emulate the DesktopFile methods. Ie. the same routine is used to retrieve a possible language specific property of Name (like Name[fr]) The only changes to DesktopFile.class are as follows. Added DesktopActions Property Added hidden _Data property to access the main config $cSettings Collection Added hidden _Langs() method to retrieve the same language data DesktopFile uses.
No other changes so there is full backward compatibility.
I used your suggestions from 2 years ago when merge request 239 was started !239 (comment 663663223)
I also implemented your suggested use of _unknown() method to use custom properties. (custom properties also use the possible language specific method as "Name" and other DesktopFile properties)
Mostly All DesktopAction and _DesktopFile_Actions methods work directly with the main $cSettings Collection.