seed r142 - in trunk/examples: . ide lightsoff shader
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r142 - in trunk/examples: . ide lightsoff shader
- Date: Thu, 6 Nov 2008 13:12:58 +0000 (UTC)
Author: racarr
Date: Thu Nov 6 13:12:58 2008
New Revision: 142
URL: http://svn.gnome.org/viewvc/seed?rev=142&view=rev
Log:
Update examples to signal change.
Modified:
trunk/examples/actions.js
trunk/examples/calculator.js
trunk/examples/clutter.js
trunk/examples/ide/ide.js
trunk/examples/ide/tabview.js
trunk/examples/ide/toolbar.js
trunk/examples/lightsoff/lightsoff.js
trunk/examples/mini-browser.js
trunk/examples/n-oscillator.js
trunk/examples/notify-test.js
trunk/examples/pango.js
trunk/examples/poppler.js
trunk/examples/shader/ShaderView.js
trunk/examples/vte-test.js
Modified: trunk/examples/actions.js
==============================================================================
--- trunk/examples/actions.js (original)
+++ trunk/examples/actions.js Thu Nov 6 13:12:58 2008
@@ -18,21 +18,21 @@
actions.add_action_with_accel(new_action);
//Could pass string, but this makes it use default accelerator for gtk-new
new_action.connect_accelerator();
-new_action.signal_activate.connect(function(){Seed.print("New file")});
+new_action.signal.activate.connect(function(){Seed.print("New file")});
open_action = new Gtk.Action({name:"open", label: "Open",
tooltip:"Open File", stock_id:Gtk.STOCK_OPEN});
open_action.set_accel_group(accels);
actions.add_action_with_accel(open_action);
open_action.connect_accelerator();
-open_action.signal_activate.connect(function(){Seed.print("Open file")});
+open_action.signal.activate.connect(function(){Seed.print("Open file")});
save_action = new Gtk.Action({name:"save", label: "Save",
tooltip:"Save File", stock_id:Gtk.STOCK_SAVE});
save_action.set_accel_group(accels);
actions.add_action_with_accel(save_action);
save_action.connect_accelerator();
-save_action.signal_activate.connect(function(){Seed.print("Save file")});
+save_action.signal.activate.connect(function(){Seed.print("Save file")});
toolbar.insert(new_action.create_tool_item());
Modified: trunk/examples/calculator.js
==============================================================================
--- trunk/examples/calculator.js (original)
+++ trunk/examples/calculator.js Thu Nov 6 13:12:58 2008
@@ -87,7 +87,7 @@
function create_button(str, func)
{
var btn = new Gtk.Button({label:str});
- btn.signal_clicked.connect(func, btn);
+ btn.signal.clicked.connect(func, btn);
return btn;
}
@@ -134,7 +134,7 @@
var window = new Gtk.Window({title: "Calculator", resizable: false});
window.resize(250, 250);
-window.signal_hide.connect(Gtk.main_quit);
+window.signal.hide.connect(Gtk.main_quit);
window.opacity = 0.95;
var label = new Gtk.Label({label: ""});
Modified: trunk/examples/clutter.js
==============================================================================
--- trunk/examples/clutter.js (original)
+++ trunk/examples/clutter.js Thu Nov 6 13:12:58 2008
@@ -65,7 +65,7 @@
}
// Was initially intended as a test to see if performance was accetable to do
// custom animations at 60fps. Turns out to be fine, serves as an example now.
-timeline.signal_new_frame.connect(
+timeline.signal.new_frame.connect(
function(timeline, frame_num)
{
for (var i = 0; i < colors.length; i++)
@@ -74,7 +74,7 @@
rectangles[i].rotation_angle_z += 1;
}
});
-timeline.signal_completed.connect(
+timeline.signal.completed.connect(
function(timeline)
{
Modified: trunk/examples/ide/ide.js
==============================================================================
--- trunk/examples/ide/ide.js (original)
+++ trunk/examples/ide/ide.js Thu Nov 6 13:12:58 2008
@@ -144,7 +144,7 @@
{
window = new Gtk.Window();
window.resize(600, 600);
- window.signal_hide.connect(Gtk.main_quit);
+ window.signal.hide.connect(Gtk.main_quit);
ui = new ide_ui();
window.add(tabs);
window.show_all();
Modified: trunk/examples/ide/tabview.js
==============================================================================
--- trunk/examples/ide/tabview.js (original)
+++ trunk/examples/ide/tabview.js Thu Nov 6 13:12:58 2008
@@ -15,7 +15,7 @@
{
var close_button = new Gtk.Button();
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.signal.clicked.connect(close_tab, tab);
close_button.set_relief(Gtk.ReliefStyle.none);
this.tab_label = new Gtk.Label({label:nm});
@@ -38,7 +38,7 @@
this.pane.set_position(600 * (2/3));
- this.source_view.source_buf.signal_changed.connect(text_changed, this.toolbar);
+ this.source_view.source_buf.signal.changed.connect(text_changed, this.toolbar);
this.source_view.source_buf.update_undo_state(this.toolbar);
this.main_vbox = new Gtk.VBox();
@@ -68,7 +68,7 @@
{
tabs = new Gtk.Notebook();
- tabs.signal_switch_page.connect(change_page);
+ tabs.signal.switch_page.connect(change_page);
tabs.set_scrollable(true);
Modified: trunk/examples/ide/toolbar.js
==============================================================================
--- trunk/examples/ide/toolbar.js (original)
+++ trunk/examples/ide/toolbar.js Thu Nov 6 13:12:58 2008
@@ -10,36 +10,36 @@
this.new_action.set_accel_group(this.accels);
this.actions.add_action_with_accel(this.new_action);
this.new_action.connect_accelerator();
- this.new_action.signal_activate.connect(new_file, tab);
+ this.new_action.signal.activate.connect(new_file, tab);
this.open_action = new Gtk.Action({name:"open", label:"Open",
tooltip:"Open File", stock_id:"gtk-open"});
this.open_action.set_accel_group(this.accels);
this.actions.add_action_with_accel(this.open_action);
this.open_action.connect_accelerator();
- this.open_action.signal_activate.connect(open_file, tab);
+ this.open_action.signal.activate.connect(open_file, tab);
this.save_action = new Gtk.Action({name:"save", label:"Save",
tooltip:"Save File", stock_id:"gtk-save"});
this.save_action.set_accel_group(this.accels);
this.actions.add_action_with_accel(this.save_action);
this.save_action.connect_accelerator();
- this.save_action.signal_activate.connect(save_file, tab);
+ this.save_action.signal.activate.connect(save_file, tab);
this.undo_action = new Gtk.Action({name:"undo", label:"Undo",
tooltip:"Undo", stock_id:"gtk-undo"});
- this.undo_action.signal_activate.connect(undo, tab);
+ this.undo_action.signal.activate.connect(undo, tab);
this.redo_action = new Gtk.Action({name:"redo", label:"Redo",
tooltip:"Redo", stock_id:"gtk-redo"});
- this.redo_action.signal_activate.connect(redo, tab);
+ this.redo_action.signal.activate.connect(redo, tab);
this.execute_action = new Gtk.Action({name:"execute", label:"Execute",
tooltip:"Execute File", stock_id:"gtk-execute"});
this.execute_action.set_accel_group(this.accels);
this.actions.add_action_with_accel(this.execute_action, "<Control>r");
this.execute_action.connect_accelerator();
- this.execute_action.signal_activate.connect(execute, tab);
+ this.execute_action.signal.activate.connect(execute, tab);
}
function new_file(sv)
Modified: trunk/examples/lightsoff/lightsoff.js
==============================================================================
--- trunk/examples/lightsoff/lightsoff.js (original)
+++ trunk/examples/lightsoff/lightsoff.js Thu Nov 6 13:12:58 2008
@@ -37,7 +37,7 @@
var quit_item = new Gtk.MenuItem({"child":
new Gtk.Label({"label": "Quit"})});
- quit_item.signal_activate.connect(Gtk.main_quit);
+ quit_item.signal.activate.connect(Gtk.main_quit);
game_menu.append(size_item);
game_menu.append(quit_item);
@@ -71,7 +71,7 @@
buttons[i][j].set_relief(Gtk.ReliefStyle.none);
buttons[i][j].can_focus = false;
- buttons[i][j].signal_clicked.connect(button_clicked,
+ buttons[i][j].signal.clicked.connect(button_clicked,
buttons[i][j]);
table.attach_defaults(buttons[i][j], j, j+1, i, i+1);
}
@@ -184,7 +184,7 @@
Gtk.init(null, null);
var window = new Gtk.Window({"title": "Lights Off", "resizable" : false});
-window.signal_hide.connect(Gtk.main_quit);
+window.signal.hide.connect(Gtk.main_quit);
vbox = new Gtk.VBox();
Modified: trunk/examples/mini-browser.js
==============================================================================
--- trunk/examples/mini-browser.js (original)
+++ trunk/examples/mini-browser.js Thu Nov 6 13:12:58 2008
@@ -72,13 +72,13 @@
var toolbar = new Gtk.HBox();
var back_button = new Gtk.ToolButton({stock_id:"gtk-go-back"});
- back_button.signal_clicked.connect(back, browser_view);
+ back_button.signal.clicked.connect(back, browser_view);
var forward_button = new Gtk.ToolButton({stock_id:"gtk-go-forward"});
- forward_button.signal_clicked.connect(forward, browser_view);
+ forward_button.signal.clicked.connect(forward, browser_view);
var refresh_button = new Gtk.ToolButton({stock_id:"gtk-refresh"});
- refresh_button.signal_clicked.connect(refresh, browser_view);
+ refresh_button.signal.clicked.connect(refresh, browser_view);
toolbar.pack_start(back_button);
toolbar.pack_start(forward_button);
@@ -95,12 +95,12 @@
var browser_view = new WebKit.WebView();
var url_entry = new Gtk.Entry();
- url_entry.signal_activate.connect(browse, browser_view);
+ url_entry.signal.activate.connect(browse, browser_view);
browser_view.set_scroll_adjustments(null,null);
- browser_view.signal_title_changed.connect(title_changed, browser_title);
- browser_view.signal_load_committed.connect(url_changed, url_entry);
- //browser_view.signal_create_web_view.connect(new_tab, this);
+ browser_view.signal.title_changed.connect(title_changed, browser_title);
+ browser_view.signal.load_committed.connect(url_changed, url_entry);
+ //browser_view.signal.create_web_view.connect(new_tab, this);
browser_view.open(loc);
var toolbar = create_toolbar(browser_view);
@@ -112,7 +112,7 @@
var close_button = new Gtk.Button();
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.signal.clicked.connect(close_tab, tab);
close_button.set_relief(Gtk.ReliefStyle.none);
var tab_header = new Gtk.HBox();
@@ -143,7 +143,7 @@
{
Gtk.init(null, null);
var window = new Gtk.Window({title: "Browser"});
- window.signal_hide.connect(Gtk.main_quit);
+ 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 Thu Nov 6 13:12:58 2008
@@ -66,9 +66,9 @@
{
this.volume.volume = range.get_value();
}
- this.button.signal_clicked.connect(this.toggle, this);
- this.vscale.signal_value_changed.connect(this.update_freq, this);
- this.volscale.signal_value_changed.connect(this.update_vol, this);
+ this.button.signal.clicked.connect(this.toggle, this);
+ this.vscale.signal.value_changed.connect(this.update_freq, this);
+ this.volscale.signal.value_changed.connect(this.update_vol, this);
}
function end_program()
@@ -79,7 +79,7 @@
var window = new Gtk.Window();
var button = new Gtk.Button({label: "Add Oscillator"});
-window.signal_hide.connect(end_program);
+window.signal.hide.connect(end_program);
window.resize(600,300);
var hbox = new Gtk.HBox();
@@ -92,7 +92,7 @@
this.pack_start(os.vbox, true, true, 10);
os.vbox.show_all();
}
-button.signal_clicked.connect(add_oscillator, hbox);
+button.signal.clicked.connect(add_oscillator, hbox);
window.add(hbox);
hbox.pack_start(button, true, true, 10);
Modified: trunk/examples/notify-test.js
==============================================================================
--- trunk/examples/notify-test.js (original)
+++ trunk/examples/notify-test.js Thu Nov 6 13:12:58 2008
@@ -20,7 +20,7 @@
file = Gio.file_new_for_path(".");
monitor = file.monitor_directory();
-monitor.signal_changed.connect(file_changed);
+monitor.signal.changed.connect(file_changed);
Gtk.main();
Modified: trunk/examples/pango.js
==============================================================================
--- trunk/examples/pango.js (original)
+++ trunk/examples/pango.js Thu Nov 6 13:12:58 2008
@@ -23,10 +23,10 @@
function prop_editor()
{
this.text = new Gtk.Entry();
- this.text.signal_changed.connect(update_text);
+ this.text.signal.changed.connect(update_text);
this.new_button = new Gtk.ToolButton({stock_id:"gtk-add"});
- this.new_button.signal_clicked.connect(add_actor);
+ this.new_button.signal.clicked.connect(add_actor);
this.font_combo = new Gtk.ComboBox();
@@ -95,7 +95,7 @@
{
this.label = new Clutter.Label({text:label, font_name:font});
this.label.reactive = true;
- this.label.signal_button_press_event.connect(mouse_click);
+ this.label.signal.button_press_event.connect(mouse_click);
stage.add_actor(this.label);
}
@@ -104,7 +104,7 @@
{
timeline = new Clutter.Timeline({fps:30, num_frames:628, loop:true});
- timeline.signal_new_frame.connect(function(timeline, frame_num)
+ timeline.signal.new_frame.connect(function(timeline, frame_num)
{ current_actor.opacity = ((Math.sin(frame_num/7)+1) * 67) + 120; });
timeline.start();
@@ -133,9 +133,9 @@
Clutter.set_motion_events_frequency(60);
- stage.signal_motion_event.connect(mouse_moved);
- stage.signal_button_release_event.connect(mouse_release);
- stage.signal_button_press_event.connect(clear_selected);
+ stage.signal.motion_event.connect(mouse_moved);
+ stage.signal.button_release_event.connect(mouse_release);
+ stage.signal.button_press_event.connect(clear_selected);
pulser();
Modified: trunk/examples/poppler.js
==============================================================================
--- trunk/examples/poppler.js (original)
+++ trunk/examples/poppler.js Thu Nov 6 13:12:58 2008
@@ -82,18 +82,18 @@
entry = new Gtk.Entry({text:"0"});
entry_item.add(entry);
entry_item.width_request = 40;
- entry.signal_activate.connect(function(){set_page(parseInt(entry.text)-1)});
+ entry.signal.activate.connect(function(){set_page(parseInt(entry.text)-1)});
var label_item = new Gtk.ToolItem();
page_label = new Gtk.Label({label: " of 0"});
label_item.add(page_label);
- open_button.signal_clicked.connect(open_file);
- next_button.signal_clicked.connect(
+ open_button.signal.clicked.connect(open_file);
+ next_button.signal.clicked.connect(
function(button)
{
set_page(page_num+1);
});
- previous_button.signal_clicked.connect(
+ previous_button.signal.clicked.connect(
function(button)
{
set_page(page_num-1);
@@ -119,13 +119,13 @@
main_vbox = new Gtk.VBox();
drawing_area = new Gtk.DrawingArea();
-drawing_area.signal_expose_event.connect(draw_document);
+drawing_area.signal.expose_event.connect(draw_document);
window.add(main_vbox);
main_vbox.pack_start(toolbar);
main_vbox.pack_start(drawing_area, true, true);
-window.signal_hide.connect(Gtk.main_quit);
+window.signal.hide.connect(Gtk.main_quit);
window.show_all();
window.resize(600,800);
Modified: trunk/examples/shader/ShaderView.js
==============================================================================
--- trunk/examples/shader/ShaderView.js (original)
+++ trunk/examples/shader/ShaderView.js Thu Nov 6 13:12:58 2008
@@ -41,5 +41,5 @@
this.reflection.set_shader(shader);
}
- compile.signal_clicked.connect(this.make_shader, this);
+ compile.signal.clicked.connect(this.make_shader, this);
}
\ No newline at end of file
Modified: trunk/examples/vte-test.js
==============================================================================
--- trunk/examples/vte-test.js (original)
+++ trunk/examples/vte-test.js Thu Nov 6 13:12:58 2008
@@ -9,8 +9,8 @@
var vte = new Vte.Terminal();
vte.fork_command("/bin/bash");
-vte.signal_child_exited.connect(Gtk.main_quit);
-vte.signal_window_title_changed.connect
+vte.signal.child_exited.connect(Gtk.main_quit);
+vte.signal.window_title_changed.connect
(function(terminal)
{
this.set_title(terminal.get_window_title());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]