55 Commits

Author SHA1 Message Date
Allan Odgaard
b5c7170d9a Implement cancelOperation: for HTML output window (close via escape key) 2021-03-07 07:55:07 +01:00
Allan Odgaard
52d5239537 Change HTML output window back from NSPanel to NSWindow
The problem is that if another panel opens, that panel is not tied to our HTML output window, for example opening the Find dialog does not allow us to press return to search in the HTML output, and if we open a modal dialog, when that modal dialog is disposed, the *main window* will be brought to front (not the previously focused panel).

This effectively reverts commit 92953099e6.
2021-03-07 07:39:50 +01:00
Allan Odgaard
94d3b9b670 Remove old build files 2021-02-15 16:01:50 +01:00
Allan Odgaard
f7d765ba0e Add build files (for new build system) 2021-02-15 16:01:50 +01:00
Allan Odgaard
e80ef1d0b7 Remove use of OBJC_WATCH_LEAKS 2020-06-05 21:22:50 +07:00
Allan Odgaard
c93030b385 Remove all debug output from custom log macros
This provided value during early development, but has been unused for years, and it would generate too much noise if converted to os_log.

So better to just remove it all and add os_log statements as needed.
2020-06-05 21:22:50 +07:00
Allan Odgaard
4ec10c0923 Don’t annotate types and classes with PUBLIC
This was required when we linked each framework as its own thing, which we do not do anymore, and if we do go back to this system, we can simply have symbols public by default.
2020-06-05 21:22:50 +07:00
Allan Odgaard
c939c53f34 Don’t let HTMLOutputWindowController handle toggleHTMLOutput:
Now that the window is a panel, we can rely on the main window to close the window on toggle, even with the HTML window having key.
2020-05-13 18:50:02 +07:00
Allan Odgaard
8e6791324a Let app delegate handle workaround for “Move to Active Space” behavior
I don’t think the default behavior ever makes sense, so we are applying the change to all windows instead of handling it on a one-by-one basis.
2020-05-13 18:50:02 +07:00
Allan Odgaard
6042041505 Use NSWindowController as superclass for HTMLOutputWindowController 2020-05-13 18:50:02 +07:00
Allan Odgaard
92953099e6 Allow escape to dismiss HTML output window (by using NSPanel) 2020-05-13 18:49:55 +07:00
Allan Odgaard
b514114ec7 Access most system singletons using dot syntax
These are identified by having a prefix of shared, default, or standard in the class method.
2020-04-23 12:25:11 +07:00
Allan Odgaard
727e4e626f Do not set contentBorderThickness for HTML output view
This is no longer required due to using an NSVisualEffectView for the status bar.
2018-11-15 12:58:06 +07:00
Allan Odgaard
e70791ee89 Rename a bunch of constants to fix deprecation warnings (10.12) 2018-06-16 22:55:30 +02:00
Allan Odgaard
7255692cbf Do not mirror needsNewWebView in window controller 2016-10-03 22:05:39 +02:00
Allan Odgaard
e282dc2fd2 Remove commandRunner from HTMLOutputWindow and DocumentController 2016-08-28 13:32:49 +02:00
Allan Odgaard
bb038b0670 Remove unused HTMLOutputWindow properties 2016-08-28 13:32:48 +02:00
Allan Odgaard
894b33d0bf Set frame autosave name of HTML output windows during creation 2016-08-28 13:32:48 +02:00
Allan Odgaard
fce09a3edf Add mainFrameTitle property to OakHTMLOutputView 2016-08-28 13:32:48 +02:00
Allan Odgaard
c99e65b17c Let OakHTMLOutputView handle the “Stop Task?” warning sheet
This also allows for the sheet to automatically close, should the command exit before the user selects an action.
2016-08-28 13:32:47 +02:00
Allan Odgaard
3b3d86a320 Use WebView’s stopLoading instead of killing the running task
This is a more appropriate API to use for signalling that we wish to abort the running command.
2016-08-21 12:24:40 +02:00
Allan Odgaard
89c19eff61 Change ‘runningCommand’ getter to ‘isRunningCommand’ 2016-08-21 12:23:40 +02:00
Allan Odgaard
417193e089 Update link dependencies for all targets
Some targets were including headers from frameworks not specified in their link dependencies. For a clean build this could cause an issue because the header was not available at the time of building the target.

The updated link dependencies are also based on what a target’s tests require. Ideally tests would have separate link dependencies, but as we don’t want to maintain this manually, this will have to wait until the build system automatically handles link dependencies.

Currently the commit command uses constants from the CommitWindow framework but should actually not be linked with it. However, the optimizer will strip dead code, so it should not result in much if any difference in the resulting binary and does solve a build dependency issue.
2016-05-07 13:00:55 +02:00
Allan Odgaard
1e10ef8ac2 Workaround for 10.11 regression 2015-11-18 09:57:29 +07:00
Allan Odgaard
5ba236ec67 Remember HTML output window frame on a per command basis
Some commands clearly should not share output window frame, OTOH it might be tedious having to position every new command used (if the default position is undesired).

We should probably re-use last command’s frame if there isn’t already a frame stored for the command (that’s what TextMate 1.x did). It might also be possible to group commands via its semantic class, so all run commands use the same window frame, though currently semantic classes have unique (language) suffixes.
2014-08-30 15:41:21 +02:00
Etienne Samson
a52fc3493b Make the Find and HTML window switch back to a Space TM is actually in 2014-07-30 18:18:02 +02:00
Allan Odgaard
5b58397c41 Remove initWithRunner: method (refactor) 2014-03-29 18:58:53 +07:00
Allan Odgaard
c1dcc72c41 Make htmlOutputView a public property of the HTML output window 2014-03-29 18:58:53 +07:00
Allan Odgaard
74d6cc47da Use htmlOutputView.runningCommand instead of command::runner_t
The latter is updated via a dispatch queue and thus might be delayed (to after end of current event loop cycle). This is relevant when WebView itself terminates the URL loading and calls the “WebView should close” delegate method.

Here the HTML output view property has been updated (via the WebView delegate method) but the command runner has not yet executed the completion code (which updates it’s “is running” state).
2014-03-28 19:31:15 +07:00
Allan Odgaard
080dd3da18 Add showWindow:/close methods for HTML output window controller
These must be used for proper management of the “retainedSelf” property.
2014-03-28 10:19:05 +07:00
Allan Odgaard
cc446d98e5 Don’t let HTML output window itself keep track of open windows 2014-03-10 12:40:18 +07:00
Allan Odgaard
ee405e740f Refactor HTMLOutputWindow: Use properties and argument free init 2014-03-09 10:01:52 +07:00
Allan Odgaard
aa9b2a4b06 Use (custom) block based API for showing sheet 2014-03-09 10:01:52 +07:00
Allan Odgaard
09e5d88437 Refactor OakHTMLOutputView 2014-03-09 10:01:51 +07:00
Allan Odgaard
1e11a30a53 Remove redundant storage keywords for @property
These were required prior to the new 64 bit run-time.
2014-03-05 16:39:54 +07:00
Allan Odgaard
7287fc7359 Indicate that Find and HTML output are auxiliary windows
This doesn’t seem to change anything wrt. behavior, but perhaps it will in the future.
2014-02-09 23:09:21 +07:00
Allan Odgaard
e4a5db0f3b Only first call to window.close() would have an effect
This is a workaround for https://bugs.webkit.org/show_bug.cgi?id=121232
2013-09-12 23:46:04 +02:00
Allan Odgaard
f251c0b7d3 Do not re-use closed HTML output windows 2013-09-12 23:46:04 +02:00
Allan Odgaard
2f72f84ae5 Add leak watcher and some debug output 2013-09-12 23:46:04 +02:00
Allan Odgaard
1c308c810d Use map::emplace instead of inserting std::pair (C++11) 2013-09-05 20:59:11 +02:00
Allan Odgaard
6d1c334785 Add ability to close HTML output window on ⌃⌥⌘H 2013-08-21 13:44:17 +02:00
Allan Odgaard
ffb900deb1 Add missing include 2013-05-16 21:36:49 +07:00
Allan Odgaard
e1ff0ceaff Move already open find/HTML windows to active space
This is only when invoking the “order front” action and the window is already showing on another space.
2013-04-28 11:46:35 +07:00
Allan Odgaard
2c6504b82f Use symbolic constants for binding properties 2013-03-03 15:53:05 +01:00
Allan Odgaard
8ef92c29f9 Set bottom border for HTML window 2013-02-12 15:49:53 +01:00
Allan Odgaard
5c1eb0ae3e Use command name as title for output windows
The command can set a custom title so this is only for commands that doesn’t do that.
2013-01-25 13:15:36 +01:00
Allan Odgaard
4590a77a71 Switch HTML output window back to NSWindow
The motivation for using a panel was to avoid the window from becoming main (so key equivalents would be sent to the document window, if not handled by the HTML output window). Unfortunately window ordering ignores non-main windows when a window is closed meaning that bringing up the Find dialog from an HTML output window and then closing it, would bring the current main window to front, eclipsing the HTML output window.
2013-01-22 10:15:29 +01:00
Allan Odgaard
e325e26df5 fixup! Make HTML output window a panel 2013-01-10 06:40:03 +01:00
Allan Odgaard
03cf1fefb0 Make HTML output window a panel
This allows the main (document) window to handle menu keys (which are not handled by the HTML output window controller).
2013-01-08 22:48:08 +01:00
Allan Odgaard
987b12f694 Public API to make HTML output windows reusable 2013-01-08 22:48:08 +01:00