Commit Graph

3261 Commits

Author SHA1 Message Date
Allan Odgaard
3d2ac7f371 Output frame of find window’s field editor (debug) v2.0-beta.6.3 2014-11-21 15:17:39 +01:00
Allan Odgaard
ab69cf8b4a Make code more robust
This is motivated by a crash that indicates that an empty string might result from the `all_varations` function.
2014-11-21 13:24:24 +01:00
Allan Odgaard
eedf8122ea Simplify code to format “«unit» / Selection” bundle/menu items 2014-11-20 22:20:32 +01:00
Allan Odgaard
fd07d7cf3b Store a parent menu reference in bundle items instead of a path
This is simpler to setup and maintain and requires less storage.
2014-11-20 22:09:41 +01:00
Allan Odgaard
a9698a36b5 Remove unused function: full_name_with_selection 2014-11-20 22:04:18 +01:00
Allan Odgaard
c41851199c Simplify bundles::item_t::full_name to return “«name» — «bundle»” 2014-11-20 21:57:25 +01:00
Allan Odgaard
fe798f4c0e Don’t explicitly define targets as applications or libraries
Libraries can be identified by either being linked with other targets, or exporting headers, so that is what we do.
2014-11-20 14:58:34 +01:00
Allan Odgaard
a07a9e4940 Fix potential crash in file chooser
This was caused by performing regexp matching on a temporary string object and later accessing captures from the match (when the string object was out of scope).

Rather than extend the scope of the string object I rewrote the code to use Cocoa’s NSRegularExpression class so we avoid using C++ (and thus temporary objects).
2014-11-19 23:13:36 +01:00
Allan Odgaard
32232d9dd8 Version number should not be stored as double in user defaults
The current version of mate is 2.10 which gets stored as 2.1 (when using a double), so TextMate would think the installed version was too old (though after updating it, a string would be stored, so it would only happen once).
2014-11-19 23:13:10 +01:00
Allan Odgaard
694e6e17dc fixup! Normalize newline and backspace characters in key event strings 2014-11-17 15:24:32 +01:00
Allan Odgaard
2a40206518 Fix typo 2014-11-17 15:18:06 +01:00
Allan Odgaard
83d859ff52 Remove support for our special “EXPORTS” symbol
This allowed framework headers to test whether they were build as part of the framework itself, or part of building something that depends on the framework.

Ideally though we should not need two different paths for those two cases, and we no longer have.
2014-11-17 15:17:28 +01:00
Allan Odgaard
8d2954a4da Update dialog plug-in (fix option parser for nib --list) v2.0-beta.6.2 2014-11-17 09:37:54 +01:00
Allan Odgaard
a2681bfdfb Use gethostuuid instead of creating our own UUID 2014-11-17 00:05:26 +01:00
Allan Odgaard
235d52db7e Remove unused include 2014-11-17 00:04:51 +01:00
Allan Odgaard
79eb970b9b Use NSIsEmptyRect instead of comparing with NSZeroRect 2014-11-17 00:04:34 +01:00
Allan Odgaard
77dc448206 Use uuid_string_t instead of std::string(40)
This seems more appropriate and given the small size and that the former is stack allocated, there is likely no real benefit in writing directly to the std::string that we return.
2014-11-17 00:03:38 +01:00
Allan Odgaard
790a497a07 Use font’s maximumAdvancement for aligning key equivalents
Previously we would use the width of the delete glyph (⌫).
2014-11-17 00:02:03 +01:00
Michael Sheets
d458e7604a Use template icon for .twig files 2014-11-15 15:53:13 -06:00
Allan Odgaard
ddbca55710 Support line number suffix in file chooser when filtering by glob
Also prevent re-filtering items (and thus losing selection) if the effective (normalized) filter string is unchanged.
2014-11-15 13:10:39 +01:00
Allan Odgaard
970d2a1a6d OakChooser subclasses can disable reload on filter string changes
For example if the user adds a line number suffix, we do not want to trigger re-filtering of items (which resets the selection).
2014-11-15 13:10:39 +01:00
Allan Odgaard
2942f92464 Increase clickable area for the tab overflow button
The button frame has been extended to the top/bottom of the tab bar and on Yosemite there are 3 pixels of padding to the right of the image (which are thus part of the button and hence clickable).
2014-11-15 13:08:13 +01:00
Allan Odgaard
1cae7dc441 Pass std::string instead of filter_string_t to rank_record 2014-11-14 10:25:49 +01:00
Allan Odgaard
500ec62321 Use OakAttributedStringForEventString in bundle item chooser 2014-11-14 10:24:25 +01:00
Allan Odgaard
12013fef38 Add OakAttributedStringForEventString helper function
This will convert the event string to the proper glyphs and lookup function key glyphs in the font and set the proper glyph info attributes (if found).
2014-11-14 10:22:50 +01:00
Allan Odgaard
2721d4eaa5 Preserve selection when updating chooser items 2014-11-14 10:22:41 +01:00
Allan Odgaard
5b39bdc98b Remove double semi-colons at end of line 2014-11-14 10:21:34 +01:00
Allan Odgaard
e5009c8415 Remove next/previous properties on result (tree) node
We can get to the next/previous node via the parent pointer, although it has worse time complexity, it’s not something we use in loops, so the extra bookkeeping is not worth it.
2014-11-14 10:20:15 +01:00
Allan Odgaard
ffeb661d02 Remove method signature which is part of our SDK
Presumably this did not exist in the 10.6 SDK.
2014-11-14 10:19:35 +01:00
Allan Odgaard
49e5dab6e5 Normalize filter string in symbol chooser
This just lowercases the filter string and removes spaces.
2014-11-14 10:18:11 +01:00
Allan Odgaard
08dbb7b2e9 Checkin release notes v2.0-beta.6.1 2014-11-11 21:04:12 +01:00
Allan Odgaard
26dead41ca Update template project for a new application
Use an application controller instead of embedding a window with a custom view in the nib.
2014-11-11 20:01:33 +01:00
Allan Odgaard
568fcd49cf Opening a document via ‘mate -w’ and canceling would hang mate
For example with the following command we get an encoding dialog that allows us to cancel opening of the document:

    echo Æblegrød|iconv -f utf-8 -t mac|mate -w
2014-11-11 08:54:35 +01:00
Allan Odgaard
24c510bbd5 Add a “document will delete” callback function 2014-11-11 08:44:07 +01:00
Allan Odgaard
b3850897de Accept titlecased Info.plist when loading bundles
If you already have bundles “installed” with a titlecased Info.plist then you need to delete ~/Library/Caches/com.macromates.TextMate/BundlesIndex.binary since the cache would not contain the titlecased version (and is not updated unless something is changed on disk).
2014-11-11 08:42:49 +01:00
Allan Odgaard
883fd2b6f8 Add variables from Preferences → Variables to bundle item chooser 2014-11-10 20:51:17 +01:00
Ronald Wampler
67184816be fixup! Remove NSString existAtPath category method 2014-11-10 20:51:17 +01:00
Allan Odgaard
c3e3da0ca9 Show items from key bindings dictionaries in bundle item chooser 2014-11-10 17:11:32 +01:00
Allan Odgaard
4250618096 Allow path string in bundle item chooser to extend below shortcut 2014-11-10 17:11:31 +01:00
Allan Odgaard
ae02add21c Normalize newline and backspace characters in key event strings
The system’s key binding dictionaries use both CR and LF for newline and \x08 and \x7F for backspace.
2014-11-10 17:11:31 +01:00
Allan Odgaard
a778f0b3da Combine std::set’s find and insert into a single operation 2014-11-10 17:11:31 +01:00
Ronald Wampler
c0a0b2e2fd Remove unnecessary instance variable
As far as I can tell we only add objects to `_project`, but we never actually use it.
2014-11-10 09:28:06 -05:00
Ronald Wampler
f0c7a2f564 Remove unused includes 2014-11-10 09:28:06 -05:00
Ronald Wampler
9a898fe852 Code style fixes 2014-11-10 09:28:06 -05:00
Ronald Wampler
c1b73ac9c0 Remove NSString existAtPath category method
Also rename NSString category from "Path" to "Additions".
2014-11-10 09:28:06 -05:00
Ronald Wampler
ecd3280a4a Remove NSString isDirectory category method 2014-11-10 09:28:06 -05:00
Ronald Wampler
d3f295b15b Avoid use of the NSString existsAtPath category method
We have removed the use of this category method from the rest of the code base. Refactor `FSXcodeProjectDataSource` so that we can delete it entirely.
2014-11-10 09:27:57 -05:00
Allan Odgaard
b06a22cfe3 Change --bool to -bool in defaults command examples
Closes #1273.
2014-11-10 11:38:48 +01:00
Allan Odgaard
c1029c454b Improve bundle item chooser
We now show two lines per item: the name of the item and the location on second line.

For settings we show the (literal) value of the item next to its name (ideally user could click the item to toggle between literal and effective value).

Selecting settings items (from properties files) will go to the proper line in the properties file.
2014-11-10 10:35:37 +01:00
Allan Odgaard
2e049ad25f Replace newline and tabs in find dialog’s status text
Previously if searching for something with a newline, the status text would show a literal newline and adapt its height.
2014-11-10 09:24:10 +01:00