mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-08-16 06:00:22 +00:00
Simple fixes for 3.38
log no longer takes several arguments... actor.add seems brokenish?
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
+5
-5
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user