forked from soutade/GnomeShellGenericMonitor
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
02d3e8b72a | |||
78254a550e | |||
7a5f506c23 |
15
extension.js
15
extension.js
@@ -31,7 +31,6 @@
|
||||
|
||||
const St = imports.gi.St;
|
||||
const Gio = imports.gi.Gio;
|
||||
const Lang = imports.lang;
|
||||
const GLib = imports.gi.GLib
|
||||
const Main = imports.ui.main;
|
||||
const Mainloop = imports.mainloop;
|
||||
@@ -63,8 +62,9 @@ class SignalMgt {
|
||||
this.fullname = this.name + '@' + this.group;
|
||||
this.dbus = dbus;
|
||||
this.menu = menu;
|
||||
this.signals = new WeakMap();
|
||||
this.widgets = new Array();
|
||||
this.signals = new WeakMap();
|
||||
this.widgets = new Array();
|
||||
this.timeouts = new Array();
|
||||
|
||||
this.nbClicks = 0;
|
||||
this.button = -1;
|
||||
@@ -81,6 +81,8 @@ class SignalMgt {
|
||||
destructor() {
|
||||
for(let widgetIdx in this.widgets)
|
||||
this.disconnectWidgetSignals(this.widgets[widgetIdx]);
|
||||
for(let timeoutIdx in this.timeouts)
|
||||
GLib.Source.remove(this.timeouts[timeoutIdx]);
|
||||
}
|
||||
|
||||
updateSignals(item) {
|
||||
@@ -105,7 +107,7 @@ class SignalMgt {
|
||||
id = widget.connect('scroll-event', this._onScroll.bind(this));
|
||||
array.push(id);
|
||||
widget.set_reactive(true);
|
||||
id = widget.connect('button-release-event', Lang.bind(this, this._clicked));
|
||||
id = widget.connect('button-release-event', this._clicked.bind(this));
|
||||
array.push(id);
|
||||
}
|
||||
|
||||
@@ -169,8 +171,9 @@ class SignalMgt {
|
||||
this.button = event.get_button();
|
||||
this.nbClicks = 1;
|
||||
|
||||
Mainloop.timeout_add(this.dbus.ClutterSettings['double-click-time'],
|
||||
Lang.bind(this, this._doClickCallback));
|
||||
let sourceId = Mainloop.timeout_add(this.dbus.ClutterSettings['double-click-time'],
|
||||
this._doClickCallback.bind(this));
|
||||
this.timeouts.push(sourceId);
|
||||
}
|
||||
|
||||
return Clutter.EVENT_PROPAGATE;
|
||||
|
@@ -2,8 +2,9 @@
|
||||
"uuid": "generic-monitor@gnome-shell-extensions",
|
||||
"name": "Generic Monitor",
|
||||
"description": "Display text & icon on systray using DBUS",
|
||||
"version": "5",
|
||||
"version": "6",
|
||||
"shell-version": [
|
||||
"41",
|
||||
"40",
|
||||
"3.38",
|
||||
"3.36"
|
||||
|
Reference in New Issue
Block a user