diff --git a/examples/user.js b/examples/user.js index 7103f0e..35afd69 100644 --- a/examples/user.js +++ b/examples/user.js @@ -3,7 +3,6 @@ var Meta = imports.gi.Meta; var Clutter = imports.gi.Clutter; var St = imports.gi.St; -var Tweener = imports.ui.tweener; var Main = imports.ui.main; var Shell = imports.gi.Shell; diff --git a/extension.js b/extension.js index 7532dcf..ceda859 100644 --- a/extension.js +++ b/extension.js @@ -54,13 +54,13 @@ function run(method) { function safeCall(name, method) { try { - log("#paperwm", `${method} ${name}`); + print("#paperwm", `${method} ${name}`); let module = Extension.imports[name]; module && module[method] && module[method].call(module, errorNotification); return true; } catch(e) { - log("#paperwm", `${name} failed ${method}`); - log(`JS ERROR: ${e}\n${e.stack}`); + print("#paperwm", `${name} failed ${method}`); + print(`JS ERROR: ${e}\n${e.stack}`); errorNotification( "PaperWM", `Error occured in ${name} @${method}:\n\n${e.message}`, @@ -135,7 +135,7 @@ function hasUserConfigFile() { } function installConfig() { - log("#rc", "Installing config"); + print("#rc", "Installing config"); const configDir = getConfigDir(); configDir.make_directory_with_parents(null); @@ -172,7 +172,7 @@ function initUserConfig() { } catch(e) { errorNotification("PaperWM", `Failed to install user config: ${e.message}`, e.stack); - log("#rc", "Install failed", e.message); + print("#rc", "Install failed", e.message); } } diff --git a/keybindings.js b/keybindings.js index 2eedfe8..9a96e23 100644 --- a/keybindings.js +++ b/keybindings.js @@ -341,7 +341,7 @@ function bindkey(keystr, actionName=null, handler=null, options={}) { } else { let boundAction = keycomboMap[keycombo]; if (boundAction && boundAction != action) { - log("Rebinding", keystr, "to", actionName, "from", boundAction.name); + print("Rebinding", keystr, "to", actionName, "from", boundAction.name); disableAction(boundAction) } diff --git a/kludges.js b/kludges.js index 93038b6..fa30ed8 100644 --- a/kludges.js +++ b/kludges.js @@ -360,7 +360,8 @@ function init() { registerOverridePrototype(imports.ui.messageTray.MessageTray, '_updateState'); registerOverridePrototype(WindowManager.WindowManager, '_prepareWorkspaceSwitch'); registerOverridePrototype(Workspace.Workspace, '_isOverviewWindow'); - registerOverridePrototype(Workspace.WindowClone, 'getOriginalPosition'); + if (Workspace.WindowClone) + registerOverridePrototype(Workspace.WindowClone, 'getOriginalPosition', getOriginalPosition); registerOverridePrototype(Workspace.Workspace, '_realRecalculateWindowPositions'); registerOverridePrototype(Workspace.UnalignedLayoutStrategy, '_sortRow'); registerOverridePrototype(WindowManager.WorkspaceTracker, '_checkWorkspaces', _checkWorkspaces); @@ -452,7 +453,6 @@ function enable() { }; - Workspace.WindowClone.prototype.getOriginalPosition = getOriginalPosition; Workspace.Workspace.prototype._realRecalculateWindowPositions = _realRecalculateWindowPositions; // Prevent any extra sorting of the overview Workspace.UnalignedLayoutStrategy.prototype._sortRow = (row) => row; diff --git a/notes.org b/notes.org index 5e93bc0..e83152e 100644 --- a/notes.org +++ b/notes.org @@ -110,7 +110,7 @@ Main.wm.allowKeybinding(name, Shell.ActionMode.ALL); global.display.connect( 'accelerator-activated', function(display, action, deviceId, timestamp){ - log('Accelerator Activated: [display={}, action={}, deviceId={}, timestamp={}]', + print('Accelerator Activated: [display={}, action={}, deviceId={}, timestamp={}]', display, action, deviceId, timestamp) }) #+END_SRC diff --git a/tiling.js b/tiling.js index a0c2542..1d78763 100644 --- a/tiling.js +++ b/tiling.js @@ -434,12 +434,12 @@ class Space extends Array { if (relayout) { if (fixPointAttempCount < 5) { - log("Trying to find layout fixpoint", fixPointAttempCount+1) + print("Trying to find layout fixpoint", fixPointAttempCount+1) i--; fixPointAttempCount++; continue; } else { - log("Bail at fixpoint, max tries reached") + print("Bail at fixpoint, max tries reached") } } diff --git a/topbar.js b/topbar.js index b435bfc..1100495 100644 --- a/topbar.js +++ b/topbar.js @@ -86,9 +86,9 @@ var PopupMenuEntryHelper = function constructor(text) { this.prevIcon.grab_key_focus(); }); - this.actor.add(this.prevIcon, {expand: true}); - this.actor.add(this.label, {expand: true}); - this.actor.add(this.nextIcon, {expand: true}); + this.actor.add_actor(this.prevIcon, {expand: true}); + this.actor.add_actor(this.label, {expand: true}); + this.actor.add_actor(this.nextIcon, {expand: true}); this.actor.label_actor = this.label; this.label.clutter_text.connect('activate', this.emit.bind(this, 'activate')); }