Commit Graph

3286 Commits

Author SHA1 Message Date
Allan Odgaard
f9fd839ed3 Checkin release notes v2.0-beta.6.4 2014-11-29 10:07:25 +07:00
Allan Odgaard
37df09bf7b Use to_s instead of sending UTF8String 2014-11-29 10:01:23 +07:00
Allan Odgaard
bf4cbd33fa Remove NSString* typecast when using to_s helper
This has a small run-time cost but source looks better and theoretically safer code.
2014-11-29 09:53:40 +07:00
Allan Odgaard
66b849c4c6 Use to_s on the insertText:/setMarkedText: argument 2014-11-29 09:51:02 +07:00
Allan Odgaard
c8960dee94 Add to_s for NSAttributedString and id 2014-11-29 09:50:18 +07:00
Allan Odgaard
174603b4f4 Let input context handle most key events
This is because the input context may open windows where it wants to handle arrow or number keys.

Unfortunately we can’t tell the system about our local key bindings, so we need to handle those ourself.

The system does not respect bindings for delete and arrow keys with control modifier set, so those we still handle.

We also handle multi-stroke key bindings, since handling successive key strokes should be done before menu keys, which the system doesn’t do (as we don’t call upon the system until keyDown:).
2014-11-29 09:35:27 +07:00
Allan Odgaard
724dd229b2 Eliminate typedef 2014-11-29 08:29:16 +07:00
Allan Odgaard
098fe8427f Use local event monitor to handle multi-stroke key bindings
This avoids a state variable and the need for dealing with successive strokes in performKeyEquivalent: (to swallow bound keys before the main menu has a chance to handle it).
2014-11-29 08:22:11 +07:00
Allan Odgaard
7f0c323f66 Use NSMaxRange helper function 2014-11-29 07:55:48 +07:00
Allan Odgaard
a4763ac96c Be smarter about testing if replace text field has focus
Rather than skip the field editor, regardless of which view it belongs to, we check if the first responder is the replace text field’s (current) field editor.
2014-11-29 07:55:48 +07:00
Allan Odgaard
40857b1566 Do not disable Apple’s “press and hold” accent feature
With NSTextInputClient conformance this feature works fairly well, though we currently do not pass events (that we have an action for) to the current input context, which e.g. means that arrow left/right cannot be used to move through the variations.
2014-11-29 07:55:48 +07:00
Allan Odgaard
579cef6f26 Move protocol conformance declaration to implementation file 2014-11-29 07:55:48 +07:00
Allan Odgaard
4211242920 Implement NSTextInputClient protocol instead of NSTextInput 2014-11-29 07:55:48 +07:00
Allan Odgaard
7247cb916a Remove unnecessary method signatures from private interface 2014-11-29 04:21:43 +07:00
Allan Odgaard
b7a381be8b Don’t overload interpretKeyEvents:
The documentation does say that subclasses shouldn’t overload it, we only call it from a single location, and here we may want to instead use the input context’s handleEvent:.
2014-11-29 04:16:12 +07:00
Allan Odgaard
5968aa55b2 Let chooser windows remember their size (after relaunch)
Previously only the favorites / recent projects chooser would remember window size after a relaunch.
2014-11-28 15:58:40 +07:00
Allan Odgaard
a0b79c7dfb Increase mouse movement threshold for what is considered a click 2014-11-27 10:29:00 +07:00
Allan Odgaard
c14c83d3c5 Support deleting array members in delta plists
Required after b96a4975e and related to 302600198.
2014-11-27 08:06:25 +07:00
Allan Odgaard
2fe1e70515 Don’t let value_for_setting return item when setting is missing 2014-11-27 08:06:25 +07:00
Boris Dušek
7774be0718 Reorder accessibility order of chooser cell view items
When VoiceOver users want to efficiently find an item in a list, they often go
through the items quickly, hearing just first few characters to decide whether
it is the item they want or whether it is positively not the one (in which case
they move to the next item). Therefore it is necessary for each row (item) of a
table to be worded in such a way for VoiceOver so that the most important piece
of information is read first, then followed by the less important piece of
information, etc.

E.g. for the file chooser, the most important piece of information about a file
is its file name. So we put that first for the VoiceOver user. If they are
unsure whether it is the right one (perhaps because there is more than one file
with the same name in different directories), then path to the file is read
after that.

Fixes textmate/bugs#10
2014-11-27 08:06:25 +07:00
Boris Dušek
d786053406 Track close button in a property of file cell view 2014-11-27 08:03:00 +07:00
Ronald Wampler
5841528b23 Update mate usage information for setting marks 2014-11-27 08:03:00 +07:00
Ronald Wampler
5b8cc64d68 Fix typo in local variable name 2014-11-27 08:03:00 +07:00
Ronald Wampler
9003932ca4 Improve error popover appearance
Unfortunately, the text field is difficult to center properly (right/left arrow mode) since prior to 10.10 the popover's contents was set at inset (2, 2, 2, 2).
2014-11-27 08:03:00 +07:00
Allan Odgaard
334b869639 fixup! Fix potential crash in file chooser
Closes textmate/bugs#9
2014-11-22 10:36:48 +01:00
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