seed r127 - trunk/examples
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r127 - trunk/examples
- Date: Wed, 5 Nov 2008 12:11:09 +0000 (UTC)
Author: racarr
Date: Wed Nov 5 12:11:09 2008
New Revision: 127
URL: http://svn.gnome.org/viewvc/seed?rev=127&view=rev
Log:
Add example demonstrating automatic conversion of Javascript
function->GClosure to create GTK accelerators.
Added:
trunk/examples/accelgroup.js (contents, props changed)
Modified:
trunk/examples/Makefile.am
Modified: trunk/examples/Makefile.am
==============================================================================
--- trunk/examples/Makefile.am (original)
+++ trunk/examples/Makefile.am Wed Nov 5 12:11:09 2008
@@ -5,6 +5,7 @@
EXTRA_DIST = \
calculator.js \
gconf.js \
+ accelgroup.js \
clutter.js \
introspect.js \
poppler.js \
Added: trunk/examples/accelgroup.js
==============================================================================
--- (empty file)
+++ trunk/examples/accelgroup.js Wed Nov 5 12:11:09 2008
@@ -0,0 +1,19 @@
+#!/usr/local/bin/seed
+Seed.import_namespace("Gtk")
+Seed.import_namespace("Gdk");
+
+Gtk.init(null, null);
+
+w = new Gtk.Window();
+group = new Gtk.AccelGroup();
+group.connect(Gdk.keyval_from_name("q"),
+ 0,
+ 0,
+ function(){Gtk.main_quit()});
+w.add_accel_group(group);
+
+label = new Gtk.Label({label: "Press Q to quit"});
+w.add(label);
+w.show_all();
+
+Gtk.main();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]