seed r143 - in trunk/doc: . tutorial-standalone
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r143 - in trunk/doc: . tutorial-standalone
- Date: Thu, 6 Nov 2008 13:15:08 +0000 (UTC)
Author: racarr
Date: Thu Nov 6 13:15:08 2008
New Revision: 143
URL: http://svn.gnome.org/viewvc/seed?rev=143&view=rev
Log:
Update documentation to signal changes.
Modified:
trunk/doc/runtime.html
trunk/doc/tutorial-standalone/1.js
trunk/doc/tutorial-standalone/2.js
trunk/doc/tutorial-standalone/3.js
trunk/doc/tutorial-standalone/tutorial.html
Modified: trunk/doc/runtime.html
==============================================================================
--- trunk/doc/runtime.html (original)
+++ trunk/doc/runtime.html Thu Nov 6 13:15:08 2008
@@ -195,7 +195,7 @@
<p>
An array representing the arguments passed to the <code>seed</code> interpreter.
</p>
-<div class="section"><b><i>object</i>.signal_<i>signame</i>.connect</b>(function<i>, context</i>)</div>
+<div class="section"><b><i>object</i>.signal.<i>signame</i>.connect</b>(function<i>, context</i>)</div>
<p>
Connects <i>function</i> to the signal, <i>signame</i>, on <i>object</i>. Any GObject signal will work. <i>context</i> is passed to the signal handler as the <code>this</code> object; if omitted, the global context is used.
</p>
@@ -206,7 +206,7 @@
}
var button = new Gtk.Button();
-button.signal_clicked.connect(button_clicked);
+button.signal.clicked.connect(button_clicked);
</pre>
<div class="section"><b>Exceptions</b></div>
<p>
Modified: trunk/doc/tutorial-standalone/1.js
==============================================================================
--- trunk/doc/tutorial-standalone/1.js (original)
+++ trunk/doc/tutorial-standalone/1.js Thu Nov 6 13:15:08 2008
@@ -10,7 +10,7 @@
Gtk.main_quit();
}
-window.signal_hide.connect(quit);
+window.signal.hide.connect(quit);
function create_ui()
{
@@ -23,11 +23,11 @@
var url_entry = new Gtk.Entry();
- back_button.signal_clicked.connect(back);
- forward_button.signal_clicked.connect(forward);
- refresh_button.signal_clicked.connect(refresh);
+ back_button.signal.clicked.connect(back);
+ forward_button.signal.clicked.connect(forward);
+ refresh_button.signal.clicked.connect(refresh);
- url_entry.signal_activate.connect(browse);
+ url_entry.signal.activate.connect(browse);
toolbar.pack_start(back_button);
toolbar.pack_start(forward_button);
Modified: trunk/doc/tutorial-standalone/2.js
==============================================================================
--- trunk/doc/tutorial-standalone/2.js (original)
+++ trunk/doc/tutorial-standalone/2.js Thu Nov 6 13:15:08 2008
@@ -12,7 +12,7 @@
Gtk.main_quit();
}
-window.signal_hide.connect(quit);
+window.signal.hide.connect(quit);
function create_ui()
{
@@ -27,11 +27,11 @@
var url_entry = new Gtk.Entry();
- back_button.signal_clicked.connect(back, browser);
- forward_button.signal_clicked.connect(forward, browser);
- refresh_button.signal_clicked.connect(refresh, browser);
+ back_button.signal.clicked.connect(back, browser);
+ forward_button.signal.clicked.connect(forward, browser);
+ refresh_button.signal.clicked.connect(refresh, browser);
- url_entry.signal_activate.connect(browse, browser);
+ url_entry.signal.activate.connect(browse, browser);
toolbar.pack_start(back_button);
toolbar.pack_start(forward_button);
Modified: trunk/doc/tutorial-standalone/3.js
==============================================================================
--- trunk/doc/tutorial-standalone/3.js (original)
+++ trunk/doc/tutorial-standalone/3.js Thu Nov 6 13:15:08 2008
@@ -12,7 +12,7 @@
Gtk.main_quit();
}
-window.signal_hide.connect(quit);
+window.signal.hide.connect(quit);
function create_ui()
{
@@ -28,12 +28,12 @@
var url_entry = new Gtk.Entry();
- back_button.signal_clicked.connect(back, browser);
- forward_button.signal_clicked.connect(forward, browser);
- refresh_button.signal_clicked.connect(refresh, browser);
+ back_button.signal.clicked.connect(back, browser);
+ forward_button.signal.clicked.connect(forward, browser);
+ refresh_button.signal.clicked.connect(refresh, browser);
- url_entry.signal_activate.connect(browse, browser);
- browser.signal_load_committed.connect(url_changed, url_entry);
+ url_entry.signal.activate.connect(browse, browser);
+ browser.signal.load_committed.connect(url_changed, url_entry);
toolbar.pack_start(back_button);
toolbar.pack_start(forward_button);
Modified: trunk/doc/tutorial-standalone/tutorial.html
==============================================================================
--- trunk/doc/tutorial-standalone/tutorial.html (original)
+++ trunk/doc/tutorial-standalone/tutorial.html Thu Nov 6 13:15:08 2008
@@ -193,7 +193,7 @@
Gtk.main_quit();
}
-window.signal_hide.connect(quit);
+window.signal.hide.connect(quit);
</pre>
<p>The signal names are the same as in the <a href="http://library.gnome.org/devel/gtk/stable/">GTK documentation</a>, except using underscores instead of dashes between words. </p>
<div class="section">Local Context with '<code>this</code>'</div>
@@ -211,7 +211,7 @@
...
- back_button.signal_clicked.connect(back, browser);
+ back_button.signal.clicked.connect(back, browser);
}
</pre>
<p>In this case, the <code>browser</code> object is passed as the magical <code>this</code> object into the <code>back()</code> function, so <code>go_back()</code> is actually called on <code>browser</code>. The upside to this model is that, no matter how many times <code>create_browser()</code> is called, <code>back()</code> is always provided the <code>browser</code> that corresponds with its <code>back_button</code>.</p>
@@ -229,11 +229,11 @@
var url_entry = new Gtk.Entry();
- back_button.signal_clicked.connect(back);
- forward_button.signal_clicked.connect(forward);
- refresh_button.signal_clicked.connect(refresh);
+ back_button.signal.clicked.connect(back);
+ forward_button.signal.clicked.connect(forward);
+ refresh_button.signal.clicked.connect(refresh);
- url_entry.signal_activate.connect(browse);
+ url_entry.signal.activate.connect(browse);
toolbar.pack_start(back_button);
toolbar.pack_start(forward_button);
@@ -292,11 +292,11 @@
var url_entry = new Gtk.Entry();
- back_button.signal_clicked.connect(back<span class="changed">, browser</span>);
- forward_button.signal_clicked.connect(forward<span class="changed">, browser</span>);
- refresh_button.signal_clicked.connect(refresh<span class="changed">, browser</span>);
+ back_button.signal.clicked.connect(back<span class="changed">, browser</span>);
+ forward_button.signal.clicked.connect(forward<span class="changed">, browser</span>);
+ refresh_button.signal.clicked.connect(refresh<span class="changed">, browser</span>);
- url_entry.signal_activate.connect(browse<span class="changed">, browser</span>);
+ url_entry.signal.activate.connect(browse<span class="changed">, browser</span>);
toolbar.pack_start(back_button);
toolbar.pack_start(forward_button);
@@ -351,7 +351,7 @@
</pre>
<p>Our final modification will listen to a WebKit signal, and adjust the URL bar when you click a link. The aforementioned webkitwebview.h header file provides us with the name of the signal (load_committed). This signal is different than those we've worked with in the past, as it provides two arguments: the WebView, and a WebFrame. The distinction is important in WebKit-land, but we'll ignore it, noting only that (from the headers, again - this time, webkitwebframe.h) there is a WebFrame get_uri() function which provides the current URL of the frame. Let's first add our signal connection code. Make sure to connect to load_committed <em>after</em> you've created both the WebView and the URL entry field, as the signal is <em>on</em> the browser view, and we want to pass the URL entry field as its <code>this</code> object:</p>
<pre>
- browser.signal_load_committed.connect(url_changed, url_entry);
+ browser.signal.load_committed.connect(url_changed, url_entry);
</pre>
<p>Next, the callback, <code>url_changed</code>. Remember that we're given two arguments, and that <code>this</code> is the URL entry field:</p>
<pre>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]