Nathan Sobo
685df18a3a
Fix breakages due to save method moving to Pane (except saveAll specs)
2013-03-07 09:30:28 -08:00
Nathan Sobo
3f9ee08e76
Handle save-as on pane. Replace 'editor:save-as' w/ 'core:save-as'
...
Pane will only show the saveAs dialog if the item has a `saveAs` method.
2013-03-07 09:30:28 -08:00
Nathan Sobo
59a06acc0b
Fire 'modified-status-changed' events on changes after save/reload
...
Buffer keeps state about the value with which it fired the last
modified-status-changed event so that it doesn't fire it twice with the
same boolean value. Every piece of code that triggers the event also
needs to set this state, so now everything goes through the
`triggerModifiedStatusChanged` method.
2013-03-07 09:30:28 -08:00
Nathan Sobo
699e780e99
Handle save in panes with new 'core:save' event
2013-03-07 09:30:28 -08:00
Nathan Sobo
54fc9efdcb
Eliminate fixturesProject global. Use project global instead.
2013-03-07 09:30:27 -08:00
Nathan Sobo
9f7b804a6c
Panes prompt to save modified items before destroying them
2013-03-07 09:30:27 -08:00
Nathan Sobo
43b41e9ed9
Fix spell check spec
2013-03-07 09:30:27 -08:00
Nathan Sobo
298a963148
Rework Buffer's 'contents-modified' event
...
This event now fires whenever the content of the buffer changes (after
a rate-limiting delay) with a single boolean indicating the modified
status of the buffer. There's now a separate event called
'modified-status-changed' to indicate events that change the boolean
value of the isModified method, so we don't need to fire
'contents-modified' when the underlying file is deleted for instance.
2013-03-07 09:30:27 -08:00
Nathan Sobo
a1dc2cfc2d
Tabs indicate when their items are modified
2013-03-07 09:30:27 -08:00
Nathan Sobo
24c9f11cc9
Trigger modified-status-changed on buffers/edit sessions
2013-03-07 09:30:27 -08:00
Nathan Sobo
29566d55c6
Scope split-view bindings on body so fuzzy-finder can open in splits
...
Previously, they were scoped on .pane, but fuzzy-finder isn't inside
a pane and still needs to be able to respond to split events.
2013-03-07 09:30:27 -08:00
Corey Johnson & Nathan Sobo
5bba4cd9f7
Kill dead tab view code
2013-03-07 09:30:27 -08:00
Corey Johnson & Nathan Sobo
5d9e20afa4
Make Editor.getPath return null if edit session is null
2013-03-07 09:30:27 -08:00
Corey Johnson & Nathan Sobo
15144514bb
Don't update editor's display if its edit session is null or destroyed
2013-03-07 09:30:27 -08:00
Corey Johnson & Nathan Sobo
c1e226d6a3
Kill unused event
2013-03-07 09:30:26 -08:00
Corey Johnson & Nathan Sobo
3bf31e440d
Remove code for setting the active editor from root view
...
Supplanted by "active pane"
2013-03-07 09:30:26 -08:00
Corey Johnson & Nathan Sobo
ae95c04bbc
Focus next pane when removing the last pane item of a focused pane
...
Previously, removing the last pane item also ruined our ability to
determine if the pane had focus. Now, if we're removing the last item,
we instead just go ahead and remove the entire pane. Remove contains
logic to switch focus to the next pane if its active view is focused,
which works as intended if we leave the active view in place.
2013-03-07 09:30:26 -08:00
Corey Johnson & Nathan Sobo
52b649dca5
Preserve focus when switching between pane items
...
If the pane is currently focused, when showing a view associated with
a new item, focus that view.
2013-03-07 09:30:26 -08:00
Corey Johnson & Nathan Sobo
3c9793d803
Fix TreeView specs
2013-03-07 09:30:26 -08:00
Corey Johnson & Nathan Sobo
6157a75868
Spec changeFocus option of RootView.open and default it to true
2013-03-07 09:30:26 -08:00
Corey Johnson & Nathan Sobo
5291924bcc
Set the project path when its first edit session is saved
2013-03-07 09:30:26 -08:00
Nathan Sobo
7145136cd9
Fix symbols view
...
Makes a lot of assumptions about getActiveView being an editor. We'll
need to revisit this.
2013-03-07 09:30:26 -08:00
Nathan Sobo
2b53655934
Fix status bar spec
2013-03-07 09:30:26 -08:00
Nathan Sobo
8dc3afbcce
Fix snippets spec
2013-03-07 09:30:26 -08:00
Nathan Sobo
2790e5d12b
Fix package generator spec
2013-03-07 09:30:25 -08:00
Nathan Sobo
5b0f5727dc
Fix GFM grammar spec
2013-03-07 09:30:25 -08:00
Nathan Sobo
a2ddd10d31
Get fuzzy-finder specs passing w/ new panes
...
Could still probably use some cleanup and I'm not sure everything is
working correctly with regards to focus.
2013-03-07 09:30:25 -08:00
Nathan Sobo
279ebc0958
Make RootView.getModifiedBuffers work w/ new system
...
Eventually, this should probably become getModifiedPaneItems so that
all kinds of items are given an opportunity to participate in the
saving system.
2013-03-07 09:30:25 -08:00
Nathan Sobo
2bfc73afaa
These should have been renamed w/ currentView/Item -> activeView/Item
2013-03-07 09:30:25 -08:00
Nathan Sobo
fab3b4564e
Add Pane.moveItemToPane specs. Fix bug moving the last edit session.
2013-03-07 09:30:25 -08:00
Nathan Sobo
fe0d3cad36
Remove multiple edit session handling from Editor
2013-03-07 09:30:25 -08:00
Nathan Sobo
d69335f08d
Kill dead code
2013-03-07 09:30:25 -08:00
Nathan Sobo
0238061fa2
Make tab drag & drop work with new panes system
2013-03-07 09:30:25 -08:00
Nathan Sobo
9655fa8898
Implement shouldAllowDrag in positive logic for tabs
2013-03-07 09:30:25 -08:00
Nathan Sobo
916c5caa3a
💄
2013-03-07 09:30:25 -08:00
Nathan Sobo
28141e315e
Make shouldAllowDrag method work properly
2013-03-07 09:30:24 -08:00
Nathan Sobo
47621bd3b2
Call Pane.destroyItem when close icon is clicked on a tab
2013-03-07 09:30:24 -08:00
Nathan Sobo
7aba839dac
Fix exception when pane items with no view are removed from the pane
2013-03-07 09:30:24 -08:00
Nathan Sobo
2e2ff3a1d0
Add Pane.destroyItem and rename removeActiveItem -> destroyActiveItem
...
Pane.removeItem removes an item, but no longer tries to call destroy
on it. This will facilitate moving items between panes.
2013-03-07 09:30:24 -08:00
Nathan Sobo
61fa393e03
Add indexOfPane and paneAtIndex to PaneContainer
2013-03-07 09:30:24 -08:00
Nathan Sobo
4a7e5b74c6
Make sure a pane view is showing before assigning its model object
2013-03-07 09:30:24 -08:00
Nathan Sobo
1d0cd16cd1
💄
2013-03-07 09:30:24 -08:00
Nathan Sobo
465bb14659
Reflect pane item order in tab bar
2013-03-07 09:30:24 -08:00
Nathan Sobo
887b5ea007
Add Pane.moveItem(item, index)
...
This is the precursor to supporting drag/drop of tabs within and
between panes.
2013-03-07 09:30:24 -08:00
Nathan Sobo
21990cf986
Add EditSession.getLongTitle
2013-03-07 09:30:24 -08:00
Nathan Sobo
3456b2db3c
Tabs try to use an item's longTitle if two tab titles are the same
...
This will replace edit-session-specific functionality that displayed
the file's parent directory when two files with the same name were
open.
2013-03-07 09:30:24 -08:00
Nathan Sobo
de8198084c
EditSession emits 'title-changed' events when its buffer path changes
2013-03-07 09:30:24 -08:00
Nathan Sobo
0c24843e52
Start converting tabs package to work with new panes / pane-items
2013-03-07 09:30:23 -08:00
Nathan Sobo
5240d9989f
Pane emits 'pane:item-removed' events
2013-03-07 09:30:23 -08:00
Nathan Sobo
dd120663b7
Pane emits 'pane:item-added' events
2013-03-07 09:30:23 -08:00