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_path path;
18 public Xcls_base_template base_template;
19 public Xcls_base_template_cellrenderer base_template_cellrenderer;
20 public Xcls_base_template_model base_template_model;
21 public Xcls_rootURL rootURL;
22 public Xcls_grid grid;
23 public Xcls_filetypelbl filetypelbl;
24 public Xcls_filetype filetype;
25 public Xcls_ftdbcellrenderer ftdbcellrenderer;
26 public Xcls_ftdbmodel ftdbmodel;
28 public Xcls_dircellrenderer dircellrenderer;
29 public Xcls_dirmodel dirmodel;
30 public Xcls_path path;
31 public Xcls_view view;
32 public Xcls_database_DBTYPE database_DBTYPE;
33 public Xcls_database_DBNAME database_DBNAME;
34 public Xcls_database_DBUSERNAME database_DBUSERNAME;
35 public Xcls_database_DBPASSWORD database_DBPASSWORD;
36 public Xcls_database_ERROR database_ERROR;
39 public signal void buttonPressed (string btn);
40 public Project.Project project;
43 public Xcls_RooProjectSettings()
46 this.el = new Gtk.Popover( null );
51 this.el.border_width = 0;
53 this.el.position = Gtk.PositionType.RIGHT;
54 var child_0 = new Xcls_Box2( _this );
56 this.el.add ( child_0.el );
59 // user defined functions
60 public void show (Gtk.Widget btn, Project.Project project) {
61 _this.project = project;
62 _this.path.el.label = project.firstPath();
63 // get the active project.
64 var lm = Gtk.SourceLanguageManager.get_default();
66 ((Gtk.SourceBuffer)(_this.view.el.get_buffer())) .set_language(
67 lm.get_language("html")
71 //project.runhtml = project.runhtml || '';
72 _this.view.el.get_buffer().set_text(project.runhtml);
75 _this.rootURL.el.set_text( _this.project.rootURL );
78 _this.base_template_model.loadData();
80 var js = _this.project;
81 _this.database_DBTYPE.el.set_text( js.get_string_member("DBTYPE") );
82 _this.database_DBNAME.el.set_text( js.get_string_member("DBNAME") );
83 _this.database_DBUSERNAME.el.set_text( js.get_string_member("DBUSERNAME") );
84 _this.database_DBPASSWORD.el.set_text( js.get_string_member("DBPASSWORD") );
86 //console.log('show all');
87 this.el.set_modal(true);
88 this.el.set_relative_to(btn);
90 this.el.set_position(Gtk.PositionType.RIGHT);
93 print("SHOWALL - POPIP\n");
95 this.el.set_size_request(800,500);
96 this.view.el.grab_focus();
101 public void save () {
102 var buf = _this.view.el.get_buffer();
105 buf.get_start_iter(out s);
106 buf.get_end_iter(out e);
107 _this.project.runhtml = buf.get_text(s,e,true);
109 _this.project.rootURL = _this.rootURL.el.get_text();
110 // set by event changed...
111 //_this.project.base_template = _this.base_template.el.get_text();
113 var js = _this.project.json_project_data;
114 js.set_string_member("DBTYPE", _this.database_DBTYPE.el.get_text());
115 js.set_string_member("DBNAME", _this.database_DBNAME.el.get_text());
116 js.set_string_member("DBUSERNAME", _this.database_DBUSERNAME.el.get_text());
117 js.set_string_member("DBPASSWORD", _this.database_DBPASSWORD.el.get_text());
118 // _this.project.set_string_member("DBHOST", _this.DBTYPE.el.get_text());
120 // need to re-init the database
122 _this.project.initRooDatabase();
126 public class Xcls_Box2 : Object
129 private Xcls_RooProjectSettings _this;
135 public Xcls_Box2(Xcls_RooProjectSettings _owner )
138 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
142 // set gobject values
143 this.el.homogeneous = false;
144 this.el.border_width = 5;
145 var child_0 = new Xcls_Notebook3( _this );
147 this.el.pack_start ( child_0.el , true,true,0 );
148 var child_1 = new Xcls_Box40( _this );
150 this.el.pack_end ( child_1.el , false,false,0 );
153 // user defined functions
155 public class Xcls_Notebook3 : Object
157 public Gtk.Notebook el;
158 private Xcls_RooProjectSettings _this;
164 public Xcls_Notebook3(Xcls_RooProjectSettings _owner )
167 this.el = new Gtk.Notebook();
171 // set gobject values
172 var child_0 = new Xcls_label_global( _this );
174 var child_1 = new Xcls_label_database( _this );
176 var child_2 = new Xcls_Box6( _this );
178 this.el.append_page ( child_2.el , _this.label_global.el );
179 var child_3 = new Xcls_Box29( _this );
181 this.el.append_page ( child_3.el , _this.label_database.el );
184 // user defined functions
186 public class Xcls_label_global : Object
189 private Xcls_RooProjectSettings _this;
195 public Xcls_label_global(Xcls_RooProjectSettings _owner )
198 _this.label_global = this;
199 this.el = new Gtk.Label( "Global" );
203 // set gobject values
206 // user defined functions
209 public class Xcls_label_database : Object
212 private Xcls_RooProjectSettings _this;
218 public Xcls_label_database(Xcls_RooProjectSettings _owner )
221 _this.label_database = this;
222 this.el = new Gtk.Label( "Database" );
226 // set gobject values
229 // user defined functions
232 public class Xcls_Box6 : Object
235 private Xcls_RooProjectSettings _this;
241 public Xcls_Box6(Xcls_RooProjectSettings _owner )
244 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
248 // set gobject values
249 this.el.homogeneous = false;
250 var child_0 = new Xcls_path( _this );
252 this.el.pack_start ( child_0.el , false,false,0 );
253 var child_1 = new Xcls_Box8( _this );
255 this.el.pack_start ( child_1.el , false,false,0 );
256 var child_2 = new Xcls_Box13( _this );
258 this.el.pack_start ( child_2.el , false,false,0 );
259 var child_3 = new Xcls_Label16( _this );
261 this.el.pack_start ( child_3.el , false,false,0 );
262 var child_4 = new Xcls_grid( _this );
264 this.el.pack_start ( child_4.el , false,false,4 );
265 var child_5 = new Xcls_path( _this );
267 this.el.attach ( child_5.el , 0,0,1,1 );
268 var child_6 = new Xcls_ScrolledWindow27( _this );
270 this.el.pack_start ( child_6.el , true,true,0 );
273 // user defined functions
275 public class Xcls_path : Object
278 private Xcls_RooProjectSettings _this;
284 public Xcls_path(Xcls_RooProjectSettings _owner )
288 this.el = new Gtk.Label( "filename" );
292 // set gobject values
297 // user defined functions
300 public class Xcls_Box8 : Object
303 private Xcls_RooProjectSettings _this;
309 public Xcls_Box8(Xcls_RooProjectSettings _owner )
312 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
316 // set gobject values
317 this.el.homogeneous = false;
318 this.el.expand = false;
319 var child_0 = new Xcls_Label9( _this );
321 this.el.pack_start ( child_0.el , false,false,0 );
322 var child_1 = new Xcls_base_template( _this );
324 this.el.add ( child_1.el );
327 // user defined functions
329 public class Xcls_Label9 : Object
332 private Xcls_RooProjectSettings _this;
338 public Xcls_Label9(Xcls_RooProjectSettings _owner )
341 this.el = new Gtk.Label( "HTML template file" );
345 // set gobject values
349 // user defined functions
352 public class Xcls_base_template : Object
354 public Gtk.ComboBox el;
355 private Xcls_RooProjectSettings _this;
362 public Xcls_base_template(Xcls_RooProjectSettings _owner )
365 _this.base_template = this;
366 this.el = new Gtk.ComboBox();
369 this.loading = false;
371 // set gobject values
372 var child_0 = new Xcls_base_template_cellrenderer( _this );
374 this.el.pack_start ( child_0.el , true );
375 var child_1 = new Xcls_base_template_model( _this );
377 this.el.set_model ( child_1.el );
381 this.el.add_attribute(_this.base_template_cellrenderer.el , "markup", 0 );
384 this.el.changed.connect( () => {
387 // this get's called when we are filling in the data... ???
393 if (this.el.get_active_iter(out iter)) {
395 _this.base_template_model.el.get_value (iter, 0, out vfname);
396 _this.project.base_template = ((string)vfname) ;
398 print("\nSET base template to %s\n", _this.project.base_template );
399 // is_bjs = ((string)vfname) == "bjs";
403 // directory is only available for non-bjs
410 // user defined functions
412 public class Xcls_base_template_cellrenderer : Object
414 public Gtk.CellRendererText el;
415 private Xcls_RooProjectSettings _this;
421 public Xcls_base_template_cellrenderer(Xcls_RooProjectSettings _owner )
424 _this.base_template_cellrenderer = this;
425 this.el = new Gtk.CellRendererText();
429 // set gobject values
432 // user defined functions
435 public class Xcls_base_template_model : Object
437 public Gtk.ListStore el;
438 private Xcls_RooProjectSettings _this;
444 public Xcls_base_template_model(Xcls_RooProjectSettings _owner )
447 _this.base_template_model = this;
448 this.el = new Gtk.ListStore( 1, typeof(string) );
452 // set gobject values
455 // user defined functions
456 public void loadData () {
457 _this.base_template.loading = true;
463 /// el.append(out iter);
467 el.set_value(iter, 0, "roo.builder.html");
468 _this.base_template.el.set_active_iter(iter);
469 if (_this.project.base_template == "roo.builder.html") {
470 _this.base_template.el.set_active_iter(iter);
474 el.set_value(iter, 0, "bootstrap.builder.html");
476 print("\ncur template = %s\n", _this.project.base_template);
478 if (_this.project.base_template == "bootstrap.builder.html") {
479 _this.base_template.el.set_active_iter(iter);
483 el.set_value(iter, 0, "mailer.builder.html");
485 if (_this.project.base_template == "mailer.builder.html") {
486 _this.base_template.el.set_active_iter(iter);
488 _this.base_template.loading = false;
495 public class Xcls_Box13 : Object
498 private Xcls_RooProjectSettings _this;
504 public Xcls_Box13(Xcls_RooProjectSettings _owner )
507 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
511 // set gobject values
512 this.el.homogeneous = false;
513 this.el.expand = false;
514 var child_0 = new Xcls_Label14( _this );
516 this.el.pack_start ( child_0.el , false,false,0 );
517 var child_1 = new Xcls_rootURL( _this );
519 this.el.add ( child_1.el );
522 // user defined functions
524 public class Xcls_Label14 : Object
527 private Xcls_RooProjectSettings _this;
533 public Xcls_Label14(Xcls_RooProjectSettings _owner )
536 this.el = new Gtk.Label( "root URL" );
540 // set gobject values
544 // user defined functions
547 public class Xcls_rootURL : Object
550 private Xcls_RooProjectSettings _this;
556 public Xcls_rootURL(Xcls_RooProjectSettings _owner )
559 _this.rootURL = this;
560 this.el = new Gtk.Entry();
564 // set gobject values
567 // user defined functions
571 public class Xcls_Label16 : Object
574 private Xcls_RooProjectSettings _this;
580 public Xcls_Label16(Xcls_RooProjectSettings _owner )
583 this.el = new Gtk.Label( "HTML To insert at end of <HEAD>" );
587 // set gobject values
590 // user defined functions
593 public class Xcls_grid : Object
596 private Xcls_RooProjectSettings _this;
602 public Xcls_grid(Xcls_RooProjectSettings _owner )
606 this.el = new Gtk.Grid();
610 // set gobject values
611 this.el.margin_right = 4;
612 this.el.margin_left = 4;
613 this.el.row_spacing = 2;
614 var child_0 = new Xcls_filetypelbl( _this );
616 this.el.attach ( child_0.el , 0,0,1,1 );
617 var child_1 = new Xcls_filetype( _this );
619 this.el.attach ( child_1.el , 1,0,1,1 );
620 var child_2 = new Xcls_Label22( _this );
622 this.el.attach ( child_2.el , 0,8,1,1 );
623 var child_3 = new Xcls_dir( _this );
625 this.el.attach ( child_3.el , 1,8,1,1 );
628 // user defined functions
630 public class Xcls_filetypelbl : Object
633 private Xcls_RooProjectSettings _this;
639 public Xcls_filetypelbl(Xcls_RooProjectSettings _owner )
642 _this.filetypelbl = this;
643 this.el = new Gtk.Label( "File type" );
647 // set gobject values
648 this.el.justify = Gtk.Justification.RIGHT;
649 this.el.xalign = 0.900000f;
652 // user defined functions
655 public class Xcls_filetype : Object
657 public Gtk.ComboBox el;
658 private Xcls_RooProjectSettings _this;
664 public Xcls_filetype(Xcls_RooProjectSettings _owner )
667 _this.filetype = this;
668 this.el = new Gtk.ComboBox();
672 // set gobject values
673 var child_0 = new Xcls_ftdbcellrenderer( _this );
675 this.el.pack_start ( child_0.el , true );
676 var child_1 = new Xcls_ftdbmodel( _this );
678 this.el.set_model ( child_1.el );
682 this.el.add_attribute(_this.ftdbcellrenderer.el , "markup", 1 );
685 this.el.changed.connect( () => {
688 if (this.el.get_active_iter(out iter)) {
690 _this.ftdbmodel.el.get_value (iter, 0, out vfname);
691 is_bjs = ((string)vfname) == "bjs";
695 // directory is only available for non-bjs
696 this.showhide(is_bjs);
702 // user defined functions
703 public void showhide (bool is_bjs) {
704 for (var i = 2; i < 9;i++) {
705 var el = _this.grid.el.get_child_at(0,i);
707 var showhide= is_bjs;
709 showhide = !showhide;
717 el = _this.grid.el.get_child_at(1,i);
724 // load up the directories
725 //??? why can we not create bjs files in other directories??
726 if (!is_bjs && _this.file.path.length < 1) {
727 _this.dirmodel.loadData();
735 public class Xcls_ftdbcellrenderer : Object
737 public Gtk.CellRendererText el;
738 private Xcls_RooProjectSettings _this;
744 public Xcls_ftdbcellrenderer(Xcls_RooProjectSettings _owner )
747 _this.ftdbcellrenderer = this;
748 this.el = new Gtk.CellRendererText();
752 // set gobject values
755 // user defined functions
758 public class Xcls_ftdbmodel : Object
760 public Gtk.ListStore el;
761 private Xcls_RooProjectSettings _this;
767 public Xcls_ftdbmodel(Xcls_RooProjectSettings _owner )
770 _this.ftdbmodel = this;
771 this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
775 // set gobject values
778 // user defined functions
779 public void loadData (string cur) {
784 /// el.append(out iter);
787 // el.set_value(iter, 0, "");
788 // el.set_value(iter, 1, "aaa - Just add Element - aaa");
793 el.set_value(iter, 0, "bjs");
794 el.set_value(iter, 1, "User Interface File (bjs)");
795 _this.filetype.el.set_active_iter(iter);
799 el.set_value(iter, 0, "vala");
800 el.set_value(iter, 1, "Vala");
802 _this.filetype.el.set_active_iter(iter);
809 el.set_value(iter, 0, "js");
810 el.set_value(iter, 1, "Javascript");
813 _this.filetype.el.set_active_iter(iter);
818 el.set_value(iter, 0, "css");
819 el.set_value(iter, 1, "CSS");
822 _this.filetype.el.set_active_iter(iter);
829 public class Xcls_Label22 : Object
832 private Xcls_RooProjectSettings _this;
838 public Xcls_Label22(Xcls_RooProjectSettings _owner )
841 this.el = new Gtk.Label( "Directory" );
845 // set gobject values
846 this.el.justify = Gtk.Justification.RIGHT;
847 this.el.xalign = 0.900000f;
848 this.el.visible = true;
851 // user defined functions
854 public class Xcls_dir : Object
856 public Gtk.ComboBox el;
857 private Xcls_RooProjectSettings _this;
863 public Xcls_dir(Xcls_RooProjectSettings _owner )
867 this.el = new Gtk.ComboBox();
871 // set gobject values
872 var child_0 = new Xcls_dircellrenderer( _this );
874 this.el.pack_start ( child_0.el , true );
875 var child_1 = new Xcls_dirmodel( _this );
877 this.el.set_model ( child_1.el );
881 this.el.add_attribute(_this.dircellrenderer.el , "markup", 1 );
884 // user defined functions
886 public class Xcls_dircellrenderer : Object
888 public Gtk.CellRendererText el;
889 private Xcls_RooProjectSettings _this;
895 public Xcls_dircellrenderer(Xcls_RooProjectSettings _owner )
898 _this.dircellrenderer = this;
899 this.el = new Gtk.CellRendererText();
903 // set gobject values
906 // user defined functions
909 public class Xcls_dirmodel : Object
911 public Gtk.ListStore el;
912 private Xcls_RooProjectSettings _this;
918 public Xcls_dirmodel(Xcls_RooProjectSettings _owner )
921 _this.dirmodel = this;
922 this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
926 // set gobject values
929 // user defined functions
930 public void loadData () {
936 if (!(_this.project is Project.Gtk)) {
939 var sd = ((Project.Gtk)_this.project).sourcedirs();
944 /// el.append(out iter);
947 // el.set_value(iter, 0, "");
948 // el.set_value(iter, 1, "aaa - Just add Element - aaa");
950 // el.append(out iter);
953 // el.set_value(iter, 0, "");
954 // el.set_value(iter, 1, "-- select a directoyr --");
955 //_this.build_module.el.set_active_iter(iter);
957 for (var i = 0; i < sd.length;i++) {
962 el.set_value(iter, 0, sd[i]);
963 el.set_value(iter, 1, sd[i]);
965 //if (data.get(i) == cur) {
966 // _this.build_module.el.set_active_iter(iter);
970 // this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);
977 public class Xcls_path : Object
980 private Xcls_RooProjectSettings _this;
986 public Xcls_path(Xcls_RooProjectSettings _owner )
990 this.el = new Gtk.Label( "filename" );
994 // set gobject values
999 // user defined functions
1002 public class Xcls_ScrolledWindow27 : Object
1004 public Gtk.ScrolledWindow el;
1005 private Xcls_RooProjectSettings _this;
1011 public Xcls_ScrolledWindow27(Xcls_RooProjectSettings _owner )
1014 this.el = new Gtk.ScrolledWindow( null, null );
1018 // set gobject values
1019 var child_0 = new Xcls_view( _this );
1021 this.el.add ( child_0.el );
1024 // user defined functions
1026 public class Xcls_view : Object
1028 public Gtk.SourceView el;
1029 private Xcls_RooProjectSettings _this;
1035 public Xcls_view(Xcls_RooProjectSettings _owner )
1039 this.el = new Gtk.SourceView();
1045 var description = Pango.FontDescription.from_string("monospace");
1046 description.set_size(9000);
1047 this.el.override_font(description);
1050 this.el.key_release_event.connect( ( event) =>{
1051 if (event.keyval != 115) {
1055 if ( (event.state & Gdk.ModifierType.CONTROL_MASK ) < 1 ) {
1058 var buf = this.el.get_buffer();
1061 buf.get_start_iter(out s);
1062 buf.get_end_iter(out e);
1063 _this.project.runhtml = buf.get_text(s,e,true);
1066 _this.buttonPressed("save");
1073 // user defined functions
1078 public class Xcls_Box29 : Object
1081 private Xcls_RooProjectSettings _this;
1087 public Xcls_Box29(Xcls_RooProjectSettings _owner )
1090 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
1094 // set gobject values
1095 this.el.homogeneous = false;
1096 var child_0 = new Xcls_Label30( _this );
1098 this.el.pack_start ( child_0.el , false,false,0 );
1099 var child_1 = new Xcls_database_DBTYPE( _this );
1101 this.el.pack_start ( child_1.el , false,false,0 );
1102 var child_2 = new Xcls_Label32( _this );
1104 this.el.pack_start ( child_2.el , false,false,0 );
1105 var child_3 = new Xcls_database_DBNAME( _this );
1107 this.el.pack_start ( child_3.el , false,false,0 );
1108 var child_4 = new Xcls_Label34( _this );
1110 this.el.pack_start ( child_4.el , false,false,0 );
1111 var child_5 = new Xcls_database_DBUSERNAME( _this );
1113 this.el.pack_start ( child_5.el , false,false,0 );
1114 var child_6 = new Xcls_Label36( _this );
1116 this.el.pack_start ( child_6.el , false,false,0 );
1117 var child_7 = new Xcls_database_DBPASSWORD( _this );
1119 this.el.pack_start ( child_7.el , false,false,0 );
1120 var child_8 = new Xcls_Button38( _this );
1122 this.el.pack_start ( child_8.el , false,false,0 );
1123 var child_9 = new Xcls_database_ERROR( _this );
1125 this.el.pack_start ( child_9.el , false,false,0 );
1128 // user defined functions
1130 public class Xcls_Label30 : Object
1132 public Gtk.Label el;
1133 private Xcls_RooProjectSettings _this;
1139 public Xcls_Label30(Xcls_RooProjectSettings _owner )
1142 this.el = new Gtk.Label( "Type (eg. MySQL or PostgreSQL)" );
1146 // set gobject values
1147 this.el.xalign = 0f;
1150 // user defined functions
1153 public class Xcls_database_DBTYPE : Object
1155 public Gtk.Entry el;
1156 private Xcls_RooProjectSettings _this;
1162 public Xcls_database_DBTYPE(Xcls_RooProjectSettings _owner )
1165 _this.database_DBTYPE = this;
1166 this.el = new Gtk.Entry();
1170 // set gobject values
1173 this.el.key_press_event.connect( (ev) => {
1175 if (ev.keyval == Gdk.Key.Tab) {
1176 _this.database_DBNAME.el.grab_focus();
1185 // user defined functions
1188 public class Xcls_Label32 : Object
1190 public Gtk.Label el;
1191 private Xcls_RooProjectSettings _this;
1197 public Xcls_Label32(Xcls_RooProjectSettings _owner )
1200 this.el = new Gtk.Label( "Name" );
1204 // set gobject values
1205 this.el.xalign = 0f;
1208 // user defined functions
1211 public class Xcls_database_DBNAME : Object
1213 public Gtk.Entry el;
1214 private Xcls_RooProjectSettings _this;
1220 public Xcls_database_DBNAME(Xcls_RooProjectSettings _owner )
1223 _this.database_DBNAME = this;
1224 this.el = new Gtk.Entry();
1228 // set gobject values
1231 this.el.key_press_event.connect( (ev) => {
1233 if (ev.keyval == Gdk.Key.Tab) {
1234 _this.database_DBUSERNAME.el.grab_focus();
1243 // user defined functions
1246 public class Xcls_Label34 : Object
1248 public Gtk.Label el;
1249 private Xcls_RooProjectSettings _this;
1255 public Xcls_Label34(Xcls_RooProjectSettings _owner )
1258 this.el = new Gtk.Label( "Username" );
1262 // set gobject values
1263 this.el.xalign = 0f;
1266 // user defined functions
1269 public class Xcls_database_DBUSERNAME : Object
1271 public Gtk.Entry el;
1272 private Xcls_RooProjectSettings _this;
1278 public Xcls_database_DBUSERNAME(Xcls_RooProjectSettings _owner )
1281 _this.database_DBUSERNAME = this;
1282 this.el = new Gtk.Entry();
1286 // set gobject values
1289 this.el.key_press_event.connect( (ev) => {
1291 if (ev.keyval == Gdk.Key.Tab) {
1292 _this.database_DBPASSWORD.el.grab_focus();
1301 // user defined functions
1304 public class Xcls_Label36 : Object
1306 public Gtk.Label el;
1307 private Xcls_RooProjectSettings _this;
1313 public Xcls_Label36(Xcls_RooProjectSettings _owner )
1316 this.el = new Gtk.Label( "Password" );
1320 // set gobject values
1321 this.el.xalign = 0f;
1324 // user defined functions
1327 public class Xcls_database_DBPASSWORD : Object
1329 public Gtk.Entry el;
1330 private Xcls_RooProjectSettings _this;
1336 public Xcls_database_DBPASSWORD(Xcls_RooProjectSettings _owner )
1339 _this.database_DBPASSWORD = this;
1340 this.el = new Gtk.Entry();
1344 // set gobject values
1347 // user defined functions
1350 public class Xcls_Button38 : Object
1352 public Gtk.Button el;
1353 private Xcls_RooProjectSettings _this;
1359 public Xcls_Button38(Xcls_RooProjectSettings _owner )
1362 this.el = new Gtk.Button();
1366 // set gobject values
1367 this.el.label = "Check Connection";
1370 this.el.clicked.connect( () => {
1373 _this.database_ERROR.el.label = "";
1376 // assumes localhost...
1377 cnc = Gda.Connection.open_from_string (
1378 _this.database_DBTYPE.el.get_text(),
1379 "DB_NAME=" + _this.database_DBNAME.el.get_text(),
1380 "USERNAME=" + _this.database_DBUSERNAME.el.get_text() +
1381 ";PASSWORD=" + _this.database_DBPASSWORD.el.get_text(),
1382 Gda.ConnectionOptions.NONE
1384 //} catch (Gda.ConnectionError ce) {
1385 // _this.database_ERROR.el.label = ce.message;
1386 } catch(Gda.ConnectionError ue) {
1387 _this.database_ERROR.el.label = ue.message;
1389 } catch(Gda.ConfigError ue) {
1390 _this.database_ERROR.el.label = ue.message;
1393 _this.database_ERROR.el.label = "Connection Succeeded";
1398 // user defined functions
1401 public class Xcls_database_ERROR : Object
1403 public Gtk.Label el;
1404 private Xcls_RooProjectSettings _this;
1410 public Xcls_database_ERROR(Xcls_RooProjectSettings _owner )
1413 _this.database_ERROR = this;
1414 this.el = new Gtk.Label( " " );
1418 // set gobject values
1420 this.el.xalign = 0f;
1423 // user defined functions
1428 public class Xcls_Box40 : Object
1431 private Xcls_RooProjectSettings _this;
1437 public Xcls_Box40(Xcls_RooProjectSettings _owner )
1440 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
1444 // set gobject values
1445 this.el.homogeneous = true;
1446 this.el.expand = false;
1447 this.el.vexpand = false;
1448 var child_0 = new Xcls_Button41( _this );
1450 this.el.add ( child_0.el );
1451 var child_1 = new Xcls_Button42( _this );
1453 this.el.add ( child_1.el );
1456 // user defined functions
1458 public class Xcls_Button41 : Object
1460 public Gtk.Button el;
1461 private Xcls_RooProjectSettings _this;
1467 public Xcls_Button41(Xcls_RooProjectSettings _owner )
1470 this.el = new Gtk.Button();
1474 // set gobject values
1475 this.el.label = "Apply";
1478 this.el.button_press_event.connect( () => {
1481 _this.buttonPressed("apply");
1486 // user defined functions
1489 public class Xcls_Button42 : Object
1491 public Gtk.Button el;
1492 private Xcls_RooProjectSettings _this;
1498 public Xcls_Button42(Xcls_RooProjectSettings _owner )
1501 this.el = new Gtk.Button();
1505 // set gobject values
1506 this.el.label = "Save";
1509 this.el.button_press_event.connect( () => {
1512 _this.buttonPressed("save");
1517 // user defined functions