Commit Graph

29 Commits

Author SHA1 Message Date
Adam Strzelecki
143e651131 Provide TM_SCM_* variables for untitled document
When opening SCM manager folder TM opens untitled document in the editor area and the target folder in file browser. When one sets `windowTitle` to display SCM branch this is not displayed for untitled document. So one needs to open some existing file first.

This change sets SCM variables also for untitled document as if it was saved in selected file browser folder, effectively showing current SCM branch.
2012-09-04 00:00:36 +02:00
Zach Drayer
99fd86dab6 Fix warning for literal strings used with NSAlert
__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.
2012-09-03 16:42:16 +02:00
Adam Strzelecki
c28d2ec2fd Update window title when application is activated.
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.
2012-08-28 22:36:02 +02:00
Jacob Bandes-Storch
d4ce498f60 Use 64-bit: numeric type fixes
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!
2012-08-28 21:32:47 +02:00
Jacob Bandes-Storch
dfdde3283f Use 64-bit: explicit visibility where required 2012-08-28 21:32:47 +02:00
Jacob Bandes-Storch
0fcb4c2d2c Use libc++: don’t rely on implicit conversions 2012-08-28 20:10:55 +02:00
Jacob Bandes-Storch
e3aa997b06 Use libc++: replace std::tr1 with std 2012-08-28 13:30:20 +02:00
Jacob Bandes-Storch
40db25c712 Title case tab context menu items 2012-08-27 01:03:16 +02:00
Lukasz Czekaj
19457ad2e8 Fixed negative height bug in htmlOutputView
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.
2012-08-26 17:48:47 +02:00
Allan Odgaard
6f45ee4a9c Use encoding::type for open related API 2012-08-26 17:06:38 +02:00
Allan Odgaard
d1de4a8854 Use encoding::type for save related API
There is also a new document_t::encoding_for_save_as_path which returns the encoding that would be used for the document, if saved at the given path. If the document was loaded from disk, it will return the encoding used during load, otherwise it will check tmProperties for which encoding should be used for the path provided. Save dialog for untitled documents will be pre-populated with the result of the above function.
2012-08-26 16:13:20 +02:00
Allan Odgaard
0ca407b72c Move user defaults keys to Keys.{mm,h} 2012-08-25 23:14:15 +02:00
Allan Odgaard
360f7a33bd Add context menu to tab bar
This can be used to close current, other, and tabs on the right. Additionally to create a new tab (to the right of the tab showing the menu) or open the tab in a new window.

Closes issue #191.
2012-08-25 17:54:24 +02:00
Allan Odgaard
3c79f275f1 Use constants for settings keys 2012-08-23 17:15:12 +02:00
Gerd Knops
9d17d74b1b File Browser will now remember it's width
This closes issue #5.
2012-08-22 15:48:34 +02:00
Paul Wilde
cd84a864d2 Added Retina icons for bottom bar and file browser
As all the icons have been remade some of them should look better on non-retina also.

This closes issue #42.
2012-08-22 14:34:25 +02:00
Allan Odgaard
4e9d9414f1 Add encoding options to save dialogs
A minor caveat is that if there are encoding or newline (folder specific) settings in effect for the chosen path, these trump what’s selected in the save dialog.

If we wish to solve this, the best would be to update the options (shown in the save panel) based on selected folder/filename (and the settings in effect for that).

This closes issue #163.
2012-08-21 23:45:45 +02:00
Allan Odgaard
4606e4bca5 Simplify creating an OakEncodingPopUpButton
We now do the (sort of required) sizeToFit in the initializer. Users can still bypass this by using initWithFrame:pullsDown: instead of init:.
2012-08-20 22:36:12 +02:00
Allan Odgaard
cf1b4750e4 Go to Current Document is now a toggle
This also works as a (quick) way to deselect all in the file browser (i.e. hit ⌃⌘R twice) which is useful when one wants to run commands on the entire project (e.g. Git → Show Uncommitted Changes).
2012-08-18 15:30:24 +02:00
Bo Xiao
96cb899b53 Initial commit of Simplified Chinese localization for xib files. 2012-08-14 21:29:51 +02:00
Allan Odgaard
e5c2daa05a Revert "Use current document when no URL given in txmt URL"
Pending improved implementation which also handle the case where frontmost document is untitled.

This reverts commit 2beac7080b.
2012-08-14 18:43:37 +02:00
jtbandes
bf2fa756ce Fix xib warnings 2012-08-11 23:04:00 -07:00
jtbandes
ee11103d2d Change deployment target of all xibs to OS X 10.7 2012-08-11 23:04:00 -07:00
jtbandes
45b68389f2 Save all xibs with Xcode 4.4.1 (4F1003) 2012-08-11 23:04:00 -07:00
Jesse B. Hannah
824e9b5f27 Added fullscreen behavior to document window
In Interface Builder: Attributes Inspector -> Full Screen -> Primary
Window
2012-08-11 21:18:25 +02:00
Mads Hartmann Jensen
dc37506831 Keep window open after closing last tab. Fixes #24.
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.
2012-08-11 17:05:05 +02:00
Adam Strzelecki
db294ba346 If opening an already open folder, bring window to front
This is mainly for calling ‘mate «directory»’. Reference http://lists.macromates.com/textmate/2012-August/035164.html
2012-08-10 21:32:08 +02:00
Gerd Knops
2beac7080b Use current document when no URL given in txmt URL
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++!
2012-08-10 19:17:35 +02:00
Allan Odgaard
9894969e67 Initial commit 2012-08-09 16:25:56 +02:00