[gnome-devel-docs] demos: Fix Error in menubutton.js



commit d94f68a9b19228f9bf5f2d562ca5e7eca68fa60e
Author: Tiffany Ann Antopolski <tiffany antopolski gmail com>
Date:   Mon Jul 1 16:23:06 2013 -0400

    demos: Fix Error in menubutton.js

 platform-demos/C/menubutton.js.page    |    2 +-
 platform-demos/C/samples/menubutton.js |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/platform-demos/C/menubutton.js.page b/platform-demos/C/menubutton.js.page
index 54df979..5ce9961 100644
--- a/platform-demos/C/menubutton.js.page
+++ b/platform-demos/C/menubutton.js.page
@@ -23,7 +23,7 @@
 
 The GtkMenuButton widget can hold any valid child widget. That is, it can hold almost any other standard 
GtkWidget. The most commonly used child is the provided GtkArrow.</p>
 
-<note><p>You need to be running GNOME 3.6 for the MenuButton to work.</p></note>
+<note><p>You need to be running GNOME 3.6 or later for the MenuButton to work.</p></note>
 <code mime="application/javascript" style="numbered"><xi:include href="samples/menubutton.js" 
parse="text"><xi:fallback/></xi:include></code>
 <p>
   In this sample we used the following:
diff --git a/platform-demos/C/samples/menubutton.js b/platform-demos/C/samples/menubutton.js
index 98d253d..c1797e9 100644
--- a/platform-demos/C/samples/menubutton.js
+++ b/platform-demos/C/samples/menubutton.js
@@ -33,7 +33,7 @@ const Application = new Lang.Class ({
         this.menu = new Gtk.Menu.new_from_model(this.menuModel);
 
         this.menu.show();
-        this._menuButton.set_menu(this.menu);
+        this._menuButton.set_menu_model (this.menuModel);
         this._menuButton.set_size_request(80, 35);
         this._menuButton.show();
 
@@ -41,11 +41,11 @@ const Application = new Lang.Class ({
     },
 
     _showNew: function() {
-    print("New Menu. It doesn't do anything. It is only a demonstration.");
+    print("You clicked \"New\"");
     },
 
     _showAbout: function() {
-        print("No AboutDialog here.  This is only a demonstration.");
+        print("You clicked \"About\"");
     },
 
     //create the menu items and connect the signals to the callback functions.


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