File tree Expand file tree Collapse file tree 3 files changed +15
-12
lines changed Expand file tree Collapse file tree 3 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -7,14 +7,16 @@ export default class WsmatrixExtension extends Extension {
7
7
let settings = this . getSettings ( ) ;
8
8
let keybindings = this . getSettings ( this . metadata [ 'keybindings-schema' ] ) ;
9
9
this . overrideWorkspace = new WorkspaceManagerOverride ( settings , keybindings ) ;
10
+ this . overrideWorkspace . enable ( ) ;
10
11
this . overrideOverview = new OverviewManager ( settings ) ;
12
+ this . overrideOverview . enable ( ) ;
11
13
}
12
14
13
15
disable ( ) {
14
- this . overrideWorkspace . destroy ( ) ;
16
+ this . overrideWorkspace . disable ( ) ;
15
17
this . overrideWorkspace = null ;
16
18
17
- this . overrideOverview . destroy ( ) ;
19
+ this . overrideOverview . disable ( ) ;
18
20
this . overrideOverview = null ;
19
21
}
20
22
}
Original file line number Diff line number Diff line change @@ -8,12 +8,12 @@ import {PACKAGE_VERSION} from 'resource:///org/gnome/shell/misc/config.js';
8
8
export default class OverviewManager {
9
9
constructor ( settings ) {
10
10
this . _settings = settings ;
11
- this . _initOverrides ( )
12
- . then ( this . _handleShowOverviewGridChanged . bind ( this ) )
13
- . catch ( e => console . error ( e ) ) ;
11
+ }
14
12
15
- // this._handleShowOverviewGridChanged();
13
+ async enable ( ) {
16
14
this . _connectSettings ( ) ;
15
+ await this . _initOverrides ( ) ;
16
+ this . _handleShowOverviewGridChanged ( ) ;
17
17
}
18
18
19
19
// This can be moved to the constructor again if there is no need for the conditional
@@ -63,7 +63,7 @@ export default class OverviewManager {
63
63
this . _overrides . forEach ( o => o . disable ( ) ) ;
64
64
}
65
65
66
- destroy ( ) {
66
+ disable ( ) {
67
67
this . restore ( ) ;
68
68
this . _disconnectSettings ( ) ;
69
69
}
Original file line number Diff line number Diff line change @@ -36,13 +36,14 @@ export default class WorkspaceManagerOverride {
36
36
this . _keybindings = keybindings ;
37
37
this . _overviewKeybindingActions = { } ;
38
38
this . monitors = [ ] ;
39
- this . _initOverrides ( )
40
- . then ( this . _overrideOriginalProperties . bind ( this ) )
41
- . catch ( e => console . error ( e ) ) ;
39
+ }
40
+
41
+ async enable ( ) {
42
+ await this . _initOverrides ( )
42
43
43
44
this . _overrideDynamicWorkspaces ( ) ;
44
45
this . _overrideKeybindingHandlers ( ) ;
45
- // this._overrideOriginalProperties();
46
+ this . _overrideOriginalProperties ( ) ;
46
47
this . _handleNumberOfWorkspacesChanged ( ) ;
47
48
this . _handleMultiMonitorChanged ( ) ;
48
49
this . _handleWraparoundModeChanged ( ) ;
@@ -69,7 +70,7 @@ export default class WorkspaceManagerOverride {
69
70
}
70
71
}
71
72
72
- destroy ( ) {
73
+ disable ( ) {
73
74
this . _destroyWorkspaceSwitcherPopup ( ) ;
74
75
this . _restoreLayout ( ) ;
75
76
this . _restoreKeybindingHandlers ( ) ;
You can’t perform that action at this time.
0 commit comments