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