replacing signal handlers


How can I replace a signal handler?

More specifically, in line 258 of ui/main.js a handler is registered
  global.screen.connect('notify::n-workspaces', _nWorkspacesChanged);
Now I want to replace that handler.

What is the best way of doing this?

I tried replacing the function

imports.ui.main._nWorkspacesChanged = function(){ .... }

But it didn't (seem to) work.

When I registered a new handler, both handlers got executed and there seems to be no way of removing the existing handler.

Is there a way of replacing the hander (at run-time)?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]