seed r46 - trunk/examples
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r46 - trunk/examples
- Date: Sat, 1 Nov 2008 08:36:10 +0000 (UTC)
Author: racarr
Date: Sat Nov 1 08:36:10 2008
New Revision: 46
URL: http://svn.gnome.org/viewvc/seed?rev=46&view=rev
Log:
Clean up the examples a little more, courtesy of Matt.
Removed:
trunk/examples/clutter-test.js
trunk/examples/spacewhale.js
Modified:
trunk/examples/calculator.js
trunk/examples/ls.js
trunk/examples/vte-test.js
Modified: trunk/examples/calculator.js
==============================================================================
--- trunk/examples/calculator.js (original)
+++ trunk/examples/calculator.js Sat Nov 1 08:36:10 2008
@@ -59,7 +59,8 @@
function swap_sign(button)
{
- calc_val = ((calc_val[0] == "-") ? calc_val.substring(1) : "-" + calc_val)
+ calc_val = ((calc_val[0] == "-") ?
+ calc_val.substring(1) : "-" + calc_val)
update_display();
}
Modified: trunk/examples/ls.js
==============================================================================
--- trunk/examples/ls.js (original)
+++ trunk/examples/ls.js Sat Nov 1 08:36:10 2008
@@ -1,7 +1,11 @@
#!/usr/local/bin/seed
Seed.import_namespace("Gio");
-file = Gio.file_new_for_path(".");
+if (Seed.argv.length < 3)
+ file = Gio.file_new_for_path(".");
+else
+ file = Gio.file_new_for_path(Seed.argv[2]);
+
enumerator = file.enumerate_children("standard::name");
while (child = enumerator.next_file())
Modified: trunk/examples/vte-test.js
==============================================================================
--- trunk/examples/vte-test.js (original)
+++ trunk/examples/vte-test.js Sat Nov 1 08:36:10 2008
@@ -4,23 +4,16 @@
Gtk.init(null, null);
-function childquit(terminal)
-{
- Gtk.main_quit();
-}
-
-function updatetitle(terminal)
-{
- this.set_title(terminal.get_window_title());
-}
-
-
var window = new Gtk.Window();
var vte = new Vte.Terminal();
vte.fork_command("/bin/bash");
-vte.signal_child_exited.connect(childquit);
-vte.signal_window_title_changed.connect(updatetitle, window);
+vte.signal_child_exited.connect(Gtk.main_quit);
+vte.signal_window_title_changed.connect
+ (function(terminal)
+ {
+ this.set_title(terminal.get_window_title());
+ }, window);
window.add(vte);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]