[hamster-applet] refresh the panel every 60 seconds



commit 3fb7994dfd62c48b5a984b94b243f8df334607dc
Author: Toms BauÄis <toms baugis gmail com>
Date:   Thu Jul 7 12:57:34 2011 +0300

    refresh the panel every 60 seconds

 src/shell_extension/extension.js |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/shell_extension/extension.js b/src/shell_extension/extension.js
index 9e33d28..5fbba3f 100644
--- a/src/shell_extension/extension.js
+++ b/src/shell_extension/extension.js
@@ -10,6 +10,7 @@
  */
 
 const DBus = imports.dbus;
+const GLib = imports.gi.GLib
 const Lang = imports.lang;
 const St = imports.gi.St;
 const Shell = imports.gi.Shell;
@@ -113,6 +114,9 @@ HamsterButton.prototype = {
 		this.facts = null;
 		this.currentFact = null;
 
+		// refresh the label every 60 secs
+		GLib.timeout_add_seconds(0, 60,
+								 Lang.bind(this, function () {this.refresh(); return true}))
 		this.refresh();
 
 



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