-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #345 from hardpixel/gnome45
Port to gnome 45
- Loading branch information
Showing
22 changed files
with
457 additions
and
2,121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,40 @@ | ||
const GObject = imports.gi.GObject | ||
const Main = imports.ui.main | ||
const Me = imports.misc.extensionUtils.getCurrentExtension() | ||
const Handlers = Me.imports.handlers | ||
const PanelManager = Me.imports.panel.PanelManager | ||
const LayoutManager = Me.imports.layout.LayoutManager | ||
const WindowManager = Me.imports.window.WindowManager | ||
|
||
var UniteExtension = GObject.registerClass( | ||
class UniteExtension extends GObject.Object { | ||
_init() { | ||
this.panelManager = new PanelManager() | ||
this.layoutManager = new LayoutManager() | ||
this.windowManager = new WindowManager() | ||
} | ||
|
||
get focusWindow() { | ||
return this.windowManager.focusWindow | ||
} | ||
|
||
activate() { | ||
Handlers.resetGtkStyles() | ||
|
||
this.panelManager.activate() | ||
this.layoutManager.activate() | ||
this.windowManager.activate() | ||
|
||
Main.panel.add_style_class_name('unite-shell') | ||
} | ||
|
||
destroy() { | ||
Handlers.resetGtkStyles() | ||
|
||
this.panelManager.destroy() | ||
this.layoutManager.destroy() | ||
this.windowManager.destroy() | ||
|
||
Main.panel.remove_style_class_name('unite-shell') | ||
} | ||
import { Extension } from 'resource:///org/gnome/shell/extensions/extension.js' | ||
import * as Main from 'resource:///org/gnome/shell/ui/main.js' | ||
import * as Handlers from './handlers.js' | ||
import { PanelManager } from './panel.js' | ||
import { LayoutManager } from './layout.js' | ||
import { WindowManager } from './window.js' | ||
|
||
export default class UniteExtension extends Extension { | ||
enable() { | ||
global.unite = this | ||
|
||
this.panelManager = new PanelManager() | ||
this.layoutManager = new LayoutManager() | ||
this.windowManager = new WindowManager() | ||
|
||
Handlers.resetGtkStyles() | ||
|
||
this.panelManager.activate() | ||
this.layoutManager.activate() | ||
this.windowManager.activate() | ||
|
||
Main.panel.add_style_class_name('unite-shell') | ||
} | ||
) | ||
|
||
function enable() { | ||
global.unite = new UniteExtension() | ||
global.unite.activate() | ||
} | ||
disable() { | ||
Handlers.resetGtkStyles() | ||
|
||
function disable() { | ||
global.unite.destroy() | ||
global.unite = null | ||
this.panelManager.destroy() | ||
this.layoutManager.destroy() | ||
this.windowManager.destroy() | ||
|
||
Main.panel.remove_style_class_name('unite-shell') | ||
|
||
global.unite = null | ||
} | ||
|
||
get focusWindow() { | ||
return this.windowManager.focusWindow | ||
} | ||
} |
Oops, something went wrong.