[gnome-devel-docs] Fix GtkRadioButton/GtkButton confiusion in example



commit 948e5441f8ccb7c3d203690fac504794889b53fb
Author: David King <amigadave amigadave com>
Date:   Thu Mar 6 13:50:43 2014 +0000

    Fix GtkRadioButton/GtkButton confiusion in example
    
    As pointed out on IRC.

 platform-demos/C/03_getting_the_signal.js.page     |    8 ++++----
 .../C/samples/03_getting_the_signal_03.js          |   10 +++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/platform-demos/C/03_getting_the_signal.js.page b/platform-demos/C/03_getting_the_signal.js.page
index 501d4e9..3dd253a 100644
--- a/platform-demos/C/03_getting_the_signal.js.page
+++ b/platform-demos/C/03_getting_the_signal.js.page
@@ -244,9 +244,9 @@ app.application.run (ARGV);
     <p>After that, we create the RadioButtons. Remember how they're created in groups? The way we do that, 
is we set each new RadioButton's group property to the name of another RadioButton.</p>
     <code mime="application/javascript"><![CDATA[
         // Create the radio buttons
-        this._cookieButton = new Gtk.RadioButton ({ label: "Cookie" });
+        this._cookieRadio = new Gtk.RadioButton ({ label: "Cookie" });
         this._notCookieOne = new Gtk.RadioButton ({ label: "Not cookie",
-            group: this._cookieButton });
+            group: this._cookieRadio });
         this._notCookieTwo = new Gtk.RadioButton ({ label: "Not cookie",
             group: this._cookieButton });
 ]]></code>
@@ -256,7 +256,7 @@ app.application.run (ARGV);
         // Arrange the radio buttons in their own grid
         this._radioGrid = new Gtk.Grid ();
         this._radioGrid.attach (this._notCookieOne, 0, 0, 1, 1);
-        this._radioGrid.attach (this._cookieButton, 0, 1, 1, 1);
+        this._radioGrid.attach (this._cookieRadio, 0, 1, 1, 1);
         this._radioGrid.attach (this._notCookieTwo, 0, 2, 1, 1);
 ]]></code>
 
@@ -280,7 +280,7 @@ app.application.run (ARGV);
     _getACookie: function() {
 
         // Did you select "cookie" instead of "not cookie"?
-        if (this._cookieButton.get_active()) {
+        if (this._cookieRadio.get_active()) {
 
             // Increase the number of cookies by 1 and update the label
             cookies++;
diff --git a/platform-demos/C/samples/03_getting_the_signal_03.js 
b/platform-demos/C/samples/03_getting_the_signal_03.js
index 5cb903e..a87d9d2 100644
--- a/platform-demos/C/samples/03_getting_the_signal_03.js
+++ b/platform-demos/C/samples/03_getting_the_signal_03.js
@@ -43,16 +43,16 @@ const GettingTheSignal = new Lang.Class({
             title: "Choose the one that says 'cookie'!"});
 
         // Create the radio buttons
-        this._cookieButton = new Gtk.RadioButton ({ label: "Cookie" });
+        this._cookieRadio = new Gtk.RadioButton ({ label: "Cookie" });
         this._notCookieOne = new Gtk.RadioButton ({ label: "Not cookie",
-            group: this._cookieButton });
+            group: this._cookieRadio });
         this._notCookieTwo = new Gtk.RadioButton ({ label: "Not cookie",
-            group: this._cookieButton });
+            group: this._cookieRadio });
 
         // Arrange the radio buttons in their own grid
         this._radioGrid = new Gtk.Grid ();
         this._radioGrid.attach (this._notCookieOne, 0, 0, 1, 1);
-        this._radioGrid.attach (this._cookieButton, 0, 1, 1, 1);
+        this._radioGrid.attach (this._cookieRadio, 0, 1, 1, 1);
         this._radioGrid.attach (this._notCookieTwo, 0, 2, 1, 1);
 
         // Set the button that will be at the top to be active by default
@@ -93,7 +93,7 @@ const GettingTheSignal = new Lang.Class({
     _getACookie: function() {
 
         // Did you select "cookie" instead of "not cookie"?
-        if (this._cookieButton.get_active()) {
+        if (this._cookieRadio.get_active()) {
 
             // Increase the number of cookies by 1 and update the label
             cookies++;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]