From 9031eefbaf8efba3d2e421083485f766185ed9a3 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 27 May 2010 19:12:18 +0800 Subject: [PATCH] Sample/Window.js --- Sample/Window.js | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/Sample/Window.js b/Sample/Window.js index f2cc7a34c..3b61b8dea 100644 --- a/Sample/Window.js +++ b/Sample/Window.js @@ -153,6 +153,40 @@ Window=new XObject({ } ] }, + { + xtype: Gtk.MenuItem, + label : "_Edit", + use_underline : true, + items : [ + { + xtype: Gtk.Menu, + pack : "set_submenu", + listeners : { + + }, + items : [ + { + xtype: Gtk.MenuItem, + listeners : { + activate : function (self) { + var fn = this.get('/LeftTree').getActiveFile(); + if (!fn) { + this.get('/StandardErrorDialog').show("No File active"); + return true; + } + + this.get('/DialogNewComponent').show(fn); + return true; + } + }, + label : "File _Properties", + pack : "add", + use_underline : true + } + ] + } + ] + }, { xtype: Gtk.MenuItem, label : "_Help", @@ -160,6 +194,7 @@ Window=new XObject({ listeners : { }, + pack : "add", items : [ { xtype: Gtk.Menu, -- 2.39.2