See commits at GitHub.
This is to keep with the original organization of the code where the public APIs are defined after the private functions and in the order declared in the header.
When using ⇧⌘Y we would show the status as "Unversioned" if the scm status is disabled. This is confusing. So now we explicitly check if the scm status is disabled and inform the user appropriately.
We originally exported this variable for the commit window (to show the branch name in the window title bar). However, the commit window no longer uses this, so stop exporting it.
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
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).
As far as I can tell we only add objects to `_project`, but we never actually use it.
Also rename NSString category from "Path" to "Additions".
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.
The new layout allows us to place the action button back in its original place when the table is revealed.
With the previous refactoring the new name is more appropriate.
The view layout is rearranged in order to animate showing the table, which is now shown below the toggle button with the Cancel and Commit buttons sliding down. Additionally, when not showing the table we remove all relevant views from memory.
This way the settings can also be applied in the Commit Window (and .git/MERGE_MSG).
This is so that the commit window’s text view sources project specific settings.
This puts the VoiceOver user experience in OakChooser on par with Spotlight in Yosemite which also announces currently selected item after every edit in the search field. This provides the user with feedback so they know whether the search result changed or did not change after typing/deleting in the search field. A manual AXSelectedRowsChanged notification is used - see http://lists.apple.com/archives/accessibility-dev/2014/Aug/msg00024.html for discussion about this. This change is Yosemite-only. While pre-Yosemite OS could probably be supported in the way it is now for the case when the user moves the table results with arrow up/down, I did not have time to fiddle with it and given that Yosemite will be released soon, I am not sure it will be worth the effort.
Implements a TODO. A close-tab is now sent to clean up documents that failed to open properly, and a close-window is further sent if appropriate.
Previously, scmStatus would not be enabled on remote volumes even if, say, a .tm_properties setting explicitly matched a remote volume and set scmStatus = true. This patch allows setting scmStatus = everyDisk to skip the local-volume check. Also defined are scmStatus = localDisk and systemDisk. localDisk is the same as true (and is the default as before), systemDisk only enables files on the "/" volume.
Integrate visually file manager header in tab bar when tabs above document option in on. If tabs above document are off then use default gradient L&F. Bottom divider for file browser header view is not integrated in header for easier control if it is shown or not.
This workaround is to avoid a couple of undesired behaviors in the `HTMLOutputWindow` when the web page implements keyboard commands such as Git → Browse Annotated File (Blame). Namely, when using the keyboard commands, we would always receive an NSBeep. Also, fixed an issue when these key commands may conflict with menu keys. See comment in the commit for details.
Previously, the commit window was changed from a "always on top" window to a more typical window that could be minimized or sent to the background. While this made viewing the diffs more convenient, we could easily loose track of it or at worst end up with multiple dangling commit windows. By making it document modal, this prevents dangling windows. Furthermore, since the commit window is now attached to the main project window and the file browser already has the SCM status, we hide the file list by default and dropped the action button. Users can choose to show the file list via a checkbox and the action button's menu is still available via the file list's context menu.
This improves the chance that someone googling for a certain accessibility attribute or other accessibility constant in order to find inspiration how to implement it will find our code in OakTextView. It also makes the code more understandable for reading by someone else, and generally follows the way others write accessibility code (including Apple in their code samples). It does make the code more verbose, but I think that does not outweight the above advantages. Inspired by: googling and "githubbing" for NSAccessibilityLinkTextAttribute: http://lists.apple.com/archives/accessibility-dev/2014/Aug/msg00016.html
This was found using clang's static analyzer.
These methods were deprecated in 10.7. Use `convertRectToScreen:` and `convertRectFromScreen:` instead. This is required for proper high resolution support.
These methods were deprecated in 10.7 and log warnings in the console when called. The documentation says to use `convertPointToBacking:` and `convertPointFromBacking:`, respectively, instead; however, these methods should not really be used in this case. We just want to store the top left position (point) of the OakChoiceMenu's frame in the OakDocumentView's coordinate systems so we can update its frame to the new position when OakDocumentView's bounds change. We do not need exact pixel alignment. The original choice to use the above deprecated methods was probably based on the use of `convertBaseToScreen:` and `convertScreenToBase:`, but these were also deprecated in 10.7. They can be replaced with the equivalent `convertRectToScreen:` and `convertRectFromScreen:`, respectively. So instead, for this case, `convertRect:toView:` and `convertRect:fromView:` suffices and actually yields better tracking. (We could have used the corresponding "point" methods, as well, but we needed to convert the point to a NSRect to use `convertScreenFromRect:`, etc.) With the original code, when the view bounds change, the position of the OakChoiceMenu would extend well below/above the placement of the caret.
Originally, the "--ask" option was used in the previous commit window to change the NSTextField above the text view; however, no SCM bundles (in textmate's repos) currently uses it.
If `enableLoopFilterList` is set to `YES`: - when at top, pressing <Up> selects the last item on bottom - when at bottom, pressing <Down> selects the first item on top
The implements the space invisible using the new method of drawing the invisibles so it does not affect right-to-left text.
Rather than putting tabs in their own node, leave them in the text nodes and allow core text to handle the size. This fixes the issue with using tabs in right-to-left text.
I experimented a lot with different combination of attributes, this one works reasonably well compared to the others (even though it is less feature complete). I may revisit experimenting with it at some later point.
More specifically item's displayed keyboard shortcut or tab trigger is now announced by VoiceOver. Implementation of accessibilityAttributeValue:forParameter: returns nil for some attributes. This is a hack to avoid doing tedious adjustments of certain parameterized attributes (like AXStringForRange, AXAttributedStringForRange, AXBoundsForRange, AXRTFForRange) for string AXValue that is extended (appended) by extra information at its end in accessibilityAttributeValue:. To get an idea how tedious this is (even though our case is a bit simpler by not *prepending* anything before the AXValue, and not being an editable field), look at OakLinkedSearchFieldCell. This looses the ability for the user to interact with the text, but considering how seldom this will be used (if at all), for now this seems acceptable. This is needed because VoiceOver asks for the *StringForRange attributes and if implemented, will never query AXValue (which is where our custom behavior is). In the future when tables will be migrated from cell-based to view-based ones, the tab trigger or shortcut could be a separate NSView, which would probably allow for much more elegant solution to this problem.
Previously we used [NSCell stringValue], which is not suited for cells with custom implementation for AXValue accessibility attribute.
Previously using ⌘F with a multiline selection would automatically set the “in” pop-up to “Document”. This is no longer the case, but can be brought back by running: `defaults write alwaysFindInDocument -bool YES`
Add a bit of redundant code but it's useless to continue doing stuff if the request is cancelled by the user anyway.
Read at most 1 KiB or 50 lines of a file and render the attributed string in a bitmap context. The theme is set to Mac Classic to ensure a white background for best look when the previews are used as icons in Finder. The user’s default fixed width font in size 4 is used. With this font size only around 7 lines are shown, so we need to make it smaller, but we probably want to scale down the result to allow fractional line heights. A lot of code is copy/pasted from the QuickLook preview generator.
Default is to suppress any warnings for unassociated GitHub profiles.
This prevents `tableView:objectValueForTableColumn:row:` from throwing an exception (index beyond bounds) when the user deletes the last row while it is being edited.
This makes Zoom support avoid doing all 2 conversions between UTF-8 to UTF-16, and replaces call to rect_for_range with call to rect_at_index, which is more efficient. Note that this is a typical micro-optimization not resulting from any actual performance measurement, but just from a desire to have a lean code not doing redundant work.
When setSelectionString is called during editing of text (like inserting or deleting a character), it catches layout in a semi-consistent state where horizontal position of individual characters cannot be determined. Therefore during such events, we cannot pass the correct screen position to the call to UAZoomChangeFocus. So let's do the UAZoomChangeFocus call after this iteration of run loop. This ensures everything in layout that had to update has updated when calling UAZoomChangeFocus, thus enabling us to provide correct horizontal screen position.
bol_as_eol was meant for non-empty ranges, but the only place where empty ranges were attempted with bol_as_eol was for Zoom tracking, and it seems like I did not re-test Zoom after making the bol_as_eol commit. Fixes textmate/bugs#4
Since variable strings can be very long and we reduced the font size in the bundle table, let's be consistent and use a smaller font size here too.
By using a smaller font size in the bundle table we can show more of the bundle description. Also, it minimizes the amount of resizing of the pane we have to do to see the entire description string for most of the bundles.
When rebuilding textmate from scratch: git clean -xffd; git reset --hard HEAD; rm -rf ~/build/TextMate/; ./configure; ninja This error appears: Frameworks/OakAppKit/src/OakTabBarView.mm:7:9: fatal error: 'OakAppKit/OakFileIconImage.h' file not found After one issues "ninja" again, textmate continues building fine. I guess this might be because perhaps OakAppKit's headers are being copied to the build include directory (~/build/TextMate/include) in parallel when building OakTabBarView.mm. No matter what actually is the case, this patch fixes building during clean build.
In other words, I don't like build warnings of any kind :-) And they deserve credit for their contributions.
This new 10.10 API allows one to mark, for some UI element, a set of UI elements to track selection. VoiceOver (and other accessibility clients) will then track and announce selection (cursor) changes not only in the currently focused element, but also for all elements contained in its "shared focus elements" array. This is a perfect fit for search field with a table of results. In fact it is used for new 10.10 Spotlight - its search field's shared focus element is the table containing the results. As NSAccessibilitySharedFocusElementsAttribute is available only in the 10.10 SDK, so make a way to use its value with previous SDKs (with which TextMate is currently compiled). We also retain the kind-of-hacky solution for pre-10.10 OSes introduced in and instead use NSAccessibilitySharedFocusElementsAttribute. This code was tested in all 6 fields of a 3×2 matrix: * compiled with 10.8, 10.9 and 10.10 SDK * run on 10.9 and 10.10 (DP2) For user, this means more standard behavior (says the same "completion selected" thing as with Spotlight) and a bit more correctness (no extra space before beginning / after end of search field on braille display). For developer, this means once we stop supporting 10.9, we will be ready to drop a lot of code which, while serving us well to make the choosers more user friendly on pre-10.10, will no longer be needed.
Now it matches more way other OSX elements are inset both on Retina and non-Retina displays.
Now it supports properly Retina using Cocoa rounded corner rendering instead pixel patches. All colors are now references by name.
This lets layout file refer to color names instead hardcoding color hex values. Also colors referenced by name can return different values depending on OSX version, which will in future solve problems with OSX 10.10 Yosemite L&F.
This allows drawing rounded layers with border in resolution independent manner. Also it reduces number of layers needed to certain UI elements.
10.10 SDK makes NSLineBreakMode into a proper NS_ENUM enum (in 10.9 SDK it was a plain typedef for NSUInteger with some integer NSLineBreak* values conveniently available for it in an anonymous enum). Nevertheless, attr_string code should have always used NSLineBreakMode instead of NSUInteger (unless I am missing something like values in style::line_break::mode that do not correspond to the enum), so this commit makes it so and thus also fixes building with 10.10 SDK.
This allow the check mark to be properly spaced with respect to its item.
This change was prompted by the appearance of the `tabSizePopUp` button in the status bar. After dismissing the menu, the title would be disabled. To ensure we do not have similar issues elsewhere, let's prefer the use of `NULL` to `nop:` when assigning the action for menu items unless we are sure that the menu item should always be disabled (e.g., the item is used as a label).
This seems to have been overlooked since most of logic was already implemented. There is one known issue that exists when restoring sessions. Namely, after restoring a session only those documents (tabs), which have been actively "viewed" are considered "opened".
This fixes a regression. The previous commit window allowed a "--log" option to be specified that would pre-populate the text view with the given argument.
Per https://www.mikeash.com/pyblog/friday-qa-2009-05-22-objective-c-class-loading-and-initialization.html
This was previously set to a pop-up menu, hence the need for a placeholder item to set the menu title. However, for pull-down menus, the first item is used as the title and remains fixed. This difference in behavior caused the last used commit message (first item) not to be listed in the menu.
We set the name as: '---/+++ file' I wanted the display name to suggest a diff without calling it something directly as "file (diff)", so I thought '---/+++' would be a nice and condense way of indicating that.
This is based on the previous commit window code base. It replaces the NSTextView with a OakTextView for entering the commit messages. This allows us to take advantage of some of the git grammar features, e.g., fixup!. If other SCM bundles are updated in the future to include any specific grammars, these can be used in the commit window by setting the bundle grammar to "text.SCM-commit", where SCM could be hg or svn for example. Changes to note: * The Modify row button for the "--action-cmd" commands are now implemented in the action menu and the table context menu. * The shortcut for committing is ⌘↩ (but fn-return seems to (still) work).
This will be used by OakCommitWindow. Also removed extraneous whitespaces.
Applications is often not subfoldered and View --> Arrange by Application Category helps but apps need to have this metadata otherwise they're sorted into "Other" at the bottom. https://developer.apple.com/library/Mac/releasenotes/General/SubmittingToMacAppStore/#//apple_ref/doc/uid/TP40010572-CH16-SW8 (this applies to all Mac apps, not just those coming from App Store)
Accessibility labels now can be specified conveniently as a parameter of a UI construction function.
This function makes it easy to set accessibility "labels" for UI elements. It is flexible - takes care of NSView vs. NSControl case, labels can be specified directly as a string or as a user interface element.
While code reuse is an added benefit, the main motivation was to fix the appearance of the action popup button in the Find window. The first (placeholder) item in the Find window's action button was assigned a nop action so that when the button was clicked and it's menu validated, the "action" image would always appear as disabled.
ZWNJ is so common in Persian texts, and its unicode bi-direction class in neutral. But the representation chunk contains latin characters and are so left-to-right. So, when ZWNJ is replaced by the representation chunk, rtl texts are rendered incorrectly. ZWJ and ZWSP are from the same class, but less common at least in Persian texts.
Currently for VoiceOver user when the text cursor is at the end of the search field (which is 99% of the time) and the user wants to navigate the results in the table view using arrow down, then after each arrow down, VoiceOver first plays a "end-of-text" sound, then announces whole contents of the search field, and only then announces the newly selected search result. (The same happens when text cursor is at the beginning of the search field and user presses arrow up.) This is probably a bug in the way AppKit handles text field accessibility - see http://lists.apple.com/archives/accessibility-dev/2014/Feb/msg00019.html I also reported this as <rdar://problem/16271507> I hereby present a hacky workaround for this - a subclass of NSSearchField that tricks accessibility into thinking there is one extra space before and after the text in the search field. Therefore VoiceOver will not think the user is at the end of text when they actually are, and therefore will not play the "end-of-text" sound and announce whole contents of the search field before getting to the information user wants (the newly selected search result). While this is a bit hacky, along with the previous commit it allows VoiceOver to have the same instant great experience as a sighted user when filtering and browsing results in OakChooser. So I think it's worth the hackiness until there is a better alternative. There is only last issue, as currently VoiceOver is very chatty when the OakChooser window appears: first says "Go to file", if user interrupts it with an action (i.e. moving VO cursor or typing a character), then VoiceOver starts telling the whole title of the window, and only after user interrupts it again does VoiceOver say or announce only the user actions (including search results table selection change). So the simpliest if the user wants to start navigating the table items immediately after showing the OakChooser's window (i.e. without entering a search term) is to, after showing the OakChooser (e.g. with ⌘T or ⇧⌘T), quickly type any letter and immediately delete it with backspace and then use arrow down/up.
This solves accessibility of situation of a user browsing results in OakChooser (currently File Chooser and Symbol Chooser). Typically the user is in search field and after typing the search string wants to use arrow down and up to browse results. The problem this presented to accessibility was that VoiceOver reads only changes of selection in the current VoiceOver item. As the user is on the search field but the selection changes in the results table below, VoiceOver did not read the various search results when pressing arrow up/down. Alternative was to leave the search field, move to the results table, interact with it and then navigate it with VoiceOver. This is however not the desired user experience comparable to that of sighted users, as the VoiceOver user still has to do quite a few steps after entering the search string to browse the results, not to speak about the situation when the user would like to change the search string - he/she would need to leave the table and get back to the search field. This solves the problem by making the search field (or more generally any user interface element that triggers change of selection in the results table, which should be the element the VoiceOver cursor is on) announce to accessibility the contents of the selected row in search results table. See this thread on accessibility-dev mailing list where the options for implementing such a user interface in an accessible way are discussed: http://lists.apple.com/archives/accessibility-dev/2013/Dec/msg00000.html and http://lists.apple.com/archives/accessibility-dev/2014/Feb/msg00016.html If the user did not move selection (it is on the first line) and they want to hear it, they should use arrow up to hear it. Then they can use arrow down to move through results.
An option called "Auto-reveal open file in project browser" has been added to the Projects preference pane. When checked, the currently open file will be revealed in the project's file browser. By default, the option is not checked and thus the behavior is as it was before.
This fixes regression caused by 1de5d90475788143655a60fdbff654139fec3cb4 that divider height and default compression priority disallowed expected height.
We use to pass nil to NSMenuItem initWithTitle: when clicking the SCMFolders in SCM Status (see commit e5841fe); however, we will *probably* never encounter this now. But it might be useful, if custom data sources are implemented for the file browser in the future.
Also removed the static SafeObjectAtIndex mehtod in OakTabBarView
This is defined in OakTabBarView as a static method, but it could be useful elsewhere.
This fixed problem when closing TM2 with zoomed window, then unzooming window after restart caused invalid window placement.
Previously when constructing a scm URL from a path, if scm was not enabled we returned a file URL. This could result in some unexpected behavior. For instance, when a directory was selected in the file browser, activating "SCM Status" would just open the untracked directory. This patch, insteads, adds a query to the scm URL that can be parsed to determine how to handle the scm status request later on.
Accessibility visual bounds for a range of a single softline should always be also visually restricted to the softline. This is in order to be consistent with implementation in Apple's apps (e.g. TextEdit).
Fixes #1149. VoiceOver expects AXLineForIndex and AXRangeForLine to be consistent with the movement by line using arrow up/down. That means it expects "line" to mean softline. VoiceOver also distinguishes commands to move by: * paragraph (hardline): VO-Shift-PgUp/PgDown * line (softline): VO-up/down These are available when interacting with the text area (VO-Shift-down). This commit therefore fixes the AXLineForIndex and AXRangeForLine to make "line" mean "softline" instead of "hardline" as was the case until now.
Now links in text (e.g. links to RFCs after installing the Hyperlink Helper bundle) are announced as such with VoiceOver and it is possible to search for them with VO-Cmd-L. TODO: * launching links with VO-Space is not supported yet, but Enter (Fn-Return) does the same thing and is even more reliable. * link URL is not supported, so it is not possible to learn the URL with VO-Shift-U.
This is a document with information I found most useful as a new contributor to TextMate - basic stuff a new contributor is likely to get in contact with. It's of course incomplete, sparse, can be not well worded and even contain mistakes. But someone had to make the first shot :-)
This should allow Quick Look generators to function when they target a more specific UTI. Discussed in #1141 and #1168.
TextMate's, not TextMates.
This setting allows changing which invisibles are shown and what glyph is used for them. Invisibles are '\t', '\n', and ' ', to turn one off, add ~[\t \n] to the settings string. To set the glyph used for the invisible, add [\t \n][glyph_to_use].
This allow configuring which characters should be used to render tabs, spaces, and newlines (when “show invisibles” is enabled).
Works around a bug where icons are not inherited from the UTI definitions.
VoiceOver can announce text formatting, such as bold font, italics, underline, font, etc., as well as whether text is misspelled. For this, it needs the AXAttributedStringForRange attribute supported. This commit does exactly that. Testing can be done in this way (VO stands for Ctrl-Option): * first interact with the text (VO-Shift-down arrow when standing on the text element) * to announce text attributes for character after cursor, press VO-T * to seek for next: * misspelled text: VO-Cmd-E * color change: VO-Cmd-K * underlined text: VO-Cmd-U * many more (see VO-H-H, "Find", close help with Esc) * to seek for previous *: just add Shift to the shortcut Some attributes remain to be supported (full list of attributes is available at: https://developer.apple.com/library/mac/documentation/cocoa/reference/applicationkit/Protocols/NSAccessibility_Protocol/Reference/Reference.html#//apple_ref/doc/uid/20000945-SW53). The misspelled text VoiceOver support can be used nicely with TextMate's spelling support: 1. the user finds next mistake with VO-Cmd-E, hears the misspelled word, perhaps reads it on a braille display 2. the user then presses Cmd-; to show the spelling menu for that word and chooses the desired resolution (apply suggested correction etc.) 3. go back to step 1. :-)
This removes the need to create and manage a separate menu item as a placeholder for the title of the color swatch in the file browser action menu.
Otherwise just select next spelling error on Check Spelling, which is called by spelling panel as well.
We invalidate the entire buffer since the word can appear in multiple locations. This could be optimized to only invalidate misspelled instances of the ignored or learned word. Likewise, we redraw entire buffer since the refresh macro is not able to handle changes in spelling meta data and calculate minimal refresh region.
Also add key equivalents to spell popup menu.
Now using Edit -> Spelling -> Check Spelling selects next spelling error or one at caret if it was not yet selected, then shows context menu with correction suggestions. This makes checking spelling as easy as tapping Cmd+; Closes #1103
UTIs are taken from both the Apple supplied list and newly created for those that didn't exist. For those languages where no clear 'owner' existed to provide the reverse-DNS notation we use a com.macromates.* stand-in.
The behavior is based on Safari where last visible tab is swapped with the selected tab, if selected tab itself would not be visible. Commit edited by Allan Odgaard, original version used document icons in overflow menu and would make the effective last tab sticky. Closes #1060
Closes #1062
@executable_path is the originally-executed program, whereas @loader_path is the program that caused the load to occur (e.g. a Quick Look generator). @rpath can be changed at link time — a QL generator can specify a value that points to the enclosing app bundle’s Frameworks directory.
The fallback encoding is taken from .tm_properties (attr.unknown-encoding).
When this setting is enabled it will render the file browser with the source list style, that is, the same style as the sidebar in Finder. To enable run: defaults write com.macromates.TextMate.preview fileBrowserStyle SourceList
Shrinking the file browser width so that the folder drop-down text is compressed would cause the layout to break if the width was then increased.
Previously wasn't possible to stop a search in progress (even when closing the Find window).
This is useful when including a grammar and its injections needs to be applied.
This allows overriding “native” rules via injecting. This commit drops support for using ‘.’ as (injection) scope selector to match everywhere. Instead use ‘*’.
Added `scopeAsString` method to retrieve current scope as NSString
Leiningen is a build automation and dependency management tool mainly used for Clojure projects. https://github.com/technomancy/leiningen
If this is on, then VoiceOver reads the name of the new tab being switched to, enabling easier navigation between open tabs.
Make available to accessibility the following information that file browser displays visual indication for: * file type (whether the file is a file, folder etc.) * SCM status (whether the file is modified etc.) * close button (whether the file is open) Also, while we are at it, make available to accessibility the tooltip, filename and URL.
This notifies the user the choice is exclusive to only one button. Also including these buttons in an AXRadioGroup adds positional indication to the radio buttons (like "2 of 3") which gives sense of how many values there are to choose from, where in the list of those the user currently is, and, if there are more sequential AXRadioGroups (which is not the case here), it distinguishes in which one the user is making a choice.
The content scope is the portion of the scope created while parsing the document content, unlike scope attributes, document, project, SCM, and dynamic scopes (appended to the content scope).
This treats the label as a small size control.
Before labelFontSize was used for all controls, as the label size should match the control size we need to have different functions for each control size.
Closes #131
This will work properly with very long lines and soft wrap Fixes #869.
This enables VoiceOver user to see the document view as a single element and interact with it (i.e. inspect its subelements) only when needed by using the VO-Shift-down shortcut (and stop interacting with it using VO-Shift-up shortcut). This makes the element structure more hierarchical where at the top level are only major user interface components, so that it's easier for orientation. It also prevents unrelated UI elements to be sequential as VoiceOver by default orders elements by the visual order (top-down, left-right) rather then the order in the AXChildren array. For example in this case, the bottom status bar of the document window gets separated from the bottom toolbar of the file browser, unlike the situation before grouping when both bars were adjacent to the VoiceOver user.
This fixes semantics of the button and thus also its accessibility. The macro recording button represents state - more specifically a boolean state, so it has to be a NSToggleButton (or its specialization). Then the button is presented to the VoiceOver user as an AXCheckbox - that is a checkbox with on and off value - which is exactly what the button's function is. Examples of this in system apps is e.g. the "Play" button in QuickTime Player, which is also an AXCheckbox ("Pause" is then simply an unchecked "Play" checkbox).
VoiceOver reads an AXValue for a pop-up button - that is the selected item. But button's title does not set an AXValue, as it probably is not a menu item. So change the code set to the title by setting a single menu item with that title. This fixes accessibility of the pop-up when accessing its value before it is first popped up. It makes the code consistent with setGrammarName: which works fine (that's how I discovered how to fix it).
When enabled the height of the document is increased by the height of the view port, which means the last lines of the document are not anchored to the bottom of the view port but can e.g. be centered. Closes #513.
Before using the 'Open…' dialog caused the discreet graphics chip to be enabled until TextMate exited. Setting this flag tells the OS that we want and are able to use the integrated graphics to conserve the battery. Detailed in Apple Technical Q&A QA1734: http://developer.apple.com/library/mac/#qa/qa1734/
Previously this appeared correct because once you clicked the minimum height of the pop-up menu set it to the correct height. Corrects an issue noted by @fatiotus in #728.
- Set compression priorities to collapse fields in a desirable order. - Increase default width of selection string to fit 8888:88 - Set grammar popup to the width of the active grammar and give is sensible minimum/maximum widths. - Set a maximum width for the tab size menu.
This is required now that they are set as opaque.
This is to match the minimum allowed size for the sidebar header when the tabs above document is enabled, also matches the height of the forthcoming tab redesign.
Added .less files to the OakAppKit .plist bindings file as another grid icon, to go along with the existing .css, .sass and .scss definitions. Signed-off-by: Bob Rockefeller <bob@bobrockefeller.com>
This code is public domain. Closes #166.
Since a document cannot send notifications, this will allow the SymbolChooser to monitor and respond to notifications from the DocumentView.
This would mainly happen when creating new windows with a file browser. Described at: http://stackoverflow.com/questions/5812593/nswindow-textured-gradient-fill-weirdness http://stackoverflow.com/questions/7795505/nswindow-textured-background-with-nstextfield/11482772#11482772
NSShadowAttributeName has no effect when using CTFrame. Use CGContextSetShadowWithColor instead.
This change adds new option for showing tab bar only above document, so the file browser header lines up with tab bar. File browser header height reduced by 1 pixel to match tab bar height. It also draws optional top divider when in same line as tab bar
Any file should be able to be opened within TextMate, so Option-DblClick will always do that. I first noticed this with .xib files. Because of the order of the if statements, opening an alias to a package or binary file (or .xib) would not have the previous if statements applied to it.
For aesthetic reasons the focus ring is disabled as there is no other control that can be active, however this is not the case with full keyboard access enabled as you can tab through the scope bar as well.
- Remove focus ring from search field as there is no second target. - Set top and bottom border widths for the textured window. - Remove miniaturize and zoom buttons for lack of utility. - Match name of window to menu command. - Various color and spacing tweaks.
Font name and font size was being used in the cache key as a way to avoid having to do cache invalidation. This comes at a price of a 3X slow down. Instead clear the cache when font size/name changes. Excessive font name/size switching should be deterred IMO, why not with slowdowns? so no real downside. This does not affect themes setting font name/size, as they are handled by another mechanism.
- The shading is a combination of the scope bar and textured button used in Lion/Mountain Lion. - Add an inactive state. - Increase click area of the forward/back buttons while decreasing the image size. - Switch popup menu cell to NSBackgroundStyleLight, previously the text would go to gray when inactive this prevents that though it does lose the drop shadow. - Various tweaks to alignment and spacing.
Issues remaining: * VoiceOver for some reason cannot track keyboard focus (i.e. moving down the list with just down arrow does not move VoiceOver cursor). User has to move the VO cursor instead using VO-down (and keyboard cursor follows in this case) * the pasteboard window isn't focused automatically for VoiceOver, user has to switch manually to it using VO-F2-F2
When you control-click the empty part of the file browser and select “Show in Finder” a Finder window will open showing the currently selected folder. You can go about this other ways, but I find that this feature complements the already existing "New Folder" menu item in the no-items-selected context menu of the file browser. This patch is public domain.
This reveals the current document in the file browser, by expanding directories to reach it, rather than changing the root directory of the browser.
Do some checks to see if there is more to parse on the following line, before invoking the (layout) callback.
Zoom is an OS X accessibility feature that lets sighted visually impaired users magnify screen content. This commit notifies Zoom of changes of TextMate’s caret position on screen so that Zoom can automatically follow the caret when the user moves it.
This commit adds support for most common accessibility methods/attributes to the OakTextView component. In user's language, VoiceOver users (i.e. blind and visually impaired users) can now use TextMate to read and write text. A few less used accessibility attributes remain to be supported - especially AttributedStringForRange and StyleRangeForIndex which should allow blind users to e.g. see and seek for spelling errors in text.
Backwards compatibility for commands that expect the variable to always exist or match the NO state, this matches the behavior of 1.x.
If changes are limited to visible rows, we only reload these.
This is when generating HTML for the release notes, manual, and, where we actually need this, list of contributions. Long-term we should probably switch to template tags as we are effectively adding code to the (otherwise declarative) build graph, which means we don’t have any way to tell if the generated HTML is up-to-date or not (as that would require analyzing the embedded ruby code).
Disabling this is achieved by setting `fileBrowserDocumentStatus` to `false` in `.tm_properties`. Disabling it should remove potential delays after opening, closing, and saving files when file browser is showing a lot of files. It is meant as a temporary workaround until the performance issues are addressed.
A user may read the text and use GitHub’s download button, thinking this is what the README refers to.
Re-layout input & output fields, so they don't enlarge whole drawer too much.
Previously, if no themes were active, the gutter colors would not be set. This would, effectively, give you random gutter colors on TextMate startup. (or, sometimes, a completely transparent gutter).
This includes bundle changes.
Fixes #445.
Fixes issue #77.
You can now use CTRL+S and CTRL+SHIFT+S to jump forwards/backwards in the incremental search results
A courtesy to anyone with images and illustrator files in their project!
1. Removed the alpha channels from all images. 2. Deleted unnecessary double images. (@sorbits: You might want to rename them to more accurately display what they do.) 3. Slight adjustments to improve the visibility of the bookmark icons at lower font sizes.
The following four new keys have been added: - gutterIconsHover - gutterIconsPressed - gutterSelectionIconsHover - gutterSelectionIconsPressed
__attribute__((format(...))) was added to NSAlert's class-based initializer in 10.7, and due to using string objects instead of literals as informative text, Clang is unable to guarantee the safety of the formatter, and, as such, issues a warning.
* Note: Column delimiter is back to four spaces due to XML/XSL not allowing control characters
Implemented proper alignment of the icons with the line number font.
* Changed the Subversion status command to output XML * Updated the status parsing to handle new XML output
This can be used together with `TM_SCM_BRANCH` to customize `windowTitle`.
Variables customizing `windowTitle` such as `$TM_SCM_BRANCH` can change while TM is inactive, while user is working in command line or different app. So it is better to refresh `windowTitle` once we get back to TM.
Unfortunately a printf precision specifier (‘%.*s’) can not come with a width specifier so we have to cast to int. The width specifier ‘t’ is used for ptrdiff_t. The int → NSInteger change fixed a bug with popup menu positioning, but there was no associated warning or error. It's possible there are more such bugs that we haven't found yet!
- Property using superclass ivar - Multiple methods matching selector
As we are no longer using Carbon functions to set menu key equivalents, this means that bundle menu items which have the same key equivalents as main menu items will unfortunately not display their key equivalents in the menu.
Only attempt to show the item in Finder if it is a file
After dragging the HTML Output window down below the bottom of the main window it cannot be dragged back and negative height of HTML Output is saved to file.
* Rewrote the Subversion SCM driver to use the svn executable * Badges work just like Mercurial * TM_SCM_BRANCH is set to the full repository URL for the working copy See issue #273.
New theme setting: gutterSelectionForeground
This closes issue #5.
New theme setting: gutterSelectionBackground
The left and right borders are no longer visible, so the results are flush with the edges of the find window.
As all the icons have been remade some of them should look better on non-retina also. This closes issue #42.
Theme setting keys gutterForeground, gutterBackground, and gutterDivider
This allows the border to appear properly when scrolling (with a multitouch device) bounces past the end of the content.
Previously disabled items could not be selected, and hence not be re-enabled.
On a ^Q text reformat, trailing whitespaces were not removed. Typically whitespace is typically considered undesirable.
This applies to scoped font size settings and should be faster than the previous std::string based approach.
This should be faster (and probably more precise) than the previous std::string based color manipulations.
This is using NSAttributedString’s NSTextTableBlocks: * Font is determined from current menu rather than hardcoded * Fixed: Invalid font size on bundle-item popup * Fixed: Both tab triggers and key equivalents can co exists on single menu item * No relayout calculations are needed after menu update (this is done automatically by NSLayoutManager when using NSTextTables) * Uses 10.5 compatible API
Do not specify selected index explicitely, popup menu item with NSOnState gets selected by default.
fixup! Draw tab triggers and key equivalents in menu Fix memory leak
The old techniques used to set key equivalents no longer work. Unfortunately, this technique is only a workaround and is not pixel-for-pixel identical due to the way NSMenuItem lays itself out when rendering a key equivalent; but I think it's the best that can be done for now.
This allows the project to build with the system default framework/include/library paths.
Using this allows other software to check whether configure was successful. This patch is public domain.
git commit fails when user.name and user.email aren't set. Unfortunately using git commit --author='Test Test <test@example.com>' doesn't work. This could happen in environments where pristine users are used to build software. This patch is public domain.
Only one octothorpe now.
It's a good looking editor, let's see a picture.
"Full Screen Menu Item" template from Object Library in Interface Builder, with key binding removed
In Interface Builder: Attributes Inspector -> Full Screen -> Primary Window
When the last tab is closed the window will be kept open if the file browser is shown. It will close the existing document and replace it with a scratch document.
If another user (on the same system) builds TextMate then he blocks everyone else, as other users would be unable to overwrite /tmp/dummy.
This is mainly for calling ‘mate «directory»’. Reference http://lists.macromates.com/textmate/2012-August/035164.html
Brings TM2 in line with the promises in http://manual.macromates.com/en/using_textmate_from_terminal.html Could probably be written nicer, I just don't get C++!
Example: previously it was not possible to open a URL like txmt://open?url=file:///Library/Keyboard%20Layouts/
This enables SCM badges for disk images. The check is done using the new (10.7) kCFURLVolumeIsLocalKey.
GlimmerBlocker (http://GlimmerBlocker.org) and other proxies may intercept the web data and replace the HTTP/1.0 response with a HTTP/1.1 response. Modified test to accept either.
https://github.com/mxcl/homebrew/commit/ff13af6fb37b378c9edb3a91fe3d6016c36661b5
This way it can be installed anywhere as long as the C compiler can find it.
In order to build from TextMate you also need to set the PATH variable.
Markdown syntax is not case sensitive for hyperlink tags, so use different tags for ninja, the build system, and Ninja, the TextMate Bundle.