[seed] Gnio server example should use new imports system



commit 7833b171a4d73b863e158df8378bf2c327119c73
Author: Robert Carr <racarr svn gnome org>
Date:   Tue Apr 28 15:59:39 2009 -0400

    Gnio server example should use new imports system
---
 examples/Gnio-server.js |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/examples/Gnio-server.js b/examples/Gnio-server.js
index 9a2221d..51c0bda 100755
--- a/examples/Gnio-server.js
+++ b/examples/Gnio-server.js
@@ -1,6 +1,6 @@
 #!/usr/bin/env seed
-Seed.import_namespace("Gnio");
-Seed.import_namespace("Gio");
+Gnio = imports.gi.Gnio;
+Gio = imports.gi.Gio;
 
 // I don't think this is the right way of doing things.
 var r = new Gnio.Resolver();
@@ -24,12 +24,10 @@ ds = Gio.DataInputStream._new(new Gnio.SocketInputStream({socket: client}));
 os = Gio.DataOutputStream._new(new Gnio.SocketOutputStream({socket: client}));
 os.put_string("Seed echo server. Type quit to quit.\n");
 
-while(1)
-{
+while(1){
     var line = ds.read_line(null);
     var cowsay = Seed.spawn("cowsay " + line);
-    if (line.search("quit") > -1)
-    {
+    if (line.search("quit") > -1){
 	client.close();
 	Seed.quit();
     }



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