1 static ValaProjectSettingsPopover _ValaProjectSettingsPopover;
3 public class ValaProjectSettingsPopover : Object
6 private ValaProjectSettingsPopover _this;
8 public static ValaProjectSettingsPopover singleton()
10 if (_ValaProjectSettingsPopover == null) {
11 _ValaProjectSettingsPopover= new ValaProjectSettingsPopover();
13 return _ValaProjectSettingsPopover;
15 public Xcls_notebook notebook;
16 public Xcls_label_global label_global;
17 public Xcls_label_targets label_targets;
18 public Xcls_compile_flags compile_flags;
19 public Xcls_version version;
20 public Xcls_licence licence;
21 public Xcls_vapi_scroll vapi_scroll;
22 public Xcls_vapimodel vapimodel;
23 public Xcls_vapi_filter vapi_filter;
24 public Xcls_vapi_search vapi_search;
25 public Xcls_set_vbox set_vbox;
26 public Xcls_treeview treeview;
27 public Xcls_treeselmodel treeselmodel;
28 public Xcls_treelistsort treelistsort;
29 public Xcls_treelistmodel treelistmodel;
30 public Xcls_treemodel treemodel;
31 public Xcls_name name;
32 public Xcls_target_sel target_sel;
33 public Xcls_target_model target_model;
34 public Xcls_set_vboxb set_vboxb;
35 public Xcls_build_name build_name;
36 public Xcls_build_execute_args build_execute_args;
37 public Xcls_build_as_library build_as_library;
38 public Xcls_save_btn save_btn;
41 public Project.Callback doneObj;
42 public bool cg_loading;
43 public Xcls_MainWindow window;
44 public Project.GtkValaSettings? selected_target;
46 public Project.Gtk project;
47 public uint border_width;
50 public ValaProjectSettingsPopover()
53 this.el = new Gtk.Window();
57 this.cg_loading = false;
59 this.selected_target = null;
62 this.border_width = 0;
66 var child_1 = new Xcls_HeaderBar1( _this );
68 this.el.titlebar = child_1.el;
69 var child_2 = new Xcls_Box3( _this );
71 this.el.set_child ( child_2.el );
74 this.el.close_request.connect( ( ) => {
81 this.el.hide.connect( () => {
88 // user defined functions
89 public void show (Gtk.Window pwin, Project.Gtk project, Project.Callback? doneObj) {
91 //print("ValaProjectSettings show\n");
92 this.doneObj = doneObj;
93 this.project= project;
95 this.compile_flags.el.buffer.set_text(
96 project.compile_flags.data
98 this.version.el.buffer.set_text(
101 this.licence.el.buffer.set_text(
104 project.loadVapiIntoStore(_this.vapimodel.el);
105 GLib.Timeout.add(500, () => {
106 this.vapi_scroll.el.vadjustment.value = 0;
112 project.loadTargetsIntoStore(this.target_model.el);
114 _this.target_sel.el.selected = Gtk.INVALID_LIST_POSITION;
115 _this.target_sel.selectTarget(null);
116 // Gtk.Allocation rect;
117 //btn.get_allocation(out rect);
118 // this.el.set_pointing_to(rect);
119 this.el.application = pwin.application; // ??? make it modal?
120 this.el.set_transient_for(pwin);
123 // print("SHOWALL - POPIP\n");
124 this.el.set_size_request(800,800);
126 this.notebook.el.page = 0; // first page.
128 //this.view.el.grab_focus();
131 public void save () {
134 public class Xcls_HeaderBar1 : Object
136 public Gtk.HeaderBar el;
137 private ValaProjectSettingsPopover _this;
143 public Xcls_HeaderBar1(ValaProjectSettingsPopover _owner )
146 this.el = new Gtk.HeaderBar();
150 // set gobject values
151 var child_1 = new Xcls_Label2( _this );
153 this.el.title_widget = child_1.el;
156 // user defined functions
158 public class Xcls_Label2 : Object
161 private ValaProjectSettingsPopover _this;
167 public Xcls_Label2(ValaProjectSettingsPopover _owner )
170 this.el = new Gtk.Label( "Change Vala Compile settings" );
174 // set gobject values
177 // user defined functions
181 public class Xcls_Box3 : Object
184 private ValaProjectSettingsPopover _this;
190 public Xcls_Box3(ValaProjectSettingsPopover _owner )
193 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
197 // set gobject values
198 this.el.hexpand = true;
199 this.el.vexpand = true;
200 new Xcls_notebook( _this );
201 this.el.append( _this.notebook.el );
202 var child_2 = new Xcls_Box57( _this );
204 this.el.append( child_2.el );
207 // user defined functions
209 public class Xcls_notebook : Object
211 public Gtk.Notebook el;
212 private ValaProjectSettingsPopover _this;
218 public Xcls_notebook(ValaProjectSettingsPopover _owner )
221 _this.notebook = this;
222 this.el = new Gtk.Notebook();
226 // set gobject values
227 this.el.vexpand = true;
228 new Xcls_label_global( _this );
229 new Xcls_label_targets( _this );
230 var child_3 = new Xcls_Box7( _this );
232 this.el.append_page ( child_3.el , _this.label_global.el );
233 var child_4 = new Xcls_Paned25( _this );
235 this.el.append_page ( child_4.el , _this.label_targets.el );
238 // user defined functions
240 public class Xcls_label_global : Object
243 private ValaProjectSettingsPopover _this;
249 public Xcls_label_global(ValaProjectSettingsPopover _owner )
252 _this.label_global = this;
253 this.el = new Gtk.Label( "Global" );
257 // set gobject values
260 // user defined functions
263 public class Xcls_label_targets : Object
266 private ValaProjectSettingsPopover _this;
272 public Xcls_label_targets(ValaProjectSettingsPopover _owner )
275 _this.label_targets = this;
276 this.el = new Gtk.Label( "Targets" );
280 // set gobject values
283 // user defined functions
286 public class Xcls_Box7 : Object
289 private ValaProjectSettingsPopover _this;
295 public Xcls_Box7(ValaProjectSettingsPopover _owner )
298 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
302 // set gobject values
303 this.el.homogeneous = false;
304 var child_1 = new Xcls_Box834( _this );
306 this.el.append( child_1.el );
307 new Xcls_vapi_scroll( _this );
308 this.el.append( _this.vapi_scroll.el );
309 new Xcls_vapi_search( _this );
310 this.el.append( _this.vapi_search.el );
313 // user defined functions
315 public class Xcls_Box834 : Object
318 private ValaProjectSettingsPopover _this;
324 public Xcls_Box834(ValaProjectSettingsPopover _owner )
327 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 10 );
331 // set gobject values
332 var child_1 = new Xcls_Label853( _this );
334 this.el.append( child_1.el );
335 new Xcls_compile_flags( _this );
336 this.el.append( _this.compile_flags.el );
337 var child_3 = new Xcls_Label886( _this );
339 this.el.append( child_3.el );
340 new Xcls_version( _this );
341 this.el.append( _this.version.el );
342 var child_5 = new Xcls_Label906( _this );
344 this.el.append( child_5.el );
345 new Xcls_licence( _this );
346 this.el.append( _this.licence.el );
349 // user defined functions
351 public class Xcls_Label853 : Object
354 private ValaProjectSettingsPopover _this;
360 public Xcls_Label853(ValaProjectSettingsPopover _owner )
363 this.el = new Gtk.Label( "Compile flags:" );
367 // set gobject values
368 this.el.halign = Gtk.Align.START;
369 this.el.hexpand = false;
372 // user defined functions
375 public class Xcls_compile_flags : Object
378 private ValaProjectSettingsPopover _this;
384 public Xcls_compile_flags(ValaProjectSettingsPopover _owner )
387 _this.compile_flags = this;
388 this.el = new Gtk.Entry();
392 // set gobject values
393 this.el.placeholder_text = "eg. -g --valasrc $BASEDIR ";
396 this.el.changed.connect( () => {
398 _this.project.compile_flags = this.el.buffer.text;
399 _this.project.save();
400 // _this.project.save();
405 // user defined functions
408 public class Xcls_Label886 : Object
411 private ValaProjectSettingsPopover _this;
417 public Xcls_Label886(ValaProjectSettingsPopover _owner )
420 this.el = new Gtk.Label( "Version:" );
424 // set gobject values
425 this.el.halign = Gtk.Align.START;
426 this.el.hexpand = false;
429 // user defined functions
432 public class Xcls_version : Object
435 private ValaProjectSettingsPopover _this;
441 public Xcls_version(ValaProjectSettingsPopover _owner )
444 _this.version = this;
445 this.el = new Gtk.Entry();
449 // set gobject values
450 this.el.placeholder_text = "eg. 1.5";
453 this.el.changed.connect( () => {
455 _this.project.version = this.el.buffer.text;
456 _this.project.save();
457 // _this.project.save();
462 // user defined functions
465 public class Xcls_Label906 : Object
468 private ValaProjectSettingsPopover _this;
474 public Xcls_Label906(ValaProjectSettingsPopover _owner )
477 this.el = new Gtk.Label( "Licence:" );
481 // set gobject values
482 this.el.halign = Gtk.Align.START;
483 this.el.hexpand = false;
486 // user defined functions
489 public class Xcls_licence : Object
492 private ValaProjectSettingsPopover _this;
498 public Xcls_licence(ValaProjectSettingsPopover _owner )
501 _this.licence = this;
502 this.el = new Gtk.Entry();
506 // set gobject values
507 this.el.placeholder_text = "eg. LGPL";
510 this.el.changed.connect( () => {
512 _this.project.licence = this.el.buffer.text;
513 _this.project.save();
514 // _this.project.save();
519 // user defined functions
523 public class Xcls_vapi_scroll : Object
525 public Gtk.ScrolledWindow el;
526 private ValaProjectSettingsPopover _this;
532 public Xcls_vapi_scroll(ValaProjectSettingsPopover _owner )
535 _this.vapi_scroll = this;
536 this.el = new Gtk.ScrolledWindow();
540 // set gobject values
541 this.el.vscrollbar_policy = Gtk.PolicyType.AUTOMATIC;
542 this.el.has_frame = true;
543 this.el.hexpand = true;
544 this.el.vexpand = true;
545 this.el.hscrollbar_policy = Gtk.PolicyType.AUTOMATIC;
546 var child_1 = new Xcls_ColumnView11( _this );
548 this.el.child = child_1.el;
551 // user defined functions
553 public class Xcls_ColumnView11 : Object
555 public Gtk.ColumnView el;
556 private ValaProjectSettingsPopover _this;
562 public Xcls_ColumnView11(ValaProjectSettingsPopover _owner )
565 var child_1 = new Xcls_NoSelection12( _this );
567 this.el = new Gtk.ColumnView( child_1.el );
571 // set gobject values
572 var child_2 = new Xcls_ColumnViewColumn20( _this );
574 this.el.append_column ( child_2.el );
575 var child_3 = new Xcls_ColumnViewColumn22( _this );
577 this.el.append_column ( child_3.el );
580 // user defined functions
582 public class Xcls_NoSelection12 : Object
584 public Gtk.NoSelection el;
585 private ValaProjectSettingsPopover _this;
591 public Xcls_NoSelection12(ValaProjectSettingsPopover _owner )
594 var child_1 = new Xcls_FilterListModel13( _this );
596 this.el = new Gtk.NoSelection( child_1.el );
600 // set gobject values
603 // user defined functions
605 public class Xcls_FilterListModel13 : Object
607 public Gtk.FilterListModel el;
608 private ValaProjectSettingsPopover _this;
614 public Xcls_FilterListModel13(ValaProjectSettingsPopover _owner )
617 var child_1 = new Xcls_SortListModel14( _this );
619 new Xcls_vapi_filter( _this );
620 this.el = new Gtk.FilterListModel( child_1.el, _this.vapi_filter.el );
624 // set gobject values
627 // user defined functions
629 public class Xcls_SortListModel14 : Object
631 public Gtk.SortListModel el;
632 private ValaProjectSettingsPopover _this;
638 public Xcls_SortListModel14(ValaProjectSettingsPopover _owner )
641 new Xcls_vapimodel( _this );
642 var child_2 = new Xcls_StringSorter16( _this );
644 this.el = new Gtk.SortListModel( _this.vapimodel.el, child_2.el );
648 // set gobject values
651 // user defined functions
653 public class Xcls_vapimodel : Object
655 public GLib.ListStore el;
656 private ValaProjectSettingsPopover _this;
662 public Xcls_vapimodel(ValaProjectSettingsPopover _owner )
665 _this.vapimodel = this;
666 this.el = new GLib.ListStore( typeof(Project.VapiSelection) );
670 // set gobject values
673 // user defined functions
676 public class Xcls_StringSorter16 : Object
678 public Gtk.StringSorter el;
679 private ValaProjectSettingsPopover _this;
685 public Xcls_StringSorter16(ValaProjectSettingsPopover _owner )
688 var child_1 = new Xcls_PropertyExpression17( _this );
690 this.el = new Gtk.StringSorter( child_1.el );
694 // set gobject values
697 // user defined functions
699 public class Xcls_PropertyExpression17 : Object
701 public Gtk.PropertyExpression el;
702 private ValaProjectSettingsPopover _this;
708 public Xcls_PropertyExpression17(ValaProjectSettingsPopover _owner )
711 this.el = new Gtk.PropertyExpression( typeof(Project.VapiSelection), null, "sortkey" );
715 // set gobject values
718 // user defined functions
723 public class Xcls_vapi_filter : Object
725 public Gtk.StringFilter el;
726 private ValaProjectSettingsPopover _this;
732 public Xcls_vapi_filter(ValaProjectSettingsPopover _owner )
735 _this.vapi_filter = this;
736 var child_1 = new Xcls_PropertyExpression19( _this );
738 this.el = new Gtk.StringFilter( child_1.el );
742 // set gobject values
745 // user defined functions
747 public class Xcls_PropertyExpression19 : Object
749 public Gtk.PropertyExpression el;
750 private ValaProjectSettingsPopover _this;
756 public Xcls_PropertyExpression19(ValaProjectSettingsPopover _owner )
759 this.el = new Gtk.PropertyExpression( typeof(Project.VapiSelection), null, "sortkey" );
763 // set gobject values
766 // user defined functions
772 public class Xcls_ColumnViewColumn20 : Object
774 public Gtk.ColumnViewColumn el;
775 private ValaProjectSettingsPopover _this;
781 public Xcls_ColumnViewColumn20(ValaProjectSettingsPopover _owner )
784 var child_1 = new Xcls_SignalListItemFactory21( _this );
786 this.el = new Gtk.ColumnViewColumn( "Vapi Package", child_1.el );
790 // set gobject values
791 this.el.expand = true;
794 // user defined functions
796 public class Xcls_SignalListItemFactory21 : Object
798 public Gtk.SignalListItemFactory el;
799 private ValaProjectSettingsPopover _this;
805 public Xcls_SignalListItemFactory21(ValaProjectSettingsPopover _owner )
808 this.el = new Gtk.SignalListItemFactory();
812 // set gobject values
815 this.el.setup.connect( (item) => {
816 //var j = (JsRender.JsRender) item;
817 var gi = (Gtk.ListItem)item;
819 var lbl = new Gtk.Label("");
820 lbl.halign = Gtk.Align.START;
826 this.el.bind.connect( (listitem) => {
828 var lbl = (Gtk.Label) ((Gtk.ListItem)listitem).get_child();
830 var item = (Project.VapiSelection) ((Gtk.ListItem)listitem).get_item();
832 item.bind_property("name",
834 GLib.BindingFlags.SYNC_CREATE);
840 // user defined functions
844 public class Xcls_ColumnViewColumn22 : Object
846 public Gtk.ColumnViewColumn el;
847 private ValaProjectSettingsPopover _this;
853 public Xcls_ColumnViewColumn22(ValaProjectSettingsPopover _owner )
856 var child_1 = new Xcls_SignalListItemFactory23( _this );
858 this.el = new Gtk.ColumnViewColumn( "use", child_1.el );
862 // set gobject values
865 // user defined functions
867 public class Xcls_SignalListItemFactory23 : Object
869 public Gtk.SignalListItemFactory el;
870 private ValaProjectSettingsPopover _this;
876 public Xcls_SignalListItemFactory23(ValaProjectSettingsPopover _owner )
879 this.el = new Gtk.SignalListItemFactory();
883 // set gobject values
886 this.el.setup.connect( (listitem) => {
888 var btn = new Gtk.CheckButton();
890 ((Gtk.ListItem)listitem).set_child(btn);
892 btn.toggled.connect(() => {
894 var jr = (Project.VapiSelection) ((Gtk.ListItem)listitem).get_item();
895 jr.selected = btn.active;
898 this.el.bind.connect( (listitem) => {
899 //GLib.debug("listitme is is %s", ((Gtk.ListItem)listitem).get_type().name());
903 //var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();
904 var btn = (Gtk.CheckButton) ((Gtk.ListItem)listitem).get_child();
907 var vs = (Project.VapiSelection)((Gtk.ListItem)listitem).get_item();
909 //GLib.debug("change %s to %s", lbl.label, np.name);
911 btn.active = vs.selected;
919 // user defined functions
925 public class Xcls_vapi_search : Object
927 public Gtk.SearchEntry el;
928 private ValaProjectSettingsPopover _this;
934 public Xcls_vapi_search(ValaProjectSettingsPopover _owner )
937 _this.vapi_search = this;
938 this.el = new Gtk.SearchEntry();
942 // set gobject values
943 this.el.placeholder_text = "Search Libraries (Vapi)";
944 this.el.search_delay = 500;
947 this.el.search_changed.connect( ( ) => {
949 _this.vapi_filter.el.set_search(this.el.get_text());
954 // user defined functions
958 public class Xcls_Paned25 : Object
961 private ValaProjectSettingsPopover _this;
967 public Xcls_Paned25(ValaProjectSettingsPopover _owner )
970 this.el = new Gtk.Paned( Gtk.Orientation.HORIZONTAL );
974 // set gobject values
975 this.el.vexpand = true;
976 this.el.position = 300;
977 new Xcls_set_vbox( _this );
978 this.el.set_end_child ( _this.set_vbox.el );
979 var child_2 = new Xcls_Box42( _this );
981 this.el.start_child = child_2.el;
984 // user defined functions
986 public class Xcls_set_vbox : Object
989 private ValaProjectSettingsPopover _this;
995 public Xcls_set_vbox(ValaProjectSettingsPopover _owner )
998 _this.set_vbox = this;
999 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
1003 // set gobject values
1004 this.el.homogeneous = false;
1005 var child_1 = new Xcls_ScrolledWindow27( _this );
1007 this.el.append( child_1.el );
1010 // user defined functions
1012 public class Xcls_ScrolledWindow27 : Object
1014 public Gtk.ScrolledWindow el;
1015 private ValaProjectSettingsPopover _this;
1021 public Xcls_ScrolledWindow27(ValaProjectSettingsPopover _owner )
1024 this.el = new Gtk.ScrolledWindow();
1028 // set gobject values
1029 this.el.vexpand = true;
1030 new Xcls_treeview( _this );
1031 this.el.child = _this.treeview.el;
1034 // user defined functions
1036 public class Xcls_treeview : Object
1038 public Gtk.ColumnView el;
1039 private ValaProjectSettingsPopover _this;
1045 public Xcls_treeview(ValaProjectSettingsPopover _owner )
1048 _this.treeview = this;
1049 new Xcls_treeselmodel( _this );
1050 this.el = new Gtk.ColumnView( _this.treeselmodel.el );
1054 // set gobject values
1055 new Xcls_name( _this );
1056 this.el.append_column ( _this.name.el );
1057 var child_3 = new Xcls_ColumnViewColumn40( _this );
1059 this.el.append_column ( child_3.el );
1062 // user defined functions
1064 public class Xcls_treeselmodel : Object
1066 public Gtk.SingleSelection el;
1067 private ValaProjectSettingsPopover _this;
1073 public Xcls_treeselmodel(ValaProjectSettingsPopover _owner )
1076 _this.treeselmodel = this;
1077 var child_1 = new Xcls_FilterListModel30( _this );
1079 this.el = new Gtk.SingleSelection( child_1.el );
1083 // set gobject values
1086 // user defined functions
1088 public class Xcls_FilterListModel30 : Object
1090 public Gtk.FilterListModel el;
1091 private ValaProjectSettingsPopover _this;
1097 public Xcls_FilterListModel30(ValaProjectSettingsPopover _owner )
1100 new Xcls_treelistsort( _this );
1101 var child_2 = new Xcls_CustomFilter37( _this );
1103 this.el = new Gtk.FilterListModel( _this.treelistsort.el, child_2.el );
1107 // set gobject values
1110 // user defined functions
1112 public class Xcls_treelistsort : Object
1114 public Gtk.SortListModel el;
1115 private ValaProjectSettingsPopover _this;
1121 public Xcls_treelistsort(ValaProjectSettingsPopover _owner )
1124 _this.treelistsort = this;
1125 new Xcls_treelistmodel( _this );
1126 var child_2 = new Xcls_TreeListRowSorter34( _this );
1128 this.el = new Gtk.SortListModel( _this.treelistmodel.el, child_2.el );
1132 // set gobject values
1137 //this.el.set_sorter(new Gtk.TreeListRowSorter(_this.treeview.el.sorter));
1141 // user defined functions
1143 public class Xcls_treelistmodel : Object
1145 public Gtk.TreeListModel el;
1146 private ValaProjectSettingsPopover _this;
1152 public Xcls_treelistmodel(ValaProjectSettingsPopover _owner )
1155 _this.treelistmodel = this;
1156 new Xcls_treemodel( _this );
1157 this.el = new Gtk.TreeListModel( _this.treemodel.el, false, true, (item) => {
1158 //GLib.debug("liststore got %s", item.get_type().name());
1159 return ((JsRender.JsRender)item).childfiles;
1164 // set gobject values
1167 // user defined functions
1169 public class Xcls_treemodel : Object
1171 public GLib.ListStore el;
1172 private ValaProjectSettingsPopover _this;
1178 public Xcls_treemodel(ValaProjectSettingsPopover _owner )
1181 _this.treemodel = this;
1182 this.el = new GLib.ListStore( typeof(JsRender.JsRender) );
1186 // set gobject values
1189 // user defined functions
1193 public class Xcls_TreeListRowSorter34 : Object
1195 public Gtk.TreeListRowSorter el;
1196 private ValaProjectSettingsPopover _this;
1202 public Xcls_TreeListRowSorter34(ValaProjectSettingsPopover _owner )
1205 var child_1 = new Xcls_StringSorter35( _this );
1207 this.el = new Gtk.TreeListRowSorter( child_1.el );
1211 // set gobject values
1214 // user defined functions
1216 public class Xcls_StringSorter35 : Object
1218 public Gtk.StringSorter el;
1219 private ValaProjectSettingsPopover _this;
1225 public Xcls_StringSorter35(ValaProjectSettingsPopover _owner )
1228 var child_1 = new Xcls_PropertyExpression36( _this );
1230 this.el = new Gtk.StringSorter( child_1.el );
1234 // set gobject values
1237 // user defined functions
1239 public class Xcls_PropertyExpression36 : Object
1241 public Gtk.PropertyExpression el;
1242 private ValaProjectSettingsPopover _this;
1248 public Xcls_PropertyExpression36(ValaProjectSettingsPopover _owner )
1251 this.el = new Gtk.PropertyExpression( typeof(JsRender.JsRender), null, "name" );
1255 // set gobject values
1258 // user defined functions
1264 public class Xcls_CustomFilter37 : Object
1266 public Gtk.CustomFilter el;
1267 private ValaProjectSettingsPopover _this;
1273 public Xcls_CustomFilter37(ValaProjectSettingsPopover _owner )
1276 this.el = new Gtk.CustomFilter( (item) => {
1278 var tr = ((Gtk.TreeListRow)item).get_item();
1279 //GLib.debug("filter %s", tr.get_type().name());
1280 var j = (JsRender.JsRender) tr;
1281 if (j.xtype == "Gtk") {
1284 if (j.xtype != "Dir") {
1285 return j.path.has_suffix(".vala") || j.path.has_suffix(".c");
1289 for (var i =0 ; i < j.childfiles.n_items; i++) {
1290 var f = (JsRender.JsRender) j.childfiles.get_item(i);
1291 if (f.xtype == "Gtk") {
1294 if (f.path.has_suffix(".vala") || f.path.has_suffix(".c")) {
1304 // set gobject values
1307 // user defined functions
1312 public class Xcls_name : Object
1314 public Gtk.ColumnViewColumn el;
1315 private ValaProjectSettingsPopover _this;
1321 public Xcls_name(ValaProjectSettingsPopover _owner )
1325 var child_1 = new Xcls_SignalListItemFactory39( _this );
1327 this.el = new Gtk.ColumnViewColumn( "Other Files", child_1.el );
1331 // set gobject values
1332 this.el.id = "name";
1333 this.el.expand = true;
1334 this.el.resizable = true;
1339 this.el.set_sorter( new Gtk.StringSorter(
1340 new Gtk.PropertyExpression(typeof(JsRender.JsRender), null, "name")
1347 // user defined functions
1349 public class Xcls_SignalListItemFactory39 : Object
1351 public Gtk.SignalListItemFactory el;
1352 private ValaProjectSettingsPopover _this;
1358 public Xcls_SignalListItemFactory39(ValaProjectSettingsPopover _owner )
1361 this.el = new Gtk.SignalListItemFactory();
1365 // set gobject values
1368 this.el.setup.connect( (listitem) => {
1370 var expand = new Gtk.TreeExpander();
1372 expand.set_indent_for_depth(true);
1373 expand.set_indent_for_icon(true);
1375 var lbl = new Gtk.Label("");
1376 lbl.use_markup = true;
1379 lbl.justify = Gtk.Justification.LEFT;
1383 expand.set_child(lbl);
1384 ((Gtk.ListItem)listitem).set_child(expand);
1385 ((Gtk.ListItem)listitem).activatable = false;
1387 this.el.bind.connect( (listitem) => {
1388 //GLib.debug("listitme is is %s", ((Gtk.ListItem)listitem).get_type().name());
1392 //var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();
1393 var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();
1396 var lbl = (Gtk.Label) expand.child;
1398 if (lbl.label != "") { // do not update
1403 var lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item();
1404 var jr = (JsRender.JsRender) lr.get_item();
1405 //GLib.debug("change %s to %s", lbl.label, np.name);
1406 lbl.label = jr.name; // for dir's we could hsow the sub path..
1407 lbl.tooltip_markup = jr.path;
1409 expand.set_hide_expander( jr.childfiles.n_items < 1);
1410 expand.set_list_row(lr);
1412 expand.set_hide_expander( jr.xtype != "Dir" );
1413 expand.set_list_row(lr);
1420 // user defined functions
1424 public class Xcls_ColumnViewColumn40 : Object
1426 public Gtk.ColumnViewColumn el;
1427 private ValaProjectSettingsPopover _this;
1433 public Xcls_ColumnViewColumn40(ValaProjectSettingsPopover _owner )
1436 var child_1 = new Xcls_SignalListItemFactory41( _this );
1438 this.el = new Gtk.ColumnViewColumn( "use", child_1.el );
1442 // set gobject values
1445 // user defined functions
1447 public class Xcls_SignalListItemFactory41 : Object
1449 public Gtk.SignalListItemFactory el;
1450 private ValaProjectSettingsPopover _this;
1456 public Xcls_SignalListItemFactory41(ValaProjectSettingsPopover _owner )
1459 this.el = new Gtk.SignalListItemFactory();
1463 // set gobject values
1466 this.el.setup.connect( (listitem) => {
1468 var btn = new Gtk.CheckButton();
1470 ((Gtk.ListItem)listitem).set_child(btn);
1472 btn.toggled.connect(() => {
1473 if (_this.cg_loading) {
1476 var lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item();
1477 var jr = (JsRender.JsRender) lr.get_item();
1478 jr.compile_group_selected = btn.active;
1483 this.el.bind.connect( (listitem) => {
1484 //GLib.debug("listitme is is %s", ((Gtk.ListItem)listitem).get_type().name());
1488 //var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();
1489 var btn = (Gtk.CheckButton) ((Gtk.ListItem)listitem).get_child();
1492 var lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item();
1493 var jr = (JsRender.JsRender) lr.get_item();
1494 //GLib.debug("change %s to %s", lbl.label, np.name);
1496 //btn.active = jr.compile_group_selected;
1497 btn.active = _this.selected_target.has_file(jr);
1499 //jr.bind_property("compile_group_selected",
1501 // GLib.BindingFlags.BIDIRECTIONAL);
1507 // user defined functions
1514 public class Xcls_Box42 : Object
1517 private ValaProjectSettingsPopover _this;
1523 public Xcls_Box42(ValaProjectSettingsPopover _owner )
1526 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
1530 // set gobject values
1531 var child_1 = new Xcls_Box43( _this );
1533 this.el.append( child_1.el );
1534 var child_2 = new Xcls_ScrolledWindow46( _this );
1536 this.el.append( child_2.el );
1537 new Xcls_set_vboxb( _this );
1538 this.el.append( _this.set_vboxb.el );
1541 // user defined functions
1543 public class Xcls_Box43 : Object
1546 private ValaProjectSettingsPopover _this;
1552 public Xcls_Box43(ValaProjectSettingsPopover _owner )
1555 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
1559 // set gobject values
1560 this.el.hexpand = true;
1561 var child_1 = new Xcls_Button44( _this );
1563 this.el.append( child_1.el );
1564 var child_2 = new Xcls_Button45( _this );
1566 this.el.append( child_2.el );
1569 // user defined functions
1571 public class Xcls_Button44 : Object
1573 public Gtk.Button el;
1574 private ValaProjectSettingsPopover _this;
1580 public Xcls_Button44(ValaProjectSettingsPopover _owner )
1583 this.el = new Gtk.Button();
1587 // set gobject values
1588 this.el.hexpand = true;
1589 this.el.label = "Add Compile Target";
1592 this.el.clicked.connect( () => {
1594 if (_this.project.compilegroups.has_key("NEW GROUP")) {
1597 var cg = new Project.GtkValaSettings(_this.project, "NEW GROUP");
1598 _this.project.compilegroups.set(cg.name, cg);
1599 _this.project.loadTargetsIntoStore(_this.target_model.el);
1600 // select it.. ?? should load it??
1601 for(var i =0;i < _this.target_model.el.n_items; i++) {
1602 var ncg = (Project.GtkValaSettings) _this.target_model.el.get_item(i);
1603 if (ncg.name == cg.name) {
1604 _this.target_sel.el.selected = i;
1605 _this.target_sel.selectTarget(cg);
1615 // user defined functions
1618 public class Xcls_Button45 : Object
1620 public Gtk.Button el;
1621 private ValaProjectSettingsPopover _this;
1627 public Xcls_Button45(ValaProjectSettingsPopover _owner )
1630 this.el = new Gtk.Button();
1634 // set gobject values
1635 this.el.hexpand = true;
1636 this.el.label = "Remove Target";
1639 this.el.clicked.connect( () => {
1640 // load the new values.
1641 if (_this.target_sel.el.selected == Gtk.INVALID_LIST_POSITION) {
1642 GLib.debug("nothing selected");
1647 // add the directory..
1648 var cg = (Project.GtkValaSettings) _this.target_model.el.get_item(_this.target_sel.el.selected);
1651 GLib.debug("remove: %s\n", cg.name);
1652 if (!_this.project.compilegroups.unset(cg.name)) {
1653 GLib.debug("remove failed");
1655 _this.project.loadTargetsIntoStore(_this.target_model.el);
1659 // user defined functions
1663 public class Xcls_ScrolledWindow46 : Object
1665 public Gtk.ScrolledWindow el;
1666 private ValaProjectSettingsPopover _this;
1672 public Xcls_ScrolledWindow46(ValaProjectSettingsPopover _owner )
1675 this.el = new Gtk.ScrolledWindow();
1679 // set gobject values
1680 this.el.vexpand = true;
1681 var child_1 = new Xcls_ColumnView47( _this );
1683 this.el.child = child_1.el;
1688 this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
1693 // user defined functions
1695 public class Xcls_ColumnView47 : Object
1697 public Gtk.ColumnView el;
1698 private ValaProjectSettingsPopover _this;
1704 public Xcls_ColumnView47(ValaProjectSettingsPopover _owner )
1707 new Xcls_target_sel( _this );
1708 this.el = new Gtk.ColumnView( _this.target_sel.el );
1712 // set gobject values
1713 var child_2 = new Xcls_ColumnViewColumn50( _this );
1715 this.el.append_column ( child_2.el );
1718 // user defined functions
1720 public class Xcls_target_sel : Object
1722 public Gtk.SingleSelection el;
1723 private ValaProjectSettingsPopover _this;
1729 public Xcls_target_sel(ValaProjectSettingsPopover _owner )
1732 _this.target_sel = this;
1733 new Xcls_target_model( _this );
1734 this.el = new Gtk.SingleSelection( _this.target_model.el );
1738 // set gobject values
1741 this.el.selection_changed.connect( (position, n_items) => {
1744 // load the new values.
1745 if (this.el.selected == Gtk.INVALID_LIST_POSITION) {
1746 this.selectTarget(null);
1749 this.selectTarget(null);
1753 // add the directory..
1754 var cg = (Project.GtkValaSettings) _this.target_model.el.get_item(this.el.selected);
1756 this.selectTarget(cg);
1761 // user defined functions
1762 public void selectTarget (Project.GtkValaSettings? cg) {
1763 // load the new values
1764 _this.selected_target = cg;
1765 _this.project.active_cg = cg;
1770 _this.set_vbox.el.hide();
1771 _this.set_vboxb.el.hide();
1776 _this.set_vbox.el.show();
1777 _this.set_vboxb.el.show();
1778 // add the directory..
1781 GLib.debug("loading dirs into project list");
1782 cg.loading_ui = true;
1783 _this.cg_loading = true;
1785 _this.treeview.el.set_model(new Gtk.SingleSelection(null));
1786 _this.project.loadDirsIntoStore(_this.treemodel.el);
1787 _this.treeview.el.set_model(_this.treeselmodel.el);
1789 cg.loading_ui = false;
1791 _this.cg_loading = false;
1792 GLib.debug("Set name to %s", cg.name);
1794 _this.build_name.el.buffer.set_text(cg.name.data);
1795 _this.build_as_library.el.active = cg.is_library;
1797 _this.build_execute_args.el.buffer.set_text( cg.execute_args.data );
1801 public class Xcls_target_model : Object
1803 public GLib.ListStore el;
1804 private ValaProjectSettingsPopover _this;
1810 public Xcls_target_model(ValaProjectSettingsPopover _owner )
1813 _this.target_model = this;
1814 this.el = new GLib.ListStore( typeof(Project.GtkValaSettings) );
1818 // set gobject values
1821 // user defined functions
1825 public class Xcls_ColumnViewColumn50 : Object
1827 public Gtk.ColumnViewColumn el;
1828 private ValaProjectSettingsPopover _this;
1834 public Xcls_ColumnViewColumn50(ValaProjectSettingsPopover _owner )
1837 var child_1 = new Xcls_SignalListItemFactory51( _this );
1839 this.el = new Gtk.ColumnViewColumn( "Build Target", child_1.el );
1843 // set gobject values
1844 this.el.expand = true;
1847 // user defined functions
1849 public class Xcls_SignalListItemFactory51 : Object
1851 public Gtk.SignalListItemFactory el;
1852 private ValaProjectSettingsPopover _this;
1858 public Xcls_SignalListItemFactory51(ValaProjectSettingsPopover _owner )
1861 this.el = new Gtk.SignalListItemFactory();
1865 // set gobject values
1868 this.el.setup.connect( (item) => {
1869 //var j = (JsRender.JsRender) item;
1870 var gi = (Gtk.ListItem)item;
1872 var lbl = new Gtk.Label("");
1873 lbl.halign = Gtk.Align.START;
1879 this.el.bind.connect( (listitem) => {
1881 var lbl = (Gtk.Label) ((Gtk.ListItem)listitem).get_child();
1883 var item = (Project.GtkValaSettings) ((Gtk.ListItem)listitem).get_item();
1885 item.bind_property("name",
1887 GLib.BindingFlags.SYNC_CREATE);
1893 // user defined functions
1899 public class Xcls_set_vboxb : Object
1902 private ValaProjectSettingsPopover _this;
1908 public Xcls_set_vboxb(ValaProjectSettingsPopover _owner )
1911 _this.set_vboxb = this;
1912 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
1916 // set gobject values
1917 var child_1 = new Xcls_Label53( _this );
1919 this.el.append( child_1.el );
1920 new Xcls_build_name( _this );
1921 this.el.append( _this.build_name.el );
1922 var child_3 = new Xcls_Label55( _this );
1924 this.el.append( child_3.el );
1925 new Xcls_build_execute_args( _this );
1926 this.el.append( _this.build_execute_args.el );
1927 new Xcls_build_as_library( _this );
1928 this.el.append( _this.build_as_library.el );
1931 // user defined functions
1933 public class Xcls_Label53 : Object
1935 public Gtk.Label el;
1936 private ValaProjectSettingsPopover _this;
1942 public Xcls_Label53(ValaProjectSettingsPopover _owner )
1945 this.el = new Gtk.Label( "Build Name (executable name)" );
1949 // set gobject values
1952 // user defined functions
1955 public class Xcls_build_name : Object
1957 public Gtk.Entry el;
1958 private ValaProjectSettingsPopover _this;
1962 public bool in_insert;
1965 public Xcls_build_name(ValaProjectSettingsPopover _owner )
1968 _this.build_name = this;
1969 this.el = new Gtk.Entry();
1972 this.in_insert = false;
1974 // set gobject values
1978 var ed = (this.el.get_delegate() as Gtk.Editable);
1980 ed.insert_text.connect((text, length, ref position) => {
1981 if (this.in_insert) {
1984 GLib.debug("got insert text %s", text);
1987 for(var i = 0;i < text.length; i++){
1988 if (Posix.isupper(text[i]) ||Posix.islower(text[i]) ) {
1989 nt += text[i].to_string();
1992 if (nt.length < 1) {
1993 GLib.Signal.stop_emission_by_name(ed, "insert_text");
1997 this.in_insert = true;
1999 this.el.insert_text(nt,nt.length, ref position);
2000 this.in_insert = false;
2001 GLib.Signal.stop_emission_by_name(ed, "insert_text");
2007 this.el.insert_text.connect( (text, length, ref position) => {
2008 if (this.in_insert) {
2011 GLib.debug("got insert text %s", text);
2014 for(var i = 0;i < text.length; i++){
2015 if (Posix.isalpha(text[i])) {
2016 nt += text[i].to_string();
2019 if (nt.length < 1) {
2023 this.in_insert = true;
2025 this.el.insert_text(text,length, ref position);
2026 this.in_insert = false;
2028 this.el.changed.connect( () => {
2029 if (_this.selected_target == null) {
2032 var name = this.el.text;
2033 // name ischanging.. probably always..
2034 if (_this.selected_target.name != name) {
2035 _this.project.compilegroups.unset(_this.selected_target.name);
2036 _this.project.compilegroups.set(name, _this.selected_target);
2039 _this.selected_target.name = this.el.buffer.text;
2043 // user defined functions
2046 public class Xcls_Label55 : Object
2048 public Gtk.Label el;
2049 private ValaProjectSettingsPopover _this;
2055 public Xcls_Label55(ValaProjectSettingsPopover _owner )
2058 this.el = new Gtk.Label( "test argments - when run after a build" );
2062 // set gobject values
2065 // user defined functions
2068 public class Xcls_build_execute_args : Object
2070 public Gtk.Entry el;
2071 private ValaProjectSettingsPopover _this;
2077 public Xcls_build_execute_args(ValaProjectSettingsPopover _owner )
2080 _this.build_execute_args = this;
2081 this.el = new Gtk.Entry();
2085 // set gobject values
2086 this.el.placeholder_text = "eg. -f somefile -g ";
2089 this.el.changed.connect( () => {
2090 if (_this.selected_target == null) {
2093 _this.selected_target.execute_args = this.el.buffer.text;
2098 // user defined functions
2101 public class Xcls_build_as_library : Object
2103 public Gtk.CheckButton el;
2104 private ValaProjectSettingsPopover _this;
2110 public Xcls_build_as_library(ValaProjectSettingsPopover _owner )
2113 _this.build_as_library = this;
2114 this.el = new Gtk.CheckButton();
2118 // set gobject values
2119 this.el.label = "build as library";
2122 this.el.notify["active"].connect( () => {
2123 if (_this.selected_target == null) {
2126 _this.selected_target.is_library = this.el.active;
2131 // user defined functions
2138 public class Xcls_Box57 : Object
2141 private ValaProjectSettingsPopover _this;
2147 public Xcls_Box57(ValaProjectSettingsPopover _owner )
2150 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
2154 // set gobject values
2155 this.el.margin_end = 4;
2156 this.el.margin_start = 4;
2157 this.el.hexpand = true;
2158 this.el.margin_bottom = 4;
2159 this.el.margin_top = 4;
2160 var child_1 = new Xcls_Button58( _this );
2162 this.el.append( child_1.el );
2163 var child_2 = new Xcls_Label59( _this );
2165 this.el.append( child_2.el );
2166 new Xcls_save_btn( _this );
2167 this.el.append( _this.save_btn.el );
2170 // user defined functions
2172 public class Xcls_Button58 : Object
2174 public Gtk.Button el;
2175 private ValaProjectSettingsPopover _this;
2181 public Xcls_Button58(ValaProjectSettingsPopover _owner )
2184 this.el = new Gtk.Button();
2188 // set gobject values
2189 this.el.label = "Cancel";
2192 this.el.clicked.connect( () => {
2199 // user defined functions
2202 public class Xcls_Label59 : Object
2204 public Gtk.Label el;
2205 private ValaProjectSettingsPopover _this;
2211 public Xcls_Label59(ValaProjectSettingsPopover _owner )
2214 this.el = new Gtk.Label( "" );
2218 // set gobject values
2219 this.el.hexpand = true;
2222 // user defined functions
2225 public class Xcls_save_btn : Object
2227 public Gtk.Button el;
2228 private ValaProjectSettingsPopover _this;
2234 public Xcls_save_btn(ValaProjectSettingsPopover _owner )
2237 _this.save_btn = this;
2238 this.el = new Gtk.Button();
2242 // set gobject values
2243 this.el.css_classes = { "suggested-action" };
2244 this.el.label = "Save";
2247 this.el.clicked.connect( ( ) => {
2250 _this.project.save();
2255 if (_this.doneObj != null) {
2256 _this.doneObj.call(_this.project);
2263 // user defined functions