Commit Graph

138 Commits

Author SHA1 Message Date
Matthew Dapena-Tretter
a4c06c039d Add a way to force a pane to destroy its item
When cleaning up after a package that provides a permanent dock item,
you want to be able to destroy it easily. This provides API for doing
so.
2017-04-15 13:28:30 -07:00
Max Brunsfeld
e14e31d9b5 Don't copy workspace items that don't implement .copy()
Signed-off-by: Nathan Sobo <nathan@github.com>
2017-04-05 10:48:31 -06:00
Matthew Dapena-Tretter
3b23ab44bc Add getLocation() to PaneContainer class
This allows the location to be inspected without having to jump to the
DOM and searching for a dock element.
2017-03-27 17:45:21 -07:00
Damien Guard
9e5353a343 Prevent text from leaving fixture modified 2016-11-29 16:55:14 -08:00
Indrek Ardel
55f3311c01 Remove unused variables 2016-09-26 20:52:13 +03:00
Antonio Scandurra
98fb29800a Don't use deprecate API in tests 2016-08-19 12:40:28 +02:00
Nathan Sobo
4b68e2f411 Remove trailing semicolon 2016-08-19 12:36:26 +02:00
Matthew Dapena-Tretter
fd29f96af9 Serialize active pane item using index instead of URI 2016-08-19 12:36:26 +02:00
Katrina Uychaco
6988546790 Update to use current APIs 2016-04-14 22:02:35 -07:00
Katrina Uychaco
7876d55d68 Merge branch 'master' of https://github.com/einarmagnus/atom into einarmagnus-master 2016-04-13 20:01:46 -07:00
Michelle Tilley
8575b38c7b Pending pane items shouldn't be made permanent before being replaced
Previously, when a Pane would replace a pending item with
another pending item, it would emit
`onItemDidTerminatePendingState` for that item, which was
not true because the item was actually being destroyed.
2016-04-02 17:48:24 -07:00
Michelle Tilley
f6d419c2f4 Merge pull request #11057 from atom/mkt-improve-pane-add-item-options
Move Pane::addItem 'pending' option to options object
(cherry picked from commit 53a9c22554)
2016-03-07 10:02:49 -08:00
Katrina Uychaco
e620232d35 Add new item before destroying pending item
Fixes atom/tabs#278

Signed-off-by: Michelle Tilley <binarymuse@github.com>
2016-03-03 17:46:02 -08:00
Ben Ogle
920d348014 Only move legit items to the top of the stack
Fixes #11002 cc @natalieogle
2016-02-29 11:32:28 -08:00
Michelle Tilley
d39418ad7c Add specs for Pane::setPendingItem and ::onItemDidTerminatePendingState
Signed-off-by: Katrina Uychaco <kuychaco@github.com>
2016-02-28 18:52:09 -08:00
natalieogle
420a8d8692 Add activatePreviousRecentlyUsedItem to pane model and add specs. 2016-02-27 20:45:02 -08:00
natalieogle
f7de9052d6 Update specs for itemStack. 2016-02-27 20:45:02 -08:00
natalieogle
463dc6955a Update spec for MRU tab functionality with correct function name. 2016-02-27 20:45:01 -08:00
natalieogle
3641cc0296 Remove redundant MRU function. 2016-02-27 20:45:01 -08:00
natalieogle
fe52ce6011 Modify serialize functions and add function to move through the item stack in order of most recently used. 2016-02-27 20:45:01 -08:00
natalieogle
6466cb489e Add serialize and deserialize functionality to the itemStack. 2016-02-27 20:45:01 -08:00
natalieogle
7a6c8f53a4 Add activateMostRecentlyUsedItem to pane model. 2016-02-27 20:45:00 -08:00
Katrina Uychaco
1c65d0e5e4 Changed Pane and TextEditor specs to match new pending behavior 2016-02-25 16:48:16 -08:00
Aaron Contreras
ee86cee4e0 Add specs for new commands, update old specs 2016-02-09 00:36:37 +01:00
Katrina Uychaco
44a648a9ea Destroy any existing pending pane item when adding a pending item 2016-01-14 17:21:48 -08:00
Katrina Uychaco
4fce3668b6 Update specs for pending item behavior 2016-01-13 21:40:32 -08:00
Katrina Uychaco
2d00163e18 Refactor pending item tests 2016-01-09 17:19:32 -08:00
Katrina Uychaco
67d49955f1 Add tests for pending pane items 2016-01-05 10:38:13 -08:00
Eli Fatsi
84a6f0cb75 Remap pane:show-item-9 to activate last pane item 2015-11-11 10:09:09 -07:00
Nathan Sobo
84aa8471b4 Pass AppDelegate to Workspace, Pane instead of bound functions
Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
2015-10-13 18:54:48 -06:00
Max Brunsfeld
369f3d2648 Don't use atom.{notifications,config,deserializers,confirm} in Pane
Still need to get rid of one use of showSaveDialogSync
2015-10-09 17:18:26 -07:00
Nathan Sobo
4808c9f9e8 Eliminate config and confirm global references in Pane 2015-10-07 16:32:47 -05:00
Max Brunsfeld
9924288a6f Use atom environment argument to deserialize in Pane, PaneAxis 2015-10-07 15:25:05 -05:00
Nathan Sobo
fd7fbbfea5 Move PaneContainer.deserialize to an instance method
Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
2015-10-07 15:24:55 -05:00
Nathan Sobo
ddb08d0c46 Avoid redundant onDidAddPaneItem notifications
Refs #9012
2015-10-05 12:34:49 -06:00
Nathan Sobo
b3b7b3f3dd Don’t use Serializable mixin in Pane 2015-09-22 10:37:15 -06:00
Nathan Sobo
3a1f103620 Get pane-spec passing without using model superclass 2015-09-22 10:37:07 -06:00
George Ogata
45694dcda0 Fire event before a pane is destroyed. 2015-07-23 18:47:38 -04:00
Einar Boson
b5c9a90ae0 🐛 Ask user to 'save as' if save fails when closing tab, fixes #7708 2015-07-05 03:44:22 +02:00
Nathan Sobo
8348b2c039 Throw exception when adding a non-object pane item 2015-07-01 13:29:13 -05:00
George Ogata
8a5dfeae05 Add Pane::onWillRemoveItem event. 2015-06-24 00:16:45 -04:00
Jesse Grosjean
05e6d9e55d Stop focusing specs on "Pane" 2015-06-06 22:22:47 -04:00
Jesse Grosjean
f88e21cbb0 Allow items to provide savePanel options. 2015-06-06 22:21:51 -04:00
liuxiong332
412fbdef54 add specs for pane's serialization 2015-04-14 21:31:59 +08:00
Kevin Sawicki
e51c8f3407 Add specs for save/saveAs error handling 2015-02-05 15:07:42 -08:00
Nathan Sobo
7f8ab72f53 Capitalize initialisms
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2015-01-12 22:00:24 -08:00
Ben Ogle
af052c79a7 nof 2014-11-10 13:32:58 -08:00
Ben Ogle
6159209d49 moveItemTo* -> moveItem* 2014-11-10 13:28:15 -08:00
Ardeshir Javaherchi
5e3b88f42d Add another test for moveItemToLeft 2014-11-10 11:25:17 -08:00
Ardeshir Javaherchi
a0e4d8b582 Add test for reordering tabs in linux 2014-11-10 11:25:17 -08:00