Builder/StandardErrorDialog.js
authorAlan Knowles <alan@akbkhome.com>
Thu, 29 Apr 2010 04:37:42 +0000 (12:37 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 29 Apr 2010 04:37:42 +0000 (12:37 +0800)
Builder/StandardErrorDialog.js [new file with mode: 0755]

diff --git a/Builder/StandardErrorDialog.js b/Builder/StandardErrorDialog.js
new file mode 100755 (executable)
index 0000000..eaa49db
--- /dev/null
@@ -0,0 +1,58 @@
+//<Script type="text/javascript">
+
+XN = imports.xnew;
+Gtk = imports.gi.Gtk;
+GObject = imports.gi.GObject;
+Gio = imports.gi.Gio;
+GLib = imports.gi.GLib;
+console = imports.console;
+Builder = imports['Builder.js'];
+Roo = imports['Roo.js'];
+
+/**
+ * add a component
+ * 
+ * basically uses a standard template ? pulled from the web?
+ * 
+ * you have to pick which template, and give it a name..
+ * 
+ * and pick which directory to put it in?
+ * 
+ */
+
+
+
+XN.create(  {
+    xnsid : 'Builder.StandardErrorDialog',
+    xid: 'dialog',
+    xtype : 'MessageDialog',
+    xns : 'Gtk',
+    modal : true,
+    buttons : Gtk.ButtonsType.OK,
+    'message-type' : Gtk.MessageType.ERROR,
+    //"secondary-text"           gchar*                : Read / Write
+    //"secondary-use-markup"     gboolean              : Read / Write
+    text   : "FIXME",
+    "use-markup"     : true,
+    
+    show : function(msg)
+    {
+        this.el.text =  msg;
+        this.el.show_all();
+    },
+    
+    listeners : 
+    {
+        'delete-event' : function (widget, event) {
+            this.el.hide();
+            return true;
+        },
+        _rendered : function()
+        {
+          //  this.el.show_all();
+        },
+        response : function () {
+            this.el.hide();
+        }
+    }
+});
\ No newline at end of file