Browse Source

Remove the docmanager mode, now that it is not used.

Jason Grout 4 years ago
parent
commit
1a829f1cd6

+ 0 - 7
packages/docmanager-extension/src/index.ts

@@ -257,13 +257,6 @@ Available file types:
     // regenerate the settings description with the available options.
     registry.changed.connect(() => settingRegistry.reload(pluginId));
 
-    if (labShell) {
-      labShell.modeChanged.connect((_, args) => {
-        docManager.mode = args;
-      });
-      docManager.mode = labShell.mode;
-    }
-
     return docManager;
   }
 };

+ 2 - 28
packages/docmanager/src/manager.ts

@@ -3,7 +3,7 @@
 
 import { ISessionContext, sessionContextDialogs } from '@jupyterlab/apputils';
 
-import { PathExt, PageConfig } from '@jupyterlab/coreutils';
+import { PathExt } from '@jupyterlab/coreutils';
 
 import { UUID } from '@lumino/coreutils';
 
@@ -25,7 +25,7 @@ import { AttachedProperty } from '@lumino/properties';
 
 import { ISignal, Signal } from '@lumino/signaling';
 
-import { DockPanel, Widget } from '@lumino/widgets';
+import { Widget } from '@lumino/widgets';
 
 import { SaveHandler } from './savehandler';
 
@@ -82,22 +82,6 @@ export class DocumentManager implements IDocumentManager {
     return this._activateRequested;
   }
 
-  /**
-   * The document mode of the document manager, either 'single-document' or 'multiple-document'.
-   *
-   * This is usually synced with the `mode` attribute of the shell.
-   */
-  get mode(): DockPanel.Mode {
-    return this._mode;
-  }
-
-  /**
-   * Set the mode of the document manager, either 'single-document' or 'multiple-document'.
-   */
-  set mode(value: DockPanel.Mode) {
-    this._mode = value;
-  }
-
   /**
    * Whether to autosave documents.
    */
@@ -539,15 +523,6 @@ export class DocumentManager implements IDocumentManager {
     return registry.getWidgetFactory(widgetName);
   }
 
-  private _openInNewWorkspace(path: string) {
-    const newUrl = PageConfig.getUrl({
-      mode: this.mode,
-      workspace: 'default',
-      treePath: path
-    });
-    window.open(newUrl);
-  }
-
   /**
    * Creates a new document, or loads one from disk, depending on the `which` argument.
    * If `which==='create'`, then it creates a new document. If `which==='open'`,
@@ -630,7 +605,6 @@ export class DocumentManager implements IDocumentManager {
   private _isDisposed = false;
   private _autosave = true;
   private _autosaveInterval = 120;
-  private _mode: DockPanel.Mode = 'multiple-document';
   private _when: Promise<void>;
   private _setBusy: (() => IDisposable) | undefined;
   private _dialogs: ISessionContext.IDialogs;

+ 0 - 8
packages/docmanager/src/tokens.ts

@@ -41,14 +41,6 @@ export interface IDocumentManager extends IDisposable {
    */
   readonly activateRequested: ISignal<this, string>;
 
-  /**
-   * The mode of the document manager, either 'single-document' or
-   * 'multiple-document' and usually matches that of the shell. When this
-   * is 'single-document' the document manager will open documents in a
-   * separate browser tab.
-   */
-  mode: string;
-
   /**
    * Whether to autosave documents.
    */