Skip to content

Commit 75b0ee9

Browse files
committed
Revert useless changes to handle notebook shell
1 parent b876216 commit 75b0ee9

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

js/jupyterlab-slideshow/src/manager.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ export class DeckManager implements IDeckManager {
4444
protected _designTools: DesignTools | null = null;
4545
protected _settings: Promise<ISettingRegistry.ISettings>;
4646
protected _labShell?: LabShell | null;
47-
protected _notebookShell?: INotebookShell | null;
4847
protected _dockPanel: DockPanel | null = null;
4948
protected _shell: JupyterFrontEnd.IShell;
5049
protected _statusbar: StatusBar | null;
@@ -509,16 +508,15 @@ export class DeckManager implements IDeckManager {
509508
}
510509

511510
protected get _shellActiveWidget(): Widget | null {
512-
const { _labShell, _notebookShell, _dockPanel } = this;
511+
const { _labShell, _shell, _dockPanel } = this;
513512
if (_labShell && _dockPanel) {
514513
if (_labShell.activeWidget) {
515514
return _labShell.activeWidget;
516515
}
517516
return getSelectedWidget(_dockPanel);
518-
} else if (_notebookShell) {
519-
return _notebookShell.currentWidget || null;
517+
} else {
518+
return (_shell as INotebookShell).currentWidget || null;
520519
}
521-
return null;
522520
}
523521

524522
protected async _onSettingsChanged() {
@@ -603,7 +601,6 @@ export namespace DeckManager {
603601
export interface IOptions {
604602
commands: CommandRegistry;
605603
labShell: ILabShell | null;
606-
notebookShell: INotebookShell | null;
607604
shell: JupyterFrontEnd.IShell;
608605
translator: TranslationBundle;
609606
statusbar: StatusBar | null;

js/jupyterlab-slideshow/src/plugin.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { IFontManager } from '@deathbeds/jupyterlab-fonts';
2-
import { INotebookShell } from '@jupyter-notebook/application';
32
import {
43
JupyterFrontEnd,
54
JupyterFrontEndPlugin,
@@ -33,7 +32,7 @@ import '../style/index.css';
3332
const plugin: JupyterFrontEndPlugin<IDeckManager> = {
3433
id: `${NS}:plugin`,
3534
requires: [ITranslator, ISettingRegistry, IFontManager],
36-
optional: [ILabShell, INotebookShell, ILayoutRestorer, ICommandPalette, IStatusBar],
35+
optional: [ILabShell, ILayoutRestorer, ICommandPalette, IStatusBar],
3736
provides: IDeckManager,
3837
autoStart: true,
3938
activate: (
@@ -42,7 +41,6 @@ const plugin: JupyterFrontEndPlugin<IDeckManager> = {
4241
settings: ISettingRegistry,
4342
fonts: IFontManager,
4443
labShell?: ILabShell,
45-
notebookShell?: INotebookShell,
4644
restorer?: ILayoutRestorer,
4745
palette?: ICommandPalette,
4846
statusbar?: IStatusBar,
@@ -56,7 +54,6 @@ const plugin: JupyterFrontEndPlugin<IDeckManager> = {
5654
commands,
5755
shell,
5856
labShell: labShell || null,
59-
notebookShell: notebookShell || null,
6057
translator: (translator || /* istanbul ignore next */ nullTranslator).load(NS),
6158
statusbar: theStatusBar,
6259
fonts,

0 commit comments

Comments
 (0)