Commit Graph

193 Commits

Author SHA1 Message Date
Kevin Sawicki
fd1d872840 Prompt split editors to save on close
Previously an editor that was split into multiple panes would not
prompt to save correctly when the window was unloading.

This adds a new `windowCloseRequested` option passed through from the
beforeunload handler to the editor so that it can specially handle this
case.

Closes #5257
2015-02-04 17:14:46 -08:00
Nathan Sobo
e60a9e45f7 Display package name correctly for ::getUri deprecation warnings
We capture the package name during the call to ::addOpener and use it
if any open items have the deprecated ::getUri method.

Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2015-01-14 14:23:17 -07:00
Nathan Sobo
0a66e9d21e Centralize deprecation warnings about getUri in Pane::addItem 2015-01-14 11:36:28 -07:00
Nathan Sobo
56da4f49d4 Avoid spurious deprecation warnings when editor URIs are undefined
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2015-01-14 11:21:08 -07:00
Nathan Sobo
7f8ab72f53 Capitalize initialisms
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2015-01-12 22:00:24 -08:00
Ben Ogle
5a456c8552 📝 Add arg to pane::destroyItem() 2014-12-03 16:11:29 -08:00
Nathan Sobo
8a40be8345 Null guard container in Pane::destroyed 2014-12-02 11:57:38 -07:00
Nathan Sobo
fbc9c05096 Add Workspace::onDidDestroyPane
This helps with the background-tips conversion
2014-12-02 11:57:38 -07:00
Nathan Sobo
4591f00a65 Remove view registry references from the workspace model layer
Removed various ::getView methods from the model. Using the atom.views
global in the views for now, but going to switch them over to using a
locally assigned view registry instead in a subsequent commit.
2014-12-01 16:28:33 -08:00
Nathan Sobo
7dc9d0c8ce Add Workspace::onWillDestroyPaneItem
It is needed by the autosave package which previously relied on DOM
bubbling to coalesce events from various panes.
2014-12-01 10:39:29 -07:00
Ben Ogle
6159209d49 moveItemTo* -> moveItem* 2014-11-10 13:28:15 -08:00
Ardeshir Javaherchi
ff80545285 🐧 Add keymap implementation to reorder tabs in linux 2014-11-10 11:25:16 -08:00
Nathan Sobo
efd3329c50 Prompt to save modified items when closing a pane via pane:close
Fixes #4094
2014-11-10 07:55:37 -07:00
Nathan Sobo
33fde29acb Disallow activation of destroyed panes
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2014-11-07 15:45:21 -07:00
Nathan Sobo
86781e6f9a Assign pane container before emitting onDidAddPane events
Fixes #3972
2014-10-27 11:39:42 -06:00
Nathan Sobo
0ebedeec3a Merge remote-tracking branch 'origin/master' into ns-workspace-custom-elements
Conflicts:
	package.json
	src/workspace.coffee
2014-09-26 14:49:28 -06:00
Ben Ogle
683d0d1b16 Editor -> TextEditor 2014-09-25 15:14:29 -07:00
Ben Ogle
82c53b539a editor.coffee -> text-editor.coffee 2014-09-25 15:14:29 -07:00
Nathan Sobo
9d2bb71109 More cleanup 2014-09-25 12:35:08 -06:00
Nathan Sobo
1c58438124 Move PaneContainerView::confirmClose to the model layer 2014-09-24 15:46:01 -06:00
Nathan Sobo
df37d77895 Remove Pane::getViewClass as we now use a view provider 2014-09-24 15:28:34 -06:00
Nathan Sobo
2710c06313 WIP: First stab at custom element for panes
Still need to create a SpacePen shim for access via `atom.workspaceView`
property so we’re backward compatible with packages, but it basically
works.
2014-09-24 15:28:33 -06:00
Nathan Sobo
55cce48af1 Throw an exception if the same pane item is added twice in the workspace 2014-09-19 16:24:13 -06:00
Nathan Sobo
0877721ce9 Construct PaneAxisViews and PaneViews via ViewRegistry 2014-09-19 16:24:12 -06:00
Kevin Sawicki
95253758f3 Dispose emitter after emitting did-destroy 2014-09-18 11:51:45 -07:00
Ben Ogle
a81393320c Support a copyActiveItem param in Pane::split* methods 2014-09-04 16:41:20 -07:00
Nathan Sobo
67dc703c18 💄 docs 2014-09-03 16:46:53 -06:00
Nathan Sobo
7ad992e52f 💄 2014-09-03 16:35:46 -06:00
Nathan Sobo
87fb0b46f7 Deprecate theorist-provided behaviors in Pane 2014-09-03 16:31:14 -06:00
Nathan Sobo
873818ee52 Deprecate string-based event subscriptions 2014-09-03 16:21:42 -06:00
Nathan Sobo
877fa40a49 Activate next pane on before invoking onDidDestroy observers 2014-08-28 17:23:49 -06:00
Nathan Sobo
cee7539e35 Add PaneContainer::observePanes and ::onDidAddPane 2014-08-28 17:22:28 -06:00
Nathan Sobo
5471e9bccc Add PaneContainer::onDidDestroyPaneItem 2014-08-28 16:58:38 -06:00
Nathan Sobo
b60b9f3e3a Add Pane::observeItems 2014-08-28 16:40:54 -06:00
Nathan Sobo
12f78dd957 💄 2014-08-28 16:27:20 -06:00
Nathan Sobo
cea4db5381 Break pane API into sections 2014-08-28 16:24:53 -06:00
Nathan Sobo
345617e0f3 Clean up existing pane API docs 2014-08-28 15:57:30 -06:00
Nathan Sobo
78c24fb737 Remove legacy event documentation 2014-08-28 15:54:16 -06:00
Nathan Sobo
e88eb3012e Document Pane event subscription methods 2014-08-28 15:32:02 -06:00
Nathan Sobo
d7063c0932 Add Pane::onDidDestroy 2014-08-28 15:21:35 -06:00
Nathan Sobo
34cb5d6012 Don’t implement ::isActive in terms of the theorist model behavior 2014-08-28 15:21:10 -06:00
Nathan Sobo
4f826a70f8 Use Array instead of Sequence for Pane::items 2014-08-28 11:43:08 -06:00
Nathan Sobo
475dc6074c 💄 2014-08-28 11:43:08 -06:00
Nathan Sobo
40d93cd0cf Use Pane::setActiveItem internally so observers are invoked 2014-08-28 11:43:08 -06:00
Nathan Sobo
99d70b4a4e Don’t emit ::onDidChangeActiveItem events unless it really changes 2014-08-28 11:43:08 -06:00
Nathan Sobo
e7a7e86dea Add Pane::observeActive and ::observeActiveItem
These have behavior semantics, invoking the observer immediately with
the current value of the observed property.
2014-08-28 11:43:07 -06:00
Nathan Sobo
44d70aaa5b Add Pane::onDidChangeActive() 2014-08-28 11:43:07 -06:00
Nathan Sobo
2b63f8a4ee Add PaneContainer::onDidChangeActivePane 2014-08-28 11:43:07 -06:00
Nathan Sobo
8225f759bf Add Pane::onWillDestroyItem() 2014-08-28 11:43:07 -06:00
Nathan Sobo
2d58d9c8b5 Add Pane::onDidActivate 2014-08-28 11:43:07 -06:00