seed r44 - in trunk: examples tests
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r44 - in trunk: examples tests
- Date: Sat, 1 Nov 2008 08:20:36 +0000 (UTC)
Author: racarr
Date: Sat Nov 1 08:20:36 2008
New Revision: 44
URL: http://svn.gnome.org/viewvc/seed?rev=44&view=rev
Log:
Clean up examples.
Modified:
trunk/examples/calculator.js
trunk/examples/clutter-test.js
trunk/examples/mini-browser.js
trunk/examples/n-oscillator.js
trunk/examples/notify-test.js
trunk/tests/gobject-scope.js
trunk/tests/json-constructor.js
Modified: trunk/examples/calculator.js
==============================================================================
--- trunk/examples/calculator.js (original)
+++ trunk/examples/calculator.js Sat Nov 1 08:20:36 2008
@@ -85,7 +85,7 @@
function create_button(str, func)
{
- var btn = new Gtk.Button({"label":str});
+ var btn = new Gtk.Button({label:str});
btn.signal_clicked.connect(func, btn);
return btn;
}
@@ -130,13 +130,13 @@
return vbox;
}
-var window = new Gtk.Window({"title": "Calculator", "resizable": false});
+var window = new Gtk.Window({title: "Calculator", resizable: false});
window.resize(250, 250);
window.signal_hide.connect(end_program);
window.opacity = 0.95;
-var label = new Gtk.Label({"label": ""});
+var label = new Gtk.Label({label: ""});
label.set_alignment(1,0);
update_display();
Modified: trunk/examples/clutter-test.js
==============================================================================
--- trunk/examples/clutter-test.js (original)
+++ trunk/examples/clutter-test.js Sat Nov 1 08:20:36 2008
@@ -4,7 +4,7 @@
Clutter.init(null, null);
var stage = new Clutter.Stage();
-var rectangle = new Clutter.Label({"text":"Never gonna give you up, never..."});
+var rectangle = new Clutter.Label({text:"Never gonna give you up, never..."});
var template = new Clutter.EffectTemplate();
rectangle.width = 100;
rectangle.height = 100;
Modified: trunk/examples/mini-browser.js
==============================================================================
--- trunk/examples/mini-browser.js (original)
+++ trunk/examples/mini-browser.js Sat Nov 1 08:20:36 2008
@@ -5,11 +5,6 @@
var tabs;
-function quit()
-{
- Gtk.main_quit();
-}
-
function forward(button)
{
this.go_forward();
@@ -73,16 +68,13 @@
{
var toolbar = new Gtk.HBox();
- var back_button = new Gtk.ToolButton();
- back_button.set_stock_id("gtk-go-back");
+ var back_button = new Gtk.ToolButton({stock_id:"gtk-go-back"});
back_button.signal_clicked.connect(back, browser_view);
- var forward_button = new Gtk.ToolButton();
- forward_button.set_stock_id("gtk-go-forward");
+ var forward_button = new Gtk.ToolButton({stock_id:"gtk-go-forward"});
forward_button.signal_clicked.connect(forward, browser_view);
- var refresh_button = new Gtk.ToolButton();
- refresh_button.set_stock_id("gtk-refresh");
+ var refresh_button = new Gtk.ToolButton({stock_id:"gtk-refresh"});
refresh_button.signal_clicked.connect(refresh, browser_view);
toolbar.pack_start(back_button);
@@ -96,7 +88,7 @@
{
var tab = new Gtk.VBox();
- var browser_title = new Gtk.Label({"label":"Untitled"});
+ var browser_title = new Gtk.Label({label:"Untitled"});
var browser_view = new WebKit.WebView();
var url_entry = new Gtk.Entry();
@@ -115,7 +107,7 @@
tab.pack_start(browser_view, true, true);
var close_button = new Gtk.Button();
- close_button.set_image(new Gtk.Image({"stock": "gtk-close", "icon-size": Gtk.IconSize.menu}));
+ close_button.set_image(new Gtk.Image({stock: "gtk-close", icon_size: Gtk.IconSize.menu}));
close_button.signal_clicked.connect(close_tab, tab);
close_button.set_relief(Gtk.ReliefStyle.none);
@@ -146,8 +138,8 @@
function browser_init()
{
Gtk.init(null, null);
- var window = new Gtk.Window({"title":"Browser"});
- window.signal_hide.connect(quit);
+ var window = new Gtk.Window({title: "Browser"});
+ window.signal_hide.connect(Gtk.main_quit);
window.resize(800,800);
window.add(create_ui());
Modified: trunk/examples/n-oscillator.js
==============================================================================
--- trunk/examples/n-oscillator.js (original)
+++ trunk/examples/n-oscillator.js Sat Nov 1 08:20:36 2008
@@ -10,9 +10,9 @@
this.hbox = new Gtk.HBox();
this.vscale = new Gtk.VScale();
this.volscale = new Gtk.VScale();
- this.button = new Gtk.Button({"label": "Toggle"});
+ this.button = new Gtk.Button({label: "Toggle"});
- this.pipeline = new Gst.Pipeline({"name": "test"});
+ this.pipeline = new Gst.Pipeline({name: "test"});
this.audiosrc = Gst.element_factory_make("audiotestsrc", "audio");
this.audiosink = Gst.element_factory_make("alsasink", "sink");
this.volume = Gst.element_factory_make("volume", "vcontrol");
@@ -71,7 +71,7 @@
}
var window = new Gtk.Window();
-var button = new Gtk.Button({"label": "Add Oscillator"});
+var button = new Gtk.Button({label: "Add Oscillator"});
window.signal_hide.connect(end_program);
window.resize(600,300);
Modified: trunk/examples/notify-test.js
==============================================================================
--- trunk/examples/notify-test.js (original)
+++ trunk/examples/notify-test.js Sat Nov 1 08:20:36 2008
@@ -8,8 +8,8 @@
function file_changed(monitor, child, other, event)
{
var notification =
- new Notify.Notification({"summary": "File Notification",
- "body" : "This is a poor libnotify example" });
+ new Notify.Notification({summary: "File Notification",
+ body : "This is a poor libnotify example" });
notification.set_timeout(5000);
notification.show();
}
Modified: trunk/tests/gobject-scope.js
==============================================================================
--- trunk/tests/gobject-scope.js (original)
+++ trunk/tests/gobject-scope.js Sat Nov 1 08:20:36 2008
@@ -10,6 +10,6 @@
for(var i = 0; i < 100; i++)
{
- var button = new Gtk.Button({"label":"Test!"});
+ var button = new Gtk.Button({label: "Test!"});
}
Modified: trunk/tests/json-constructor.js
==============================================================================
--- trunk/tests/json-constructor.js (original)
+++ trunk/tests/json-constructor.js Sat Nov 1 08:20:36 2008
@@ -8,7 +8,7 @@
Seed.import_namespace("GLib");
Gtk.init(null, null);
-window = new Gtk.Window({"title":"JSON Win!"});
+window = new Gtk.Window({title: "JSON Win!"});
window.show_all();
Seed.print(window.title);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]