seed r8 - trunk/examples
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r8 - trunk/examples
- Date: Sat, 18 Oct 2008 03:31:07 +0000 (UTC)
Author: racarr
Date: Sat Oct 18 03:31:07 2008
New Revision: 8
URL: http://svn.gnome.org/viewvc/seed?rev=8&view=rev
Log:
Libnotify test is now significantly more annoying.
Modified:
trunk/examples/notify-test.js
Modified: trunk/examples/notify-test.js
==============================================================================
--- trunk/examples/notify-test.js (original)
+++ trunk/examples/notify-test.js Sat Oct 18 03:31:07 2008
@@ -1,9 +1,25 @@
#!/usr/local/bin/seed
-
+Seed.import_namespace("Gtk");
+Seed.import_namespace("Gio");
Seed.import_namespace("Notify");
+
+Gtk.init(null, null);
+
+function file_changed(monitor, child, other, event)
+{
+ var notification =
+ new Notify.Notification({"summary": "File Notification",
+ "body" : "This is a poor libnotify example" });
+ notification.set_timeout(5000);
+ notification.show();
+}
+
Notify.init("Seed Test!");
-var notification = new Notify.Notification(
- {"summary" : "I am testling libnotify",
- "body" : "And it seems to be working!"});
-notification.set_timeout(1000);
-notification.show(null);
+
+file = Gio.file_new_for_path(".");
+monitor = file.monitor_directory();
+
+monitor.signal_changed.connect(file_changed);
+
+Gtk.main();
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]