5 Commits

Author SHA1 Message Date
Allan Odgaard
ea73cc783f Change default size of image returned by TMFileReference: 48×48 → 16×16
This makes binding menu items to a file reference image much simpler, as we do not have to bind to a property wrapper that resizes the image.

As a general rule, we always copy an image, before we change its size, so the image obtained from TMFileReference should always stay at its default size.
2021-10-12 21:43:20 +02:00
Allan Odgaard
1af594a2a2 Allow creating TMFileReference from an image instead of URL
This is for places where we normally want to show a (live) image representing a URL (and its modified/SCM status) via bindings, but occasionally, we want to show a static image.

For example the location shown in the file browser. This is normally a folder, but it could be “Computer”. Similar for folder search results when searching unsaved documents.
2021-10-12 21:43:20 +02:00
Allan Odgaard
62c271cbb5 Assign icon to *.rave files
Also remove icon from ‘target’ files, the previous name used for TextMate’s build configuration files.
2021-05-17 21:19:18 +02:00
Allan Odgaard
b1e88c3ce7 Add icon property to TMFileReference
This is like ‘image’ but will dim the image when isModified returns YES.
2021-05-17 21:19:18 +02:00
Allan Odgaard
866ae0f770 Add TMFileReference framework
The motivation is to have a universal type for a file that knows whether or not the file is open/modified, if it has SCM status, what icon to use for the file, and supporting bindings for the latter (incase icon is updated).

This does sound like a “document” but there are many places where we just want to show a file icon (with SCM and “modified” status) without instantiating a full document, for example folder pop-up menus.

We would also like a way to “close” the file, incase it is open, for example from file browser or “open quickly”, which is not really a document action per se, furthermore, we may delete the file from the file browser, which again, is more of a file than document action, but if the file is “open” somewhere, it should be notified about the delete operation.
2021-05-17 21:19:18 +02:00