Sample/DialogSaveTemplate.js
authorAlan Knowles <alan@akbkhome.com>
Mon, 7 Jun 2010 07:02:41 +0000 (15:02 +0800)
committerAlan Knowles <alan@akbkhome.com>
Mon, 7 Jun 2010 07:02:41 +0000 (15:02 +0800)
Sample/DialogSaveTemplate.js [new file with mode: 0644]

diff --git a/Sample/DialogSaveTemplate.js b/Sample/DialogSaveTemplate.js
new file mode 100644 (file)
index 0000000..f3e86e3
--- /dev/null
@@ -0,0 +1,50 @@
+Gtk = imports.gi.Gtk;
+Gdk = imports.gi.Gdk;
+Pango = imports.gi.Pango;
+GLib = imports.gi.GLib;
+Gio = imports.gi.Gio;
+GObject = imports.gi.GObject;
+GtkSource = imports.gi.GtkSource;
+WebKit = imports.gi.WebKit;
+Vte = imports.gi.Vte;
+console = imports.console;
+XObject = imports.XObject.XObject;
+DialogSaveTemplate=new XObject({
+    xtype: Gtk.Dialog,
+    listeners : {
+        delete_event : function (self, event) {
+            return true;
+        }
+    },
+    default_height : 200,
+    default_width : 400,
+    items : [
+        {
+            xtype: Gtk.HBox,
+            pack : "add",
+            items : [
+                {
+                    xtype: Gtk.Label,
+                    label : "Name",
+                    pack : "add"
+                },
+                {
+                    xtype: Gtk.Entry,
+                    pack : "add"
+                }
+            ]
+        },
+        {
+            xtype: Gtk.Button,
+            label : "Cancel",
+            pack : "add_action_widget,0"
+        },
+        {
+            xtype: Gtk.Button,
+            label : "Cancel",
+            pack : "add_action_widget,0"
+        }
+    ]
+});
+DialogSaveTemplate.init();
+XObject.cache['/DialogSaveTemplate'] = DialogSaveTemplate;