[gnome-shell-extensions/extension-live-disable] example: log initialization, enabling and disabling
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions/extension-live-disable] example: log initialization, enabling and disabling
- Date: Mon, 22 Aug 2011 20:53:45 +0000 (UTC)
commit 2d82dcbafa0dcb46802e9a6d4553c9b30172b547
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Thu Aug 18 19:38:54 2011 +0200
example: log initialization, enabling and disabling
This way the example extension can be used for debugging the
extension system.
extensions/example/extension.js | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/extensions/example/extension.js b/extensions/example/extension.js
index 68dfa2a..ee591c9 100644
--- a/extensions/example/extension.js
+++ b/extensions/example/extension.js
@@ -17,17 +17,23 @@ function _showHello() {
// Put your extension initialization code here
function init(metadata) {
+ log ('Example extension initalized');
+
imports.gettext.bindtextdomain('gnome-shell-extensions', metadata.localedir);
}
let signalId;
function enable() {
+ log ('Example extension enabled');
+
Main.panel.actor.reactive = true;
signalId = Main.panel.actor.connect('button-release-event', _showHello);
}
function disable() {
+ log ('Example extension disabled');
+
if (signalId) {
Main.panel.actor.disconnect(signalId);
signalId = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]