]
}
]
- },
- {
- "* pack" : "append_page,_this.label_database.el",
- "xtype" : "Box",
- "gboolean homogeneous" : false,
- "$ xns" : "Gtk",
- "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
- "items" : [
- {
- "label" : "Type (eg. MySQL or PostgreSQL)",
- "xalign" : 0,
- "* pack" : "pack_start,false,false,0",
- "xtype" : "Label",
- "$ xns" : "Gtk"
- },
- {
- "listeners" : {
- "key_press_event" : "(ev) => {\n\n if (ev.keyval == Gdk.Key.Tab) {\n _this.database_DBNAME.el.grab_focus();\n return true;\n }\n\n\n return false;\n}\n"
- },
- "id" : "database_DBTYPE",
- "xtype" : "Entry",
- "* pack" : "pack_start,false,false,0",
- "$ xns" : "Gtk"
- },
- {
- "label" : "Name",
- "xalign" : 0,
- "* pack" : "pack_start,false,false,0",
- "xtype" : "Label",
- "$ xns" : "Gtk"
- },
- {
- "listeners" : {
- "key_press_event" : "(ev) => {\n\n if (ev.keyval == Gdk.Key.Tab) {\n _this.database_DBUSERNAME.el.grab_focus();\n return true;\n }\n\n\n return false;\n}\n"
- },
- "id" : "database_DBNAME",
- "* pack" : "pack_start,false,false,0",
- "xtype" : "Entry",
- "$ xns" : "Gtk"
- },
- {
- "label" : "Username",
- "xalign" : 0,
- "* pack" : "pack_start,false,false,0",
- "xtype" : "Label",
- "$ xns" : "Gtk"
- },
- {
- "listeners" : {
- "key_press_event" : "(ev) => {\n\n if (ev.keyval == Gdk.Key.Tab) {\n _this.database_DBPASSWORD.el.grab_focus();\n return true;\n }\n\n\n return false;\n}\n"
- },
- "id" : "database_DBUSERNAME",
- "xtype" : "Entry",
- "* pack" : "pack_start,false,false,0",
- "$ xns" : "Gtk"
- },
- {
- "label" : "Password",
- "xalign" : 0,
- "* pack" : "pack_start,false,false,0",
- "xtype" : "Label",
- "$ xns" : "Gtk"
- },
- {
- "id" : "database_DBPASSWORD",
- "* pack" : "pack_start,false,false,0",
- "xtype" : "Entry",
- "$ xns" : "Gtk"
- },
- {
- "listeners" : {
- "clicked" : "() => {\n\n\n _this.database_ERROR.el.label = \"\";\n Gda.Connection cnc;\n try {\n // assumes localhost...\n cnc = Gda.Connection.open_from_string (\n\t\t\t_this.database_DBTYPE.el.get_text(),\n\t\t\t\"DB_NAME=\" + _this.database_DBNAME.el.get_text(), \n\t\t\t\"USERNAME=\" + _this.database_DBUSERNAME.el.get_text() + \n\t\t\t\";PASSWORD=\" + _this.database_DBPASSWORD.el.get_text(),\n\t\t\tGda.ConnectionOptions.NONE\n\t\t);\n //} catch (Gda.ConnectionError ce) { \n // _this.database_ERROR.el.label = ce.message; \n } catch(Gda.ConnectionError ue) {\n _this.database_ERROR.el.label = ue.message;\n return;\n } catch(Gda.ConfigError ue) {\n _this.database_ERROR.el.label = ue.message;\n return;\n }\n _this.database_ERROR.el.label = \"Connection Succeeded\";\n cnc.close();\n}"
- },
- "* pack" : "pack_start,false,false,0",
- "xtype" : "Button",
- "$ xns" : "Gtk",
- "utf8 label" : "Check Connection"
- },
- {
- "label" : " ",
- "id" : "database_ERROR",
- "xalign" : 0,
- "* pack" : "pack_start,false,false,0",
- "xtype" : "Label",
- "gint margin" : 3,
- "$ xns" : "Gtk"
- }
- ]
}
]
},
public Xcls_label_diff label_diff;
public Xcls_view view;
public Xcls_view view;
- public Xcls_database_DBTYPE database_DBTYPE;
- public Xcls_database_DBNAME database_DBNAME;
- public Xcls_database_DBUSERNAME database_DBUSERNAME;
- public Xcls_database_DBPASSWORD database_DBPASSWORD;
- public Xcls_database_ERROR database_ERROR;
// my vars (def)
public signal void buttonPressed (string btn);
var child_0 = new Xcls_Notebook3( _this );
child_0.ref();
this.el.pack_start ( child_0.el , true,true,0 );
- var child_1 = new Xcls_Box23( _this );
+ var child_1 = new Xcls_Box12( _this );
child_1.ref();
this.el.pack_end ( child_1.el , false,false,0 );
}
var child_3 = new Xcls_Box9( _this );
child_3.ref();
this.el.append_page ( child_3.el , _this.label_diff.el );
- var child_4 = new Xcls_Box12( _this );
- child_4.ref();
- this.el.append_page ( child_4.el , _this.label_database.el );
}
// user defined functions
+
public class Xcls_Box12 : Object
{
public Gtk.Box el;
// ctor
public Xcls_Box12(Xcls_RooProjectSettings _owner )
- {
- _this = _owner;
- this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
-
- // my vars (dec)
-
- // set gobject values
- this.el.homogeneous = false;
- var child_0 = new Xcls_Label13( _this );
- child_0.ref();
- this.el.pack_start ( child_0.el , false,false,0 );
- var child_1 = new Xcls_database_DBTYPE( _this );
- child_1.ref();
- this.el.pack_start ( child_1.el , false,false,0 );
- var child_2 = new Xcls_Label15( _this );
- child_2.ref();
- this.el.pack_start ( child_2.el , false,false,0 );
- var child_3 = new Xcls_database_DBNAME( _this );
- child_3.ref();
- this.el.pack_start ( child_3.el , false,false,0 );
- var child_4 = new Xcls_Label17( _this );
- child_4.ref();
- this.el.pack_start ( child_4.el , false,false,0 );
- var child_5 = new Xcls_database_DBUSERNAME( _this );
- child_5.ref();
- this.el.pack_start ( child_5.el , false,false,0 );
- var child_6 = new Xcls_Label19( _this );
- child_6.ref();
- this.el.pack_start ( child_6.el , false,false,0 );
- var child_7 = new Xcls_database_DBPASSWORD( _this );
- child_7.ref();
- this.el.pack_start ( child_7.el , false,false,0 );
- var child_8 = new Xcls_Button21( _this );
- child_8.ref();
- this.el.pack_start ( child_8.el , false,false,0 );
- var child_9 = new Xcls_database_ERROR( _this );
- child_9.ref();
- this.el.pack_start ( child_9.el , false,false,0 );
- }
-
- // user defined functions
- }
- public class Xcls_Label13 : Object
- {
- public Gtk.Label el;
- private Xcls_RooProjectSettings _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_Label13(Xcls_RooProjectSettings _owner )
- {
- _this = _owner;
- this.el = new Gtk.Label( "Type (eg. MySQL or PostgreSQL)" );
-
- // my vars (dec)
-
- // set gobject values
- this.el.xalign = 0f;
- }
-
- // user defined functions
- }
-
- public class Xcls_database_DBTYPE : Object
- {
- public Gtk.Entry el;
- private Xcls_RooProjectSettings _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_database_DBTYPE(Xcls_RooProjectSettings _owner )
- {
- _this = _owner;
- _this.database_DBTYPE = this;
- this.el = new Gtk.Entry();
-
- // my vars (dec)
-
- // set gobject values
-
- //listeners
- this.el.key_press_event.connect( (ev) => {
-
- if (ev.keyval == Gdk.Key.Tab) {
- _this.database_DBNAME.el.grab_focus();
- return true;
- }
-
-
- return false;
- });
- }
-
- // user defined functions
- }
-
- public class Xcls_Label15 : Object
- {
- public Gtk.Label el;
- private Xcls_RooProjectSettings _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_Label15(Xcls_RooProjectSettings _owner )
- {
- _this = _owner;
- this.el = new Gtk.Label( "Name" );
-
- // my vars (dec)
-
- // set gobject values
- this.el.xalign = 0f;
- }
-
- // user defined functions
- }
-
- public class Xcls_database_DBNAME : Object
- {
- public Gtk.Entry el;
- private Xcls_RooProjectSettings _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_database_DBNAME(Xcls_RooProjectSettings _owner )
- {
- _this = _owner;
- _this.database_DBNAME = this;
- this.el = new Gtk.Entry();
-
- // my vars (dec)
-
- // set gobject values
-
- //listeners
- this.el.key_press_event.connect( (ev) => {
-
- if (ev.keyval == Gdk.Key.Tab) {
- _this.database_DBUSERNAME.el.grab_focus();
- return true;
- }
-
-
- return false;
- });
- }
-
- // user defined functions
- }
-
- public class Xcls_Label17 : Object
- {
- public Gtk.Label el;
- private Xcls_RooProjectSettings _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_Label17(Xcls_RooProjectSettings _owner )
- {
- _this = _owner;
- this.el = new Gtk.Label( "Username" );
-
- // my vars (dec)
-
- // set gobject values
- this.el.xalign = 0f;
- }
-
- // user defined functions
- }
-
- public class Xcls_database_DBUSERNAME : Object
- {
- public Gtk.Entry el;
- private Xcls_RooProjectSettings _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_database_DBUSERNAME(Xcls_RooProjectSettings _owner )
- {
- _this = _owner;
- _this.database_DBUSERNAME = this;
- this.el = new Gtk.Entry();
-
- // my vars (dec)
-
- // set gobject values
-
- //listeners
- this.el.key_press_event.connect( (ev) => {
-
- if (ev.keyval == Gdk.Key.Tab) {
- _this.database_DBPASSWORD.el.grab_focus();
- return true;
- }
-
-
- return false;
- });
- }
-
- // user defined functions
- }
-
- public class Xcls_Label19 : Object
- {
- public Gtk.Label el;
- private Xcls_RooProjectSettings _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_Label19(Xcls_RooProjectSettings _owner )
- {
- _this = _owner;
- this.el = new Gtk.Label( "Password" );
-
- // my vars (dec)
-
- // set gobject values
- this.el.xalign = 0f;
- }
-
- // user defined functions
- }
-
- public class Xcls_database_DBPASSWORD : Object
- {
- public Gtk.Entry el;
- private Xcls_RooProjectSettings _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_database_DBPASSWORD(Xcls_RooProjectSettings _owner )
- {
- _this = _owner;
- _this.database_DBPASSWORD = this;
- this.el = new Gtk.Entry();
-
- // my vars (dec)
-
- // set gobject values
- }
-
- // user defined functions
- }
-
- public class Xcls_Button21 : Object
- {
- public Gtk.Button el;
- private Xcls_RooProjectSettings _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_Button21(Xcls_RooProjectSettings _owner )
- {
- _this = _owner;
- this.el = new Gtk.Button();
-
- // my vars (dec)
-
- // set gobject values
- this.el.label = "Check Connection";
-
- //listeners
- this.el.clicked.connect( () => {
-
-
- _this.database_ERROR.el.label = "";
- Gda.Connection cnc;
- try {
- // assumes localhost...
- cnc = Gda.Connection.open_from_string (
- _this.database_DBTYPE.el.get_text(),
- "DB_NAME=" + _this.database_DBNAME.el.get_text(),
- "USERNAME=" + _this.database_DBUSERNAME.el.get_text() +
- ";PASSWORD=" + _this.database_DBPASSWORD.el.get_text(),
- Gda.ConnectionOptions.NONE
- );
- //} catch (Gda.ConnectionError ce) {
- // _this.database_ERROR.el.label = ce.message;
- } catch(Gda.ConnectionError ue) {
- _this.database_ERROR.el.label = ue.message;
- return;
- } catch(Gda.ConfigError ue) {
- _this.database_ERROR.el.label = ue.message;
- return;
- }
- _this.database_ERROR.el.label = "Connection Succeeded";
- cnc.close();
- });
- }
-
- // user defined functions
- }
-
- public class Xcls_database_ERROR : Object
- {
- public Gtk.Label el;
- private Xcls_RooProjectSettings _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_database_ERROR(Xcls_RooProjectSettings _owner )
- {
- _this = _owner;
- _this.database_ERROR = this;
- this.el = new Gtk.Label( " " );
-
- // my vars (dec)
-
- // set gobject values
- this.el.margin = 3;
- this.el.xalign = 0f;
- }
-
- // user defined functions
- }
-
-
-
- public class Xcls_Box23 : Object
- {
- public Gtk.Box el;
- private Xcls_RooProjectSettings _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_Box23(Xcls_RooProjectSettings _owner )
{
_this = _owner;
this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
this.el.homogeneous = true;
this.el.expand = false;
this.el.vexpand = false;
- var child_0 = new Xcls_Button24( _this );
+ var child_0 = new Xcls_Button13( _this );
child_0.ref();
this.el.add ( child_0.el );
- var child_1 = new Xcls_Button25( _this );
+ var child_1 = new Xcls_Button14( _this );
child_1.ref();
this.el.add ( child_1.el );
}
// user defined functions
}
- public class Xcls_Button24 : Object
+ public class Xcls_Button13 : Object
{
public Gtk.Button el;
private Xcls_RooProjectSettings _this;
// my vars (def)
// ctor
- public Xcls_Button24(Xcls_RooProjectSettings _owner )
+ public Xcls_Button13(Xcls_RooProjectSettings _owner )
{
_this = _owner;
this.el = new Gtk.Button();
// user defined functions
}
- public class Xcls_Button25 : Object
+ public class Xcls_Button14 : Object
{
public Gtk.Button el;
private Xcls_RooProjectSettings _this;
// my vars (def)
// ctor
- public Xcls_Button25(Xcls_RooProjectSettings _owner )
+ public Xcls_Button14(Xcls_RooProjectSettings _owner )
{
_this = _owner;
this.el = new Gtk.Button();