-//<Script type="text/javascript">
-
-XN = imports.xnew;
Gtk = imports.gi.Gtk;
-GObject = imports.gi.GObject;
-Gio = imports.gi.Gio;
+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;
+GtkClutter = imports.gi.GtkClutter;
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,
+XObject = imports.XObject.XObject;
+StandardErrorDialog=new XObject({
+ xtype: Gtk.MessageDialog,
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();
+ modal : true,
+ message_type : Gtk.MessageType.ERROR,
+ text : "fixme",
+ use_markup : true,
+ show : function(msg) {
+ if (!this.el) {
+ this.init();
+ }
+ this.el.text = msg;
+ this.el.show_all();
},
-
- listeners :
- {
- 'delete-event' : function (widget, event) {
+ listeners : {
+ delete_event : function (self, event) {
this.el.hide();
return true;
},
- _rendered : function()
- {
- // this.el.show_all();
- },
- response : function () {
- this.el.hide();
+ response : function (self, response_id) {
+ this.el.hide();
}
}
-});
\ No newline at end of file
+});
+StandardErrorDialog.init();
+XObject.cache['/StandardErrorDialog'] = StandardErrorDialog;