1 static Xcls_RooProjectSettings _RooProjectSettings;
3 public class Xcls_RooProjectSettings : Object
6 private Xcls_RooProjectSettings _this;
8 public static Xcls_RooProjectSettings singleton()
10 if (_RooProjectSettings == null) {
11 _RooProjectSettings= new Xcls_RooProjectSettings();
13 return _RooProjectSettings;
15 public Xcls_label_global label_global;
16 public Xcls_label_database label_database;
17 public Xcls_base_template base_template;
18 public Xcls_base_template_cellrenderer base_template_cellrenderer;
19 public Xcls_base_template_model base_template_model;
20 public Xcls_rootURL rootURL;
21 public Xcls_grid grid;
22 public Xcls_filetypelbl filetypelbl;
23 public Xcls_filetype filetype;
24 public Xcls_ftdbcellrenderer ftdbcellrenderer;
25 public Xcls_ftdbmodel ftdbmodel;
27 public Xcls_dircellrenderer dircellrenderer;
28 public Xcls_dirmodel dirmodel;
29 public Xcls_path path;
30 public Xcls_base_template base_template;
31 public Xcls_base_template_cellrenderer base_template_cellrenderer;
32 public Xcls_base_template_model base_template_model;
33 public Xcls_view view;
34 public Xcls_database_DBTYPE database_DBTYPE;
35 public Xcls_database_DBNAME database_DBNAME;
36 public Xcls_database_DBUSERNAME database_DBUSERNAME;
37 public Xcls_database_DBPASSWORD database_DBPASSWORD;
38 public Xcls_database_ERROR database_ERROR;
41 public signal void buttonPressed (string btn);
42 public Project.Project project;
45 public Xcls_RooProjectSettings()
48 this.el = new Gtk.Popover( null );
53 this.el.border_width = 0;
55 this.el.position = Gtk.PositionType.RIGHT;
56 var child_0 = new Xcls_Box2( _this );
58 this.el.add ( child_0.el );
61 // user defined functions
62 public void show (Gtk.Widget btn, Project.Project project) {
63 _this.project = project;
64 _this.path.el.label = project.firstPath();
65 // get the active project.
66 var lm = Gtk.SourceLanguageManager.get_default();
68 ((Gtk.SourceBuffer)(_this.view.el.get_buffer())) .set_language(
69 lm.get_language("html")
73 //project.runhtml = project.runhtml || '';
74 _this.view.el.get_buffer().set_text(project.runhtml);
77 _this.rootURL.el.set_text( _this.project.rootURL );
80 _this.base_template_model.loadData();
82 var js = _this.project;
83 _this.database_DBTYPE.el.set_text( js.get_string_member("DBTYPE") );
84 _this.database_DBNAME.el.set_text( js.get_string_member("DBNAME") );
85 _this.database_DBUSERNAME.el.set_text( js.get_string_member("DBUSERNAME") );
86 _this.database_DBPASSWORD.el.set_text( js.get_string_member("DBPASSWORD") );
88 //console.log('show all');
89 this.el.set_modal(true);
90 this.el.set_relative_to(btn);
92 this.el.set_position(Gtk.PositionType.RIGHT);
95 print("SHOWALL - POPIP\n");
97 this.el.set_size_request(800,500);
98 this.view.el.grab_focus();
101 //this.el.show_all();
103 public void save () {
104 var buf = _this.view.el.get_buffer();
107 buf.get_start_iter(out s);
108 buf.get_end_iter(out e);
109 _this.project.runhtml = buf.get_text(s,e,true);
111 _this.project.rootURL = _this.rootURL.el.get_text();
112 // set by event changed...
113 //_this.project.base_template = _this.base_template.el.get_text();
115 var js = _this.project.json_project_data;
116 js.set_string_member("DBTYPE", _this.database_DBTYPE.el.get_text());
117 js.set_string_member("DBNAME", _this.database_DBNAME.el.get_text());
118 js.set_string_member("DBUSERNAME", _this.database_DBUSERNAME.el.get_text());
119 js.set_string_member("DBPASSWORD", _this.database_DBPASSWORD.el.get_text());
120 // _this.project.set_string_member("DBHOST", _this.DBTYPE.el.get_text());
122 // need to re-init the database
124 _this.project.initRooDatabase();
128 public class Xcls_Box2 : Object
131 private Xcls_RooProjectSettings _this;
137 public Xcls_Box2(Xcls_RooProjectSettings _owner )
140 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
144 // set gobject values
145 this.el.homogeneous = false;
146 this.el.border_width = 5;
147 var child_0 = new Xcls_Notebook3( _this );
149 this.el.pack_start ( child_0.el , true,true,0 );
150 var child_1 = new Xcls_Box44( _this );
152 this.el.pack_end ( child_1.el , false,false,0 );
155 // user defined functions
157 public class Xcls_Notebook3 : Object
159 public Gtk.Notebook el;
160 private Xcls_RooProjectSettings _this;
166 public Xcls_Notebook3(Xcls_RooProjectSettings _owner )
169 this.el = new Gtk.Notebook();
173 // set gobject values
174 var child_0 = new Xcls_label_global( _this );
176 var child_1 = new Xcls_label_database( _this );
178 var child_2 = new Xcls_Box6( _this );
180 this.el.append_page ( child_2.el , _this.label_global.el );
181 var child_3 = new Xcls_Box33( _this );
183 this.el.append_page ( child_3.el , _this.label_database.el );
186 // user defined functions
188 public class Xcls_label_global : Object
191 private Xcls_RooProjectSettings _this;
197 public Xcls_label_global(Xcls_RooProjectSettings _owner )
200 _this.label_global = this;
201 this.el = new Gtk.Label( "Global" );
205 // set gobject values
208 // user defined functions
211 public class Xcls_label_database : Object
214 private Xcls_RooProjectSettings _this;
220 public Xcls_label_database(Xcls_RooProjectSettings _owner )
223 _this.label_database = this;
224 this.el = new Gtk.Label( "Database" );
228 // set gobject values
231 // user defined functions
234 public class Xcls_Box6 : Object
237 private Xcls_RooProjectSettings _this;
243 public Xcls_Box6(Xcls_RooProjectSettings _owner )
246 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
250 // set gobject values
251 this.el.homogeneous = false;
252 var child_0 = new Xcls_Box7( _this );
254 this.el.pack_start ( child_0.el , false,false,0 );
255 var child_1 = new Xcls_Box12( _this );
257 this.el.pack_start ( child_1.el , false,false,0 );
258 var child_2 = new Xcls_Label15( _this );
260 this.el.pack_start ( child_2.el , false,false,0 );
261 var child_3 = new Xcls_grid( _this );
263 this.el.pack_start ( child_3.el , false,false,4 );
264 var child_4 = new Xcls_ScrolledWindow31( _this );
266 this.el.pack_start ( child_4.el , true,true,0 );
269 // user defined functions
271 public class Xcls_Box7 : Object
274 private Xcls_RooProjectSettings _this;
280 public Xcls_Box7(Xcls_RooProjectSettings _owner )
283 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
287 // set gobject values
288 this.el.homogeneous = false;
289 this.el.expand = false;
290 var child_0 = new Xcls_Label8( _this );
292 this.el.pack_start ( child_0.el , false,false,0 );
293 var child_1 = new Xcls_base_template( _this );
295 this.el.add ( child_1.el );
298 // user defined functions
300 public class Xcls_Label8 : Object
303 private Xcls_RooProjectSettings _this;
309 public Xcls_Label8(Xcls_RooProjectSettings _owner )
312 this.el = new Gtk.Label( "HTML template file" );
316 // set gobject values
320 // user defined functions
323 public class Xcls_base_template : Object
325 public Gtk.ComboBox el;
326 private Xcls_RooProjectSettings _this;
333 public Xcls_base_template(Xcls_RooProjectSettings _owner )
336 _this.base_template = this;
337 this.el = new Gtk.ComboBox();
340 this.loading = false;
342 // set gobject values
343 var child_0 = new Xcls_base_template_cellrenderer( _this );
345 this.el.pack_start ( child_0.el , true );
346 var child_1 = new Xcls_base_template_model( _this );
348 this.el.set_model ( child_1.el );
352 this.el.add_attribute(_this.base_template_cellrenderer.el , "markup", 0 );
355 this.el.changed.connect( () => {
358 // this get's called when we are filling in the data... ???
364 if (this.el.get_active_iter(out iter)) {
366 _this.base_template_model.el.get_value (iter, 0, out vfname);
367 _this.project.base_template = ((string)vfname) ;
369 print("\nSET base template to %s\n", _this.project.base_template );
370 // is_bjs = ((string)vfname) == "bjs";
374 // directory is only available for non-bjs
381 // user defined functions
383 public class Xcls_base_template_cellrenderer : Object
385 public Gtk.CellRendererText el;
386 private Xcls_RooProjectSettings _this;
392 public Xcls_base_template_cellrenderer(Xcls_RooProjectSettings _owner )
395 _this.base_template_cellrenderer = this;
396 this.el = new Gtk.CellRendererText();
400 // set gobject values
403 // user defined functions
406 public class Xcls_base_template_model : Object
408 public Gtk.ListStore el;
409 private Xcls_RooProjectSettings _this;
415 public Xcls_base_template_model(Xcls_RooProjectSettings _owner )
418 _this.base_template_model = this;
419 this.el = new Gtk.ListStore( 1, typeof(string) );
423 // set gobject values
426 // user defined functions
427 public void loadData () {
428 _this.base_template.loading = true;
434 /// el.append(out iter);
438 el.set_value(iter, 0, "roo.builder.html");
439 _this.base_template.el.set_active_iter(iter);
440 if (_this.project.base_template == "roo.builder.html") {
441 _this.base_template.el.set_active_iter(iter);
445 el.set_value(iter, 0, "bootstrap.builder.html");
447 print("\ncur template = %s\n", _this.project.base_template);
449 if (_this.project.base_template == "bootstrap.builder.html") {
450 _this.base_template.el.set_active_iter(iter);
454 el.set_value(iter, 0, "mailer.builder.html");
456 if (_this.project.base_template == "mailer.builder.html") {
457 _this.base_template.el.set_active_iter(iter);
459 _this.base_template.loading = false;
466 public class Xcls_Box12 : Object
469 private Xcls_RooProjectSettings _this;
475 public Xcls_Box12(Xcls_RooProjectSettings _owner )
478 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
482 // set gobject values
483 this.el.homogeneous = false;
484 this.el.expand = false;
485 var child_0 = new Xcls_Label13( _this );
487 this.el.pack_start ( child_0.el , false,false,0 );
488 var child_1 = new Xcls_rootURL( _this );
490 this.el.add ( child_1.el );
493 // user defined functions
495 public class Xcls_Label13 : Object
498 private Xcls_RooProjectSettings _this;
504 public Xcls_Label13(Xcls_RooProjectSettings _owner )
507 this.el = new Gtk.Label( "root URL" );
511 // set gobject values
515 // user defined functions
518 public class Xcls_rootURL : Object
521 private Xcls_RooProjectSettings _this;
527 public Xcls_rootURL(Xcls_RooProjectSettings _owner )
530 _this.rootURL = this;
531 this.el = new Gtk.Entry();
535 // set gobject values
538 // user defined functions
542 public class Xcls_Label15 : Object
545 private Xcls_RooProjectSettings _this;
551 public Xcls_Label15(Xcls_RooProjectSettings _owner )
554 this.el = new Gtk.Label( "HTML To insert at end of <HEAD>" );
558 // set gobject values
561 // user defined functions
564 public class Xcls_grid : Object
567 private Xcls_RooProjectSettings _this;
573 public Xcls_grid(Xcls_RooProjectSettings _owner )
577 this.el = new Gtk.Grid();
581 // set gobject values
582 this.el.margin_right = 4;
583 this.el.margin_left = 4;
584 this.el.row_spacing = 2;
585 var child_0 = new Xcls_filetypelbl( _this );
587 this.el.attach ( child_0.el , 0,0,1,1 );
588 var child_1 = new Xcls_filetype( _this );
590 this.el.attach ( child_1.el , 1,0,1,1 );
591 var child_2 = new Xcls_Label21( _this );
593 this.el.attach ( child_2.el , 0,8,1,1 );
594 var child_3 = new Xcls_dir( _this );
596 this.el.attach ( child_3.el , 1,8,1,1 );
597 var child_4 = new Xcls_Label25( _this );
599 this.el.attach ( child_4.el , 0,0,1,1 );
600 var child_5 = new Xcls_path( _this );
602 this.el.attach ( child_5.el , 1,0,1,1 );
603 var child_6 = new Xcls_Label27( _this );
605 this.el.attach ( child_6.el , 0,1,1,1 );
606 var child_7 = new Xcls_base_template( _this );
608 this.el.attach ( child_7.el , 1,1,1,1 );
611 // user defined functions
613 public class Xcls_filetypelbl : Object
616 private Xcls_RooProjectSettings _this;
622 public Xcls_filetypelbl(Xcls_RooProjectSettings _owner )
625 _this.filetypelbl = this;
626 this.el = new Gtk.Label( "File type" );
630 // set gobject values
631 this.el.justify = Gtk.Justification.RIGHT;
632 this.el.xalign = 0.900000f;
635 // user defined functions
638 public class Xcls_filetype : Object
640 public Gtk.ComboBox el;
641 private Xcls_RooProjectSettings _this;
647 public Xcls_filetype(Xcls_RooProjectSettings _owner )
650 _this.filetype = this;
651 this.el = new Gtk.ComboBox();
655 // set gobject values
656 var child_0 = new Xcls_ftdbcellrenderer( _this );
658 this.el.pack_start ( child_0.el , true );
659 var child_1 = new Xcls_ftdbmodel( _this );
661 this.el.set_model ( child_1.el );
665 this.el.add_attribute(_this.ftdbcellrenderer.el , "markup", 1 );
668 this.el.changed.connect( () => {
671 if (this.el.get_active_iter(out iter)) {
673 _this.ftdbmodel.el.get_value (iter, 0, out vfname);
674 is_bjs = ((string)vfname) == "bjs";
678 // directory is only available for non-bjs
679 this.showhide(is_bjs);
685 // user defined functions
686 public void showhide (bool is_bjs) {
687 for (var i = 2; i < 9;i++) {
688 var el = _this.grid.el.get_child_at(0,i);
690 var showhide= is_bjs;
692 showhide = !showhide;
700 el = _this.grid.el.get_child_at(1,i);
707 // load up the directories
708 //??? why can we not create bjs files in other directories??
709 if (!is_bjs && _this.file.path.length < 1) {
710 _this.dirmodel.loadData();
718 public class Xcls_ftdbcellrenderer : Object
720 public Gtk.CellRendererText el;
721 private Xcls_RooProjectSettings _this;
727 public Xcls_ftdbcellrenderer(Xcls_RooProjectSettings _owner )
730 _this.ftdbcellrenderer = this;
731 this.el = new Gtk.CellRendererText();
735 // set gobject values
738 // user defined functions
741 public class Xcls_ftdbmodel : Object
743 public Gtk.ListStore el;
744 private Xcls_RooProjectSettings _this;
750 public Xcls_ftdbmodel(Xcls_RooProjectSettings _owner )
753 _this.ftdbmodel = this;
754 this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
758 // set gobject values
761 // user defined functions
762 public void loadData (string cur) {
767 /// el.append(out iter);
770 // el.set_value(iter, 0, "");
771 // el.set_value(iter, 1, "aaa - Just add Element - aaa");
776 el.set_value(iter, 0, "bjs");
777 el.set_value(iter, 1, "User Interface File (bjs)");
778 _this.filetype.el.set_active_iter(iter);
782 el.set_value(iter, 0, "vala");
783 el.set_value(iter, 1, "Vala");
785 _this.filetype.el.set_active_iter(iter);
792 el.set_value(iter, 0, "js");
793 el.set_value(iter, 1, "Javascript");
796 _this.filetype.el.set_active_iter(iter);
801 el.set_value(iter, 0, "css");
802 el.set_value(iter, 1, "CSS");
805 _this.filetype.el.set_active_iter(iter);
812 public class Xcls_Label21 : Object
815 private Xcls_RooProjectSettings _this;
821 public Xcls_Label21(Xcls_RooProjectSettings _owner )
824 this.el = new Gtk.Label( "Directory" );
828 // set gobject values
829 this.el.justify = Gtk.Justification.RIGHT;
830 this.el.xalign = 0.900000f;
831 this.el.visible = true;
834 // user defined functions
837 public class Xcls_dir : Object
839 public Gtk.ComboBox el;
840 private Xcls_RooProjectSettings _this;
846 public Xcls_dir(Xcls_RooProjectSettings _owner )
850 this.el = new Gtk.ComboBox();
854 // set gobject values
855 var child_0 = new Xcls_dircellrenderer( _this );
857 this.el.pack_start ( child_0.el , true );
858 var child_1 = new Xcls_dirmodel( _this );
860 this.el.set_model ( child_1.el );
864 this.el.add_attribute(_this.dircellrenderer.el , "markup", 1 );
867 // user defined functions
869 public class Xcls_dircellrenderer : Object
871 public Gtk.CellRendererText el;
872 private Xcls_RooProjectSettings _this;
878 public Xcls_dircellrenderer(Xcls_RooProjectSettings _owner )
881 _this.dircellrenderer = this;
882 this.el = new Gtk.CellRendererText();
886 // set gobject values
889 // user defined functions
892 public class Xcls_dirmodel : Object
894 public Gtk.ListStore el;
895 private Xcls_RooProjectSettings _this;
901 public Xcls_dirmodel(Xcls_RooProjectSettings _owner )
904 _this.dirmodel = this;
905 this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
909 // set gobject values
912 // user defined functions
913 public void loadData () {
919 if (!(_this.project is Project.Gtk)) {
922 var sd = ((Project.Gtk)_this.project).sourcedirs();
927 /// el.append(out iter);
930 // el.set_value(iter, 0, "");
931 // el.set_value(iter, 1, "aaa - Just add Element - aaa");
933 // el.append(out iter);
936 // el.set_value(iter, 0, "");
937 // el.set_value(iter, 1, "-- select a directoyr --");
938 //_this.build_module.el.set_active_iter(iter);
940 for (var i = 0; i < sd.length;i++) {
945 el.set_value(iter, 0, sd[i]);
946 el.set_value(iter, 1, sd[i]);
948 //if (data.get(i) == cur) {
949 // _this.build_module.el.set_active_iter(iter);
953 // this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);
959 public class Xcls_Label25 : Object
962 private Xcls_RooProjectSettings _this;
968 public Xcls_Label25(Xcls_RooProjectSettings _owner )
971 this.el = new Gtk.Label( "Filename" );
975 // set gobject values
980 // user defined functions
983 public class Xcls_path : Object
986 private Xcls_RooProjectSettings _this;
992 public Xcls_path(Xcls_RooProjectSettings _owner )
996 this.el = new Gtk.Label( "filename" );
1000 // set gobject values
1002 this.el.xalign = 0f;
1005 // user defined functions
1008 public class Xcls_Label27 : Object
1010 public Gtk.Label el;
1011 private Xcls_RooProjectSettings _this;
1017 public Xcls_Label27(Xcls_RooProjectSettings _owner )
1020 this.el = new Gtk.Label( "HTML template file" );
1024 // set gobject values
1028 // user defined functions
1031 public class Xcls_base_template : Object
1033 public Gtk.ComboBox el;
1034 private Xcls_RooProjectSettings _this;
1038 public bool loading;
1041 public Xcls_base_template(Xcls_RooProjectSettings _owner )
1044 _this.base_template = this;
1045 this.el = new Gtk.ComboBox();
1048 this.loading = false;
1050 // set gobject values
1051 var child_0 = new Xcls_base_template_cellrenderer( _this );
1053 this.el.pack_start ( child_0.el , true );
1054 var child_1 = new Xcls_base_template_model( _this );
1056 this.el.set_model ( child_1.el );
1060 this.el.add_attribute(_this.base_template_cellrenderer.el , "markup", 0 );
1063 this.el.changed.connect( () => {
1066 // this get's called when we are filling in the data... ???
1072 if (this.el.get_active_iter(out iter)) {
1074 _this.base_template_model.el.get_value (iter, 0, out vfname);
1075 _this.project.base_template = ((string)vfname) ;
1077 print("\nSET base template to %s\n", _this.project.base_template );
1078 // is_bjs = ((string)vfname) == "bjs";
1082 // directory is only available for non-bjs
1089 // user defined functions
1091 public class Xcls_base_template_cellrenderer : Object
1093 public Gtk.CellRendererText el;
1094 private Xcls_RooProjectSettings _this;
1100 public Xcls_base_template_cellrenderer(Xcls_RooProjectSettings _owner )
1103 _this.base_template_cellrenderer = this;
1104 this.el = new Gtk.CellRendererText();
1108 // set gobject values
1111 // user defined functions
1114 public class Xcls_base_template_model : Object
1116 public Gtk.ListStore el;
1117 private Xcls_RooProjectSettings _this;
1123 public Xcls_base_template_model(Xcls_RooProjectSettings _owner )
1126 _this.base_template_model = this;
1127 this.el = new Gtk.ListStore( 1, typeof(string) );
1131 // set gobject values
1134 // user defined functions
1135 public void loadData () {
1136 _this.base_template.loading = true;
1142 /// el.append(out iter);
1145 el.append(out iter);
1146 el.set_value(iter, 0, "roo.builder.html");
1147 _this.base_template.el.set_active_iter(iter);
1148 if (_this.project.base_template == "roo.builder.html") {
1149 _this.base_template.el.set_active_iter(iter);
1152 el.append(out iter);
1153 el.set_value(iter, 0, "bootstrap.builder.html");
1155 print("\ncur template = %s\n", _this.project.base_template);
1157 if (_this.project.base_template == "bootstrap.builder.html") {
1158 _this.base_template.el.set_active_iter(iter);
1161 el.append(out iter);
1162 el.set_value(iter, 0, "mailer.builder.html");
1164 if (_this.project.base_template == "mailer.builder.html") {
1165 _this.base_template.el.set_active_iter(iter);
1167 _this.base_template.loading = false;
1174 public class Xcls_ScrolledWindow31 : Object
1176 public Gtk.ScrolledWindow el;
1177 private Xcls_RooProjectSettings _this;
1183 public Xcls_ScrolledWindow31(Xcls_RooProjectSettings _owner )
1186 this.el = new Gtk.ScrolledWindow( null, null );
1190 // set gobject values
1191 var child_0 = new Xcls_view( _this );
1193 this.el.add ( child_0.el );
1196 // user defined functions
1198 public class Xcls_view : Object
1200 public Gtk.SourceView el;
1201 private Xcls_RooProjectSettings _this;
1207 public Xcls_view(Xcls_RooProjectSettings _owner )
1211 this.el = new Gtk.SourceView();
1217 var description = Pango.FontDescription.from_string("monospace");
1218 description.set_size(9000);
1219 this.el.override_font(description);
1222 this.el.key_release_event.connect( ( event) =>{
1223 if (event.keyval != 115) {
1227 if ( (event.state & Gdk.ModifierType.CONTROL_MASK ) < 1 ) {
1230 var buf = this.el.get_buffer();
1233 buf.get_start_iter(out s);
1234 buf.get_end_iter(out e);
1235 _this.project.runhtml = buf.get_text(s,e,true);
1238 _this.buttonPressed("save");
1245 // user defined functions
1250 public class Xcls_Box33 : Object
1253 private Xcls_RooProjectSettings _this;
1259 public Xcls_Box33(Xcls_RooProjectSettings _owner )
1262 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
1266 // set gobject values
1267 this.el.homogeneous = false;
1268 var child_0 = new Xcls_Label34( _this );
1270 this.el.pack_start ( child_0.el , false,false,0 );
1271 var child_1 = new Xcls_database_DBTYPE( _this );
1273 this.el.pack_start ( child_1.el , false,false,0 );
1274 var child_2 = new Xcls_Label36( _this );
1276 this.el.pack_start ( child_2.el , false,false,0 );
1277 var child_3 = new Xcls_database_DBNAME( _this );
1279 this.el.pack_start ( child_3.el , false,false,0 );
1280 var child_4 = new Xcls_Label38( _this );
1282 this.el.pack_start ( child_4.el , false,false,0 );
1283 var child_5 = new Xcls_database_DBUSERNAME( _this );
1285 this.el.pack_start ( child_5.el , false,false,0 );
1286 var child_6 = new Xcls_Label40( _this );
1288 this.el.pack_start ( child_6.el , false,false,0 );
1289 var child_7 = new Xcls_database_DBPASSWORD( _this );
1291 this.el.pack_start ( child_7.el , false,false,0 );
1292 var child_8 = new Xcls_Button42( _this );
1294 this.el.pack_start ( child_8.el , false,false,0 );
1295 var child_9 = new Xcls_database_ERROR( _this );
1297 this.el.pack_start ( child_9.el , false,false,0 );
1300 // user defined functions
1302 public class Xcls_Label34 : Object
1304 public Gtk.Label el;
1305 private Xcls_RooProjectSettings _this;
1311 public Xcls_Label34(Xcls_RooProjectSettings _owner )
1314 this.el = new Gtk.Label( "Type (eg. MySQL or PostgreSQL)" );
1318 // set gobject values
1319 this.el.xalign = 0f;
1322 // user defined functions
1325 public class Xcls_database_DBTYPE : Object
1327 public Gtk.Entry el;
1328 private Xcls_RooProjectSettings _this;
1334 public Xcls_database_DBTYPE(Xcls_RooProjectSettings _owner )
1337 _this.database_DBTYPE = this;
1338 this.el = new Gtk.Entry();
1342 // set gobject values
1345 this.el.key_press_event.connect( (ev) => {
1347 if (ev.keyval == Gdk.Key.Tab) {
1348 _this.database_DBNAME.el.grab_focus();
1357 // user defined functions
1360 public class Xcls_Label36 : Object
1362 public Gtk.Label el;
1363 private Xcls_RooProjectSettings _this;
1369 public Xcls_Label36(Xcls_RooProjectSettings _owner )
1372 this.el = new Gtk.Label( "Name" );
1376 // set gobject values
1377 this.el.xalign = 0f;
1380 // user defined functions
1383 public class Xcls_database_DBNAME : Object
1385 public Gtk.Entry el;
1386 private Xcls_RooProjectSettings _this;
1392 public Xcls_database_DBNAME(Xcls_RooProjectSettings _owner )
1395 _this.database_DBNAME = this;
1396 this.el = new Gtk.Entry();
1400 // set gobject values
1403 this.el.key_press_event.connect( (ev) => {
1405 if (ev.keyval == Gdk.Key.Tab) {
1406 _this.database_DBUSERNAME.el.grab_focus();
1415 // user defined functions
1418 public class Xcls_Label38 : Object
1420 public Gtk.Label el;
1421 private Xcls_RooProjectSettings _this;
1427 public Xcls_Label38(Xcls_RooProjectSettings _owner )
1430 this.el = new Gtk.Label( "Username" );
1434 // set gobject values
1435 this.el.xalign = 0f;
1438 // user defined functions
1441 public class Xcls_database_DBUSERNAME : Object
1443 public Gtk.Entry el;
1444 private Xcls_RooProjectSettings _this;
1450 public Xcls_database_DBUSERNAME(Xcls_RooProjectSettings _owner )
1453 _this.database_DBUSERNAME = this;
1454 this.el = new Gtk.Entry();
1458 // set gobject values
1461 this.el.key_press_event.connect( (ev) => {
1463 if (ev.keyval == Gdk.Key.Tab) {
1464 _this.database_DBPASSWORD.el.grab_focus();
1473 // user defined functions
1476 public class Xcls_Label40 : Object
1478 public Gtk.Label el;
1479 private Xcls_RooProjectSettings _this;
1485 public Xcls_Label40(Xcls_RooProjectSettings _owner )
1488 this.el = new Gtk.Label( "Password" );
1492 // set gobject values
1493 this.el.xalign = 0f;
1496 // user defined functions
1499 public class Xcls_database_DBPASSWORD : Object
1501 public Gtk.Entry el;
1502 private Xcls_RooProjectSettings _this;
1508 public Xcls_database_DBPASSWORD(Xcls_RooProjectSettings _owner )
1511 _this.database_DBPASSWORD = this;
1512 this.el = new Gtk.Entry();
1516 // set gobject values
1519 // user defined functions
1522 public class Xcls_Button42 : Object
1524 public Gtk.Button el;
1525 private Xcls_RooProjectSettings _this;
1531 public Xcls_Button42(Xcls_RooProjectSettings _owner )
1534 this.el = new Gtk.Button();
1538 // set gobject values
1539 this.el.label = "Check Connection";
1542 this.el.clicked.connect( () => {
1545 _this.database_ERROR.el.label = "";
1548 // assumes localhost...
1549 cnc = Gda.Connection.open_from_string (
1550 _this.database_DBTYPE.el.get_text(),
1551 "DB_NAME=" + _this.database_DBNAME.el.get_text(),
1552 "USERNAME=" + _this.database_DBUSERNAME.el.get_text() +
1553 ";PASSWORD=" + _this.database_DBPASSWORD.el.get_text(),
1554 Gda.ConnectionOptions.NONE
1556 //} catch (Gda.ConnectionError ce) {
1557 // _this.database_ERROR.el.label = ce.message;
1558 } catch(Gda.ConnectionError ue) {
1559 _this.database_ERROR.el.label = ue.message;
1561 } catch(Gda.ConfigError ue) {
1562 _this.database_ERROR.el.label = ue.message;
1565 _this.database_ERROR.el.label = "Connection Succeeded";
1570 // user defined functions
1573 public class Xcls_database_ERROR : Object
1575 public Gtk.Label el;
1576 private Xcls_RooProjectSettings _this;
1582 public Xcls_database_ERROR(Xcls_RooProjectSettings _owner )
1585 _this.database_ERROR = this;
1586 this.el = new Gtk.Label( " " );
1590 // set gobject values
1592 this.el.xalign = 0f;
1595 // user defined functions
1600 public class Xcls_Box44 : Object
1603 private Xcls_RooProjectSettings _this;
1609 public Xcls_Box44(Xcls_RooProjectSettings _owner )
1612 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
1616 // set gobject values
1617 this.el.homogeneous = true;
1618 this.el.expand = false;
1619 this.el.vexpand = false;
1620 var child_0 = new Xcls_Button45( _this );
1622 this.el.add ( child_0.el );
1623 var child_1 = new Xcls_Button46( _this );
1625 this.el.add ( child_1.el );
1628 // user defined functions
1630 public class Xcls_Button45 : Object
1632 public Gtk.Button el;
1633 private Xcls_RooProjectSettings _this;
1639 public Xcls_Button45(Xcls_RooProjectSettings _owner )
1642 this.el = new Gtk.Button();
1646 // set gobject values
1647 this.el.label = "Apply";
1650 this.el.button_press_event.connect( () => {
1653 _this.buttonPressed("apply");
1658 // user defined functions
1661 public class Xcls_Button46 : Object
1663 public Gtk.Button el;
1664 private Xcls_RooProjectSettings _this;
1670 public Xcls_Button46(Xcls_RooProjectSettings _owner )
1673 this.el = new Gtk.Button();
1677 // set gobject values
1678 this.el.label = "Save";
1681 this.el.button_press_event.connect( () => {
1684 _this.buttonPressed("save");
1689 // user defined functions