Fix #7996 - handle namespaces in glade, adw overlay for window selection and open
[roobuilder] / src / Builder4 / MainWindow.vala
1 static Xcls_MainWindow  _MainWindow;
2
3 public class Xcls_MainWindow : Object
4 {
5         public Gtk.ApplicationWindow el;
6         private Xcls_MainWindow  _this;
7
8         public static Xcls_MainWindow singleton()
9         {
10                 if (_MainWindow == null) {
11                     _MainWindow= new Xcls_MainWindow();
12                 }
13                 return _MainWindow;
14         }
15         public Xcls_headerbar headerbar;
16         public Xcls_splitview splitview;
17         public Xcls_vbox vbox;
18         public Xcls_mainpane mainpane;
19         public Xcls_leftpane leftpane;
20         public Xcls_editpane editpane;
21         public Xcls_tree tree;
22         public Xcls_props props;
23         public Xcls_rooviewbox rooviewbox;
24         public Xcls_codeeditviewbox codeeditviewbox;
25         public Xcls_topbarmenu topbarmenu;
26         public Xcls_statusbar statusbar;
27         public Xcls_statusbar_compilestatus_label statusbar_compilestatus_label;
28         public Xcls_statusbar_errors statusbar_errors;
29         public Xcls_statusbar_warnings statusbar_warnings;
30         public Xcls_statusbar_depricated statusbar_depricated;
31         public Xcls_statusbar_run statusbar_run;
32         public Xcls_statusbar_compile_spinner statusbar_compile_spinner;
33         public Xcls_statusbar_compile_icon statusbar_compile_icon;
34         public Xcls_filesearch filesearch;
35         public Xcls_open_projects_btn open_projects_btn;
36         public Xcls_winsel winsel;
37         public Xcls_winfilter winfilter;
38         public Xcls_windowsearch windowsearch;
39         public Xcls_winmodel winmodel;
40         public Xcls_projcol projcol;
41         public Xcls_filecol filecol;
42         public Xcls_histmodel histmodel;
43         public Xcls_histsearch histsearch;
44
45                 // my vars (def)
46         public WindowState windowstate;
47         public bool winloading;
48         public Project.Project project;
49
50         // ctor
51         public Xcls_MainWindow()
52         {
53                 _this = this;
54                 this.el = new Gtk.ApplicationWindow(BuilderApplication.singleton({}));
55
56                 // my vars (dec)
57                 this.winloading = false;
58                 this.project = null;
59
60                 // set gobject values
61                 this.el.title = "Roo Application Builder";
62                 this.el.default_height = 850;
63                 this.el.default_width = 1200;
64                 new Xcls_headerbar( _this );
65                 this.el.set_titlebar ( _this.headerbar.el  );
66                 new Xcls_splitview( _this );
67                 this.el.child = _this.splitview.el;
68
69                 // init method
70
71                 this.el.set_icon_name("roobuilder");
72
73                 //listeners
74                 this.el.close_request.connect( ( ) => {
75                          Resources.singleton().disconnect(_this.statusbar.handler_id);
76                          
77                          
78                          this.windowstate.file.getLanguageServer().document_close(
79                                 this.windowstate.file
80                         );
81                          
82                          BuilderApplication.removeWindow(this);
83                          
84                          if (BuilderApplication.windows.size  < 1) {
85                                 this.windowstate.file.getLanguageServer().exit();
86                                 BuilderApplication.singleton(  null ).quit();
87                          }
88                         return true;
89                 });
90                 this.el.show.connect( ( ) => {
91                     // hide the file editing..
92                    
93                     //this.hideViewEditing();
94                     // this is updated by windowstate - we try and fill it in..
95                      _this.statusbar.el.hide();
96                      //_this.statusbar_errors.el.hide();
97                     //_this.statusbar_warnings.el.hide();
98                     //_this.statusbar_depricated.el.hide();
99                     _this.statusbar_compile_spinner.el.hide();
100                   
101                     Resources.singleton().checkResources();
102                     
103                   
104                 
105                 });
106                 this.el.hide.connect( () =>  {
107                  
108                  
109                 
110                 });
111         }
112
113         // user defined functions
114         public void updateErrors () {
115         
116         
117                 GLib.debug("updateErrors");
118                 
119                 var pr = this.windowstate.project.getErrors("ERR");
120                 
121                 this.statusbar_errors.setNotices(
122                         pr,
123                         this.windowstate.file.getErrorsTotal("ERR")
124                 );
125                 
126                 this.statusbar_warnings.setNotices(
127                         this.windowstate.project.getErrors("WARN"),
128                         this.windowstate.file.getErrorsTotal("WARN")
129                 );
130                 this.statusbar_depricated.setNotices(
131                         this.windowstate.project.getErrors("DEPR"),
132                         this.windowstate.file.getErrorsTotal("DEPR")
133                 );
134         
135                 _this.statusbar_run.el.hide();
136         
137                 if (pr.get_n_items() < 1) {
138                         _this.statusbar_run.el.show();
139                 } 
140                 
141         }
142         public void initChildren () {
143             // this needs putting in a better place..
144             if (this.windowstate == null) {
145                 this.windowstate = new WindowState(this);
146             
147             }
148              
149         
150          
151         
152             
153         
154         
155         
156         }
157         public void show () {
158            
159             this.el.show();
160             if (this.windowstate.file  == null) {
161                 this.windowstate.showPopoverFiles(this.open_projects_btn.el, null, false);
162             }
163         }
164         public void setTitle () {
165             if (_this.windowstate.project == null || 
166                     _this.windowstate.file == null
167             ) {
168                 this.el.set_title("Select File");
169                 return;
170                 }
171             _this.el.set_title(
172                 _this.windowstate.project.name + 
173                 " - " +
174                         _this.windowstate.file.relpath);
175         }
176         public void openNewWindow () {
177          
178             var w = new Xcls_MainWindow();
179             w.ref();
180                 BuilderApplication.addWindow(w);
181             w.el.show();
182             w.initChildren();
183             w.windowstate.showPopoverFiles(w.open_projects_btn.el, _this.project, false);
184              
185         }
186         public class Xcls_headerbar : Object
187         {
188                 public Gtk.HeaderBar el;
189                 private Xcls_MainWindow  _this;
190
191
192                         // my vars (def)
193                 public bool show_close_button;
194                 public string title;
195
196                 // ctor
197                 public Xcls_headerbar(Xcls_MainWindow _owner )
198                 {
199                         _this = _owner;
200                         _this.headerbar = this;
201                         this.el = new Gtk.HeaderBar();
202
203                         // my vars (dec)
204                         this.show_close_button = true;
205                         this.title = "Application Builder";
206
207                         // set gobject values
208                         var child_1 = new Xcls_Box3( _this );
209                         child_1.ref();
210                         this.el.pack_start ( child_1.el  );
211                 }
212
213                 // user defined functions
214         }
215         public class Xcls_Box3 : Object
216         {
217                 public Gtk.Box el;
218                 private Xcls_MainWindow  _this;
219
220
221                         // my vars (def)
222
223                 // ctor
224                 public Xcls_Box3(Xcls_MainWindow _owner )
225                 {
226                         _this = _owner;
227                         this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
228
229                         // my vars (dec)
230
231                         // set gobject values
232                         var child_1 = new Xcls_Button4( _this );
233                         child_1.ref();
234                         this.el.append ( child_1.el  );
235                 }
236
237                 // user defined functions
238         }
239         public class Xcls_Button4 : Object
240         {
241                 public Gtk.Button el;
242                 private Xcls_MainWindow  _this;
243
244
245                         // my vars (def)
246
247                 // ctor
248                 public Xcls_Button4(Xcls_MainWindow _owner )
249                 {
250                         _this = _owner;
251                         this.el = new Gtk.Button();
252
253                         // my vars (dec)
254
255                         // set gobject values
256                         this.el.icon_name = "preferences-system-windows";
257                         this.el.has_frame = false;
258
259                         //listeners
260                         this.el.clicked.connect( ( ) => {
261                                 _this.splitview.el.show_sidebar = !_this.splitview.el.show_sidebar;
262                                 if (_this.splitview.el.show_sidebar) {
263                                         _this.filesearch.el.grab_focus();
264                                         _this.winloading = true;
265                                         _this.winmodel.el.remove_all();
266                                         _this.filesearch.el.set_text("");
267                                         for(var i = 0;i < BuilderApplication.windowlist.get_n_items(); i++) {
268                                                 _this.winmodel.el.append( BuilderApplication.windowlist.get_item(i));
269                                         }
270                                         _this.winsel.selectCurrent();
271                                         _this.winloading = false;
272                                 }
273                         });
274                 }
275
276                 // user defined functions
277         }
278
279
280
281         public class Xcls_splitview : Object
282         {
283                 public Adw.OverlaySplitView el;
284                 private Xcls_MainWindow  _this;
285
286
287                         // my vars (def)
288
289                 // ctor
290                 public Xcls_splitview(Xcls_MainWindow _owner )
291                 {
292                         _this = _owner;
293                         _this.splitview = this;
294                         this.el = new Adw.OverlaySplitView();
295
296                         // my vars (dec)
297
298                         // set gobject values
299                         this.el.collapsed = true;
300                         this.el.sidebar_width_fraction = 0.40000;
301                         this.el.show_sidebar = false;
302                         new Xcls_vbox( _this );
303                         this.el.content = _this.vbox.el;
304                         var child_2 = new Xcls_Box33( _this );
305                         this.el.sidebar = child_2.el;
306                 }
307
308                 // user defined functions
309         }
310         public class Xcls_vbox : Object
311         {
312                 public Gtk.Box el;
313                 private Xcls_MainWindow  _this;
314
315
316                         // my vars (def)
317
318                 // ctor
319                 public Xcls_vbox(Xcls_MainWindow _owner )
320                 {
321                         _this = _owner;
322                         _this.vbox = this;
323                         this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
324
325                         // my vars (dec)
326
327                         // set gobject values
328                         this.el.homogeneous = false;
329                         this.el.hexpand = true;
330                         this.el.vexpand = false;
331                         new Xcls_mainpane( _this );
332                         this.el.append( _this.mainpane.el );
333                         var child_2 = new Xcls_Box15( _this );
334                         child_2.ref();
335                         this.el.append( child_2.el );
336                 }
337
338                 // user defined functions
339         }
340         public class Xcls_mainpane : Object
341         {
342                 public Gtk.Paned el;
343                 private Xcls_MainWindow  _this;
344
345
346                         // my vars (def)
347                 public int lastWidth;
348
349                 // ctor
350                 public Xcls_mainpane(Xcls_MainWindow _owner )
351                 {
352                         _this = _owner;
353                         _this.mainpane = this;
354                         this.el = new Gtk.Paned( Gtk.Orientation.HORIZONTAL );
355
356                         // my vars (dec)
357                         this.lastWidth = 0;
358
359                         // set gobject values
360                         this.el.hexpand = true;
361                         this.el.vexpand = true;
362                         this.el.position = 400;
363                         new Xcls_leftpane( _this );
364                         this.el.start_child = _this.leftpane.el;
365                         var child_2 = new Xcls_Box12( _this );
366                         this.el.end_child = child_2.el;
367
368                         //listeners
369                         this.el.accept_position.connect( ( ) => {
370                                 _this.windowstate.left_tree.onresize();
371                                 return true;
372                         });
373                 }
374
375                 // user defined functions
376         }
377         public class Xcls_leftpane : Object
378         {
379                 public Gtk.Box el;
380                 private Xcls_MainWindow  _this;
381
382
383                         // my vars (def)
384
385                 // ctor
386                 public Xcls_leftpane(Xcls_MainWindow _owner )
387                 {
388                         _this = _owner;
389                         _this.leftpane = this;
390                         this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
391
392                         // my vars (dec)
393
394                         // set gobject values
395                         this.el.hexpand = true;
396                         this.el.vexpand = true;
397                         new Xcls_editpane( _this );
398                         this.el.append( _this.editpane.el );
399                 }
400
401                 // user defined functions
402         }
403         public class Xcls_editpane : Object
404         {
405                 public Gtk.Paned el;
406                 private Xcls_MainWindow  _this;
407
408
409                         // my vars (def)
410
411                 // ctor
412                 public Xcls_editpane(Xcls_MainWindow _owner )
413                 {
414                         _this = _owner;
415                         _this.editpane = this;
416                         this.el = new Gtk.Paned( Gtk.Orientation.HORIZONTAL );
417
418                         // my vars (dec)
419
420                         // set gobject values
421                         new Xcls_tree( _this );
422                         this.el.start_child = _this.tree.el;
423                         new Xcls_props( _this );
424                         this.el.end_child = _this.props.el;
425
426                         //listeners
427                         this.el.accept_position.connect( ( ) => {
428                                 _this.windowstate.left_tree.onresize();
429                                 return true;
430                         });
431                         this.el.move_handle.connect( (scroll) => {
432                                 GLib.debug("Move handle");
433                                 return true;
434                         });
435                 }
436
437                 // user defined functions
438         }
439         public class Xcls_tree : Object
440         {
441                 public Gtk.Box el;
442                 private Xcls_MainWindow  _this;
443
444
445                         // my vars (def)
446
447                 // ctor
448                 public Xcls_tree(Xcls_MainWindow _owner )
449                 {
450                         _this = _owner;
451                         _this.tree = this;
452                         this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
453
454                         // my vars (dec)
455
456                         // set gobject values
457                         this.el.hexpand = true;
458                         this.el.vexpand = true;
459                 }
460
461                 // user defined functions
462         }
463
464         public class Xcls_props : Object
465         {
466                 public Gtk.Box el;
467                 private Xcls_MainWindow  _this;
468
469
470                         // my vars (def)
471
472                 // ctor
473                 public Xcls_props(Xcls_MainWindow _owner )
474                 {
475                         _this = _owner;
476                         _this.props = this;
477                         this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
478
479                         // my vars (dec)
480
481                         // set gobject values
482                         this.el.hexpand = true;
483                         this.el.vexpand = true;
484                 }
485
486                 // user defined functions
487         }
488
489
490
491         public class Xcls_Box12 : Object
492         {
493                 public Gtk.Box el;
494                 private Xcls_MainWindow  _this;
495
496
497                         // my vars (def)
498
499                 // ctor
500                 public Xcls_Box12(Xcls_MainWindow _owner )
501                 {
502                         _this = _owner;
503                         this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
504
505                         // my vars (dec)
506
507                         // set gobject values
508                         this.el.hexpand = true;
509                         this.el.vexpand = true;
510                         new Xcls_rooviewbox( _this );
511                         this.el.append( _this.rooviewbox.el );
512                         new Xcls_codeeditviewbox( _this );
513                         this.el.append( _this.codeeditviewbox.el );
514                 }
515
516                 // user defined functions
517         }
518         public class Xcls_rooviewbox : Object
519         {
520                 public Gtk.Box el;
521                 private Xcls_MainWindow  _this;
522
523
524                         // my vars (def)
525
526                 // ctor
527                 public Xcls_rooviewbox(Xcls_MainWindow _owner )
528                 {
529                         _this = _owner;
530                         _this.rooviewbox = this;
531                         this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
532
533                         // my vars (dec)
534
535                         // set gobject values
536                         this.el.hexpand = true;
537                         this.el.vexpand = true;
538                 }
539
540                 // user defined functions
541         }
542
543         public class Xcls_codeeditviewbox : Object
544         {
545                 public Gtk.Box el;
546                 private Xcls_MainWindow  _this;
547
548
549                         // my vars (def)
550
551                 // ctor
552                 public Xcls_codeeditviewbox(Xcls_MainWindow _owner )
553                 {
554                         _this = _owner;
555                         _this.codeeditviewbox = this;
556                         this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
557
558                         // my vars (dec)
559
560                         // set gobject values
561                         this.el.hexpand = true;
562                         this.el.vexpand = true;
563                 }
564
565                 // user defined functions
566         }
567
568
569
570         public class Xcls_Box15 : Object
571         {
572                 public Gtk.Box el;
573                 private Xcls_MainWindow  _this;
574
575
576                         // my vars (def)
577
578                 // ctor
579                 public Xcls_Box15(Xcls_MainWindow _owner )
580                 {
581                         _this = _owner;
582                         this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
583
584                         // my vars (dec)
585
586                         // set gobject values
587                         this.el.homogeneous = false;
588                         this.el.vexpand = false;
589                         var child_1 = new Xcls_Button16( _this );
590                         child_1.ref();
591                         this.el.append( child_1.el );
592                         var child_2 = new Xcls_Button17( _this );
593                         child_2.ref();
594                         this.el.append( child_2.el );
595                         var child_3 = new Xcls_MenuButton18( _this );
596                         child_3.ref();
597                         this.el.append( child_3.el );
598                         var child_4 = new Xcls_Label23( _this );
599                         child_4.ref();
600                         this.el.append( child_4.el );
601                         new Xcls_statusbar( _this );
602                         this.el.append( _this.statusbar.el );
603                         var child_6 = new Xcls_Box25( _this );
604                         child_6.ref();
605                         this.el.append( child_6.el );
606                         new Xcls_statusbar_compile_spinner( _this );
607                         this.el.append( _this.statusbar_compile_spinner.el );
608                         new Xcls_statusbar_compile_icon( _this );
609                         this.el.append( _this.statusbar_compile_icon.el );
610                 }
611
612                 // user defined functions
613         }
614         public class Xcls_Button16 : Object
615         {
616                 public Gtk.Button el;
617                 private Xcls_MainWindow  _this;
618
619
620                         // my vars (def)
621                 public bool always_show_image;
622
623                 // ctor
624                 public Xcls_Button16(Xcls_MainWindow _owner )
625                 {
626                         _this = _owner;
627                         this.el = new Gtk.Button();
628
629                         // my vars (dec)
630                         this.always_show_image = true;
631
632                         // set gobject values
633                         this.el.icon_name = "emblem-system";
634                         this.el.tooltip_text = "Project Details";
635                         this.el.label = "Edit Project Settings";
636
637                         //listeners
638                         this.el.clicked.connect( ( ) => {
639                              
640                              _this.windowstate.projectPopoverShow(_this.el, null, null);
641                            
642                           
643                         });
644                 }
645
646                 // user defined functions
647         }
648
649         public class Xcls_Button17 : Object
650         {
651                 public Gtk.Button el;
652                 private Xcls_MainWindow  _this;
653
654
655                         // my vars (def)
656                 public bool always_show_image;
657
658                 // ctor
659                 public Xcls_Button17(Xcls_MainWindow _owner )
660                 {
661                         _this = _owner;
662                         this.el = new Gtk.Button();
663
664                         // my vars (dec)
665                         this.always_show_image = true;
666
667                         // set gobject values
668                         this.el.icon_name = "document-properties";
669                         this.el.tooltip_text = "File Details";
670                         this.el.label = "Edit File Properties";
671
672                         //listeners
673                         this.el.clicked.connect( ( ) => {
674                           
675                             // create a new file in project..
676                             if (_this.project == null || _this.windowstate.file == null) {
677                                 return  ;
678                             }
679                              _this.windowstate.file_details.show(
680                                 _this.windowstate.file, _this.el, false
681                             );
682                              
683                             return  ;    
684                         
685                         
686                         });
687                 }
688
689                 // user defined functions
690         }
691
692         public class Xcls_MenuButton18 : Object
693         {
694                 public Gtk.MenuButton el;
695                 private Xcls_MainWindow  _this;
696
697
698                         // my vars (def)
699                 public bool always_show_image;
700
701                 // ctor
702                 public Xcls_MenuButton18(Xcls_MainWindow _owner )
703                 {
704                         _this = _owner;
705                         this.el = new Gtk.MenuButton();
706
707                         // my vars (dec)
708                         this.always_show_image = true;
709
710                         // set gobject values
711                         this.el.icon_name = "dialog-information";
712                         this.el.label = "About";
713                         new Xcls_topbarmenu( _this );
714                         this.el.popover = _this.topbarmenu.el;
715                 }
716
717                 // user defined functions
718         }
719         public class Xcls_topbarmenu : Object
720         {
721                 public Gtk.PopoverMenu el;
722                 private Xcls_MainWindow  _this;
723
724
725                         // my vars (def)
726
727                 // ctor
728                 public Xcls_topbarmenu(Xcls_MainWindow _owner )
729                 {
730                         _this = _owner;
731                         _this.topbarmenu = this;
732                         this.el = new Gtk.PopoverMenu.from_model(null);
733
734                         // my vars (dec)
735
736                         // set gobject values
737                         var child_1 = new Xcls_Box20( _this );
738                         child_1.ref();
739                         this.el.set_child ( child_1.el  );
740
741                         // init method
742
743                         {
744                            // this.el.show();
745                         }
746                 }
747
748                 // user defined functions
749         }
750         public class Xcls_Box20 : Object
751         {
752                 public Gtk.Box el;
753                 private Xcls_MainWindow  _this;
754
755
756                         // my vars (def)
757
758                 // ctor
759                 public Xcls_Box20(Xcls_MainWindow _owner )
760                 {
761                         _this = _owner;
762                         this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
763
764                         // my vars (dec)
765
766                         // set gobject values
767                         var child_1 = new Xcls_Button21( _this );
768                         child_1.ref();
769                         this.el.append( child_1.el );
770                         var child_2 = new Xcls_Button22( _this );
771                         child_2.ref();
772                         this.el.append( child_2.el );
773                 }
774
775                 // user defined functions
776         }
777         public class Xcls_Button21 : Object
778         {
779                 public Gtk.Button el;
780                 private Xcls_MainWindow  _this;
781
782
783                         // my vars (def)
784
785                 // ctor
786                 public Xcls_Button21(Xcls_MainWindow _owner )
787                 {
788                         _this = _owner;
789                         this.el = new Gtk.Button();
790
791                         // my vars (dec)
792
793                         // set gobject values
794                         this.el.label = "Download updated Resources";
795
796                         //listeners
797                         this.el.activate.connect( ( ) => {
798                                  Resources.singleton().fetchStart();
799                         });
800                 }
801
802                 // user defined functions
803         }
804
805         public class Xcls_Button22 : Object
806         {
807                 public Gtk.Button el;
808                 private Xcls_MainWindow  _this;
809
810
811                         // my vars (def)
812
813                 // ctor
814                 public Xcls_Button22(Xcls_MainWindow _owner )
815                 {
816                         _this = _owner;
817                         this.el = new Gtk.Button();
818
819                         // my vars (dec)
820
821                         // set gobject values
822                         this.el.label = "About the Builder";
823
824                         //listeners
825                         this.el.clicked.connect( () => {
826                             About.singleton().el.show();
827                             });
828                 }
829
830                 // user defined functions
831         }
832
833
834
835
836         public class Xcls_Label23 : Object
837         {
838                 public Gtk.Label el;
839                 private Xcls_MainWindow  _this;
840
841
842                         // my vars (def)
843
844                 // ctor
845                 public Xcls_Label23(Xcls_MainWindow _owner )
846                 {
847                         _this = _owner;
848                         this.el = new Gtk.Label( "   " );
849
850                         // my vars (dec)
851
852                         // set gobject values
853                         this.el.hexpand = true;
854                 }
855
856                 // user defined functions
857         }
858
859         public class Xcls_statusbar : Object
860         {
861                 public Gtk.ProgressBar el;
862                 private Xcls_MainWindow  _this;
863
864
865                         // my vars (def)
866                 public ulong handler_id;
867
868                 // ctor
869                 public Xcls_statusbar(Xcls_MainWindow _owner )
870                 {
871                         _this = _owner;
872                         _this.statusbar = this;
873                         this.el = new Gtk.ProgressBar();
874
875                         // my vars (dec)
876                         this.handler_id = -1;
877
878                         // set gobject values
879                         this.el.show_text = true;
880
881                         // init method
882
883                         {
884                              this.handler_id = Resources.singleton().updateProgress.connect((pos,total) => {
885                                 if (pos < 1) {
886                                     this.el.hide();
887                                     _this.mainpane.el.set_sensitive(true);
888                                     
889                                     return;
890                                 }
891                                  _this.mainpane.el.set_sensitive(false);
892                                  this.el.show();
893                                  this.el.set_fraction ((1.0f * pos) / (1.0f * total));
894                                  this.el.set_text("Fetching Resource : %s/%s".printf(pos.to_string(), total.to_string()));
895                                
896                              });
897                         }
898                 }
899
900                 // user defined functions
901         }
902
903         public class Xcls_Box25 : Object
904         {
905                 public Gtk.Box el;
906                 private Xcls_MainWindow  _this;
907
908
909                         // my vars (def)
910
911                 // ctor
912                 public Xcls_Box25(Xcls_MainWindow _owner )
913                 {
914                         _this = _owner;
915                         this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
916
917                         // my vars (dec)
918
919                         // set gobject values
920                         new Xcls_statusbar_compilestatus_label( _this );
921                         this.el.append( _this.statusbar_compilestatus_label.el );
922                         new Xcls_statusbar_errors( _this );
923                         this.el.append( _this.statusbar_errors.el );
924                         new Xcls_statusbar_warnings( _this );
925                         this.el.append( _this.statusbar_warnings.el );
926                         new Xcls_statusbar_depricated( _this );
927                         this.el.append( _this.statusbar_depricated.el );
928                         new Xcls_statusbar_run( _this );
929                         this.el.append( _this.statusbar_run.el );
930                 }
931
932                 // user defined functions
933         }
934         public class Xcls_statusbar_compilestatus_label : Object
935         {
936                 public Gtk.Label el;
937                 private Xcls_MainWindow  _this;
938
939
940                         // my vars (def)
941
942                 // ctor
943                 public Xcls_statusbar_compilestatus_label(Xcls_MainWindow _owner )
944                 {
945                         _this = _owner;
946                         _this.statusbar_compilestatus_label = this;
947                         this.el = new Gtk.Label( "Compile Status:" );
948
949                         // my vars (dec)
950
951                         // set gobject values
952                         this.el.margin_end = 4;
953                         this.el.margin_start = 4;
954                 }
955
956                 // user defined functions
957         }
958
959         public class Xcls_statusbar_errors : Object
960         {
961                 public Gtk.Button el;
962                 private Xcls_MainWindow  _this;
963
964
965                         // my vars (def)
966                 public Xcls_ValaCompileErrors popup;
967
968                 // ctor
969                 public Xcls_statusbar_errors(Xcls_MainWindow _owner )
970                 {
971                         _this = _owner;
972                         _this.statusbar_errors = this;
973                         this.el = new Gtk.Button();
974
975                         // my vars (dec)
976
977                         // set gobject values
978                         this.el.icon_name = "dialog-error";
979                         this.el.label = "0 Errors";
980
981                         //listeners
982                         this.el.clicked.connect( () => {
983                          
984                                 if (this.popup == null) {
985                                         return;
986                                 }
987                            
988                             this.popup.show();
989                           
990                         });
991                 }
992
993                 // user defined functions
994                 public void setNotices (GLib.ListStore nots, int ferrors ) {
995                     BuilderApplication.showSpinner("");
996                      if (nots.get_n_items() < 1 ) {
997                         this.el.hide();
998                         if (this.popup != null) {
999                                 this.popup.el.hide();
1000                                 }
1001                         return;
1002                     }
1003                     
1004                     this.el.show();
1005                     this.el.label = "%d/%d Errors".printf(ferrors,(int)nots.get_n_items());
1006                 
1007                     
1008                  
1009                         if (this.popup == null) {
1010                         this.popup = new Xcls_ValaCompileErrors();
1011                         this.popup.window = _this;
1012                       //    this.popup.el.set_transient_for( _this.el );
1013                         this.popup.el.set_parent(this.el);
1014                     }
1015                  
1016                         this.popup.updateNotices(nots);
1017                          
1018                 }
1019         }
1020
1021         public class Xcls_statusbar_warnings : Object
1022         {
1023                 public Gtk.Button el;
1024                 private Xcls_MainWindow  _this;
1025
1026
1027                         // my vars (def)
1028                 public Xcls_ValaCompileErrors popup;
1029
1030                 // ctor
1031                 public Xcls_statusbar_warnings(Xcls_MainWindow _owner )
1032                 {
1033                         _this = _owner;
1034                         _this.statusbar_warnings = this;
1035                         this.el = new Gtk.Button();
1036
1037                         // my vars (dec)
1038
1039                         // set gobject values
1040                         this.el.icon_name = "dialog-warning";
1041                         this.el.label = "0 Warnings";
1042
1043                         //listeners
1044                         this.el.clicked.connect( () => {
1045                          
1046                                 if (this.popup == null) {
1047                                         return;
1048                                 }
1049                            
1050                             this.popup.show();
1051                             return;
1052                         });
1053                 }
1054
1055                 // user defined functions
1056                 public void setNotices (GLib.ListStore nots, int ferrs ) {
1057                     
1058                      if (nots.get_n_items() < 1 ) {
1059                         this.el.hide();
1060                         if (this.popup != null) {
1061                                 this.popup.el.hide();
1062                                 }
1063                         return;
1064                     }
1065                     
1066                     this.el.show();
1067                     this.el.label = "%d/%d Warnings".printf(ferrs,(int)nots.get_n_items());
1068                 
1069                     
1070                  
1071                         if (this.popup == null) {
1072                         this.popup = new Xcls_ValaCompileErrors();
1073                         this.popup.window = _this;
1074                       //    this.popup.el.set_transient_for( _this.el );
1075                         this.popup.el.set_parent(this.el);
1076                     }
1077                         this.popup.updateNotices(nots);
1078                          
1079                 }
1080         }
1081
1082         public class Xcls_statusbar_depricated : Object
1083         {
1084                 public Gtk.Button el;
1085                 private Xcls_MainWindow  _this;
1086
1087
1088                         // my vars (def)
1089                 public Xcls_ValaCompileErrors popup;
1090                 public GLib.ListStore notices;
1091
1092                 // ctor
1093                 public Xcls_statusbar_depricated(Xcls_MainWindow _owner )
1094                 {
1095                         _this = _owner;
1096                         _this.statusbar_depricated = this;
1097                         this.el = new Gtk.Button();
1098
1099                         // my vars (dec)
1100                         this.notices = null;
1101
1102                         // set gobject values
1103                         this.el.icon_name = "dialog-information";
1104                         this.el.label = "0 Depricated";
1105
1106                         //listeners
1107                         this.el.clicked.connect( () => {
1108                          
1109                                 if (this.popup == null) {
1110                                         return;
1111                                 }
1112                            
1113                             this.popup.show();
1114                           
1115                         });
1116                 }
1117
1118                 // user defined functions
1119                 public void setNotices (GLib.ListStore nots, int ferrs ) {
1120                     
1121                      if (nots.get_n_items() < 1 ) {
1122                         this.el.hide();
1123                         if (this.popup != null) {
1124                                 this.popup.el.hide();
1125                                 }
1126                         return;
1127                     }
1128                     
1129                     this.el.show();
1130                     this.el.label = "%d/%d Depricated".printf(ferrs,(int)nots.get_n_items());
1131                 
1132                     
1133                  
1134                         if (this.popup == null) {
1135                         this.popup = new Xcls_ValaCompileErrors();
1136                         this.popup.window = _this;
1137                       //    this.popup.el.set_transient_for( _this.el );
1138                         this.popup.el.set_parent(this.el);
1139                     }
1140                         this.popup.updateNotices(nots);
1141                          
1142                 }
1143         }
1144
1145         public class Xcls_statusbar_run : Object
1146         {
1147                 public Gtk.Button el;
1148                 private Xcls_MainWindow  _this;
1149
1150
1151                         // my vars (def)
1152                 public Xcls_ValaCompileErrors popup;
1153                 public Palete.ValaCompileRequest? last_request;
1154
1155                 // ctor
1156                 public Xcls_statusbar_run(Xcls_MainWindow _owner )
1157                 {
1158                         _this = _owner;
1159                         _this.statusbar_run = this;
1160                         this.el = new Gtk.Button();
1161
1162                         // my vars (dec)
1163                         this.last_request = null;
1164
1165                         // set gobject values
1166                         this.el.icon_name = "media-playback-start";
1167                         this.el.label = "Run";
1168                         this.el.visible = false;
1169
1170                         //listeners
1171                         this.el.clicked.connect( () => {
1172                            
1173                            if (_this.windowstate.file == null) {
1174                                         return;
1175                                 }
1176                            if (_this.statusbar_compile_spinner.el.spinning) {
1177                                 _this.windowstate.compile_results.el.set_parent(this.el);
1178                                     _this.windowstate.compile_results.el.show(); // show currently running.
1179                                 return;
1180                                 }
1181                                 
1182                                 if (this.last_request != null) {
1183                                         this.last_request.cancel();
1184                                         if (this.last_request.terminal_pid > 0) {
1185                                                 this.last_request.killChildren(this.last_request.terminal_pid);
1186                                         }
1187                                 }
1188                                 var pr = _this.windowstate.project as Project.Gtk;
1189                                 if (pr == null) {
1190                                         return;
1191                                 }
1192                                 
1193                                 
1194                                 this.last_request= new Palete.ValaCompileRequest(
1195                                         pr,
1196                                         pr.firstBuildModuleWith(_this.windowstate.file)
1197                                 );
1198                                 this.last_request.onOutput.connect( ( str) => {
1199                                         _this.windowstate.compile_results.addLine(str);
1200                                 });
1201                                 this.last_request.run.begin( ( a, r) => {
1202                                         this.last_request.run.end(r);
1203                                 });
1204                                  if (_this.windowstate.compile_results.el.parent == null) {
1205                                         _this.windowstate.compile_results.el.set_parent(this.el);
1206                                 }
1207                                 _this.windowstate.compile_results.show(this.el,true);
1208                                          
1209                         });
1210                 }
1211
1212                 // user defined functions
1213         }
1214
1215
1216         public class Xcls_statusbar_compile_spinner : Object
1217         {
1218                 public Gtk.Spinner el;
1219                 private Xcls_MainWindow  _this;
1220
1221
1222                         // my vars (def)
1223
1224                 // ctor
1225                 public Xcls_statusbar_compile_spinner(Xcls_MainWindow _owner )
1226                 {
1227                         _this = _owner;
1228                         _this.statusbar_compile_spinner = this;
1229                         this.el = new Gtk.Spinner();
1230
1231                         // my vars (dec)
1232
1233                         // set gobject values
1234                         this.el.margin_end = 4;
1235                         this.el.margin_start = 4;
1236                         this.el.tooltip_text = "Compiling";
1237                 }
1238
1239                 // user defined functions
1240                 public void start (string icon, string tooltip) {
1241                 
1242                         if (icon == "spinner") {
1243                           this.el.show();
1244                           this.el.start();  
1245                           this.el.tooltip_text = tooltip;
1246                           _this.statusbar_compile_icon.el.hide();
1247                   } else {
1248                           this.el.hide();
1249                         //  GLib.debug("set status icon %s, %s", icon, tooltip);
1250                           _this.statusbar_compile_icon.el.tooltip_text = tooltip;
1251                           _this.statusbar_compile_icon.el.icon_name = icon;
1252                           _this.statusbar_compile_icon.el.show();         
1253                   }
1254                   
1255                          
1256                 }
1257                 public void stop () {
1258                  this.el.stop();
1259                   this.el.hide();
1260                  _this.statusbar_compile_icon.el.hide();  
1261                 }
1262         }
1263
1264         public class Xcls_statusbar_compile_icon : Object
1265         {
1266                 public Gtk.Image el;
1267                 private Xcls_MainWindow  _this;
1268
1269
1270                         // my vars (def)
1271
1272                 // ctor
1273                 public Xcls_statusbar_compile_icon(Xcls_MainWindow _owner )
1274                 {
1275                         _this = _owner;
1276                         _this.statusbar_compile_icon = this;
1277                         this.el = new Gtk.Image();
1278
1279                         // my vars (dec)
1280
1281                         // set gobject values
1282                         this.el.margin_end = 4;
1283                         this.el.margin_start = 4;
1284                         this.el.icon_size = Gtk.IconSize.NORMAL;
1285                 }
1286
1287                 // user defined functions
1288         }
1289
1290
1291
1292         public class Xcls_Box33 : Object
1293         {
1294                 public Gtk.Box el;
1295                 private Xcls_MainWindow  _this;
1296
1297
1298                         // my vars (def)
1299
1300                 // ctor
1301                 public Xcls_Box33(Xcls_MainWindow _owner )
1302                 {
1303                         _this = _owner;
1304                         this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
1305
1306                         // my vars (dec)
1307
1308                         // set gobject values
1309                         var child_1 = new Xcls_SearchBar34( _this );
1310                         child_1.ref();
1311                         this.el.append( child_1.el );
1312                         var child_2 = new Xcls_Box36( _this );
1313                         child_2.ref();
1314                         this.el.append( child_2.el );
1315                         var child_3 = new Xcls_Paned45( _this );
1316                         child_3.ref();
1317                         this.el.append( child_3.el );
1318                 }
1319
1320                 // user defined functions
1321         }
1322         public class Xcls_SearchBar34 : Object
1323         {
1324                 public Gtk.SearchBar el;
1325                 private Xcls_MainWindow  _this;
1326
1327
1328                         // my vars (def)
1329
1330                 // ctor
1331                 public Xcls_SearchBar34(Xcls_MainWindow _owner )
1332                 {
1333                         _this = _owner;
1334                         this.el = new Gtk.SearchBar();
1335
1336                         // my vars (dec)
1337
1338                         // set gobject values
1339                         this.el.hexpand = true;
1340                         this.el.search_mode_enabled = true;
1341                         new Xcls_filesearch( _this );
1342                         this.el.child = _this.filesearch.el;
1343                 }
1344
1345                 // user defined functions
1346         }
1347         public class Xcls_filesearch : Object
1348         {
1349                 public Gtk.SearchEntry el;
1350                 private Xcls_MainWindow  _this;
1351
1352
1353                         // my vars (def)
1354
1355                 // ctor
1356                 public Xcls_filesearch(Xcls_MainWindow _owner )
1357                 {
1358                         _this = _owner;
1359                         _this.filesearch = this;
1360                         this.el = new Gtk.SearchEntry();
1361
1362                         // my vars (dec)
1363
1364                         // set gobject values
1365                         this.el.hexpand = true;
1366                         this.el.placeholder_text = "Search for file";
1367
1368                         //listeners
1369                         this.el.search_changed.connect( ( ) => {
1370                         
1371                                 _this.windowsearch.el.set_search(this.el.get_text());
1372                         });
1373                 }
1374
1375                 // user defined functions
1376         }
1377
1378
1379         public class Xcls_Box36 : Object
1380         {
1381                 public Gtk.Box el;
1382                 private Xcls_MainWindow  _this;
1383
1384
1385                         // my vars (def)
1386
1387                 // ctor
1388                 public Xcls_Box36(Xcls_MainWindow _owner )
1389                 {
1390                         _this = _owner;
1391                         this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
1392
1393                         // my vars (dec)
1394
1395                         // set gobject values
1396                         this.el.hexpand = true;
1397                         new Xcls_open_projects_btn( _this );
1398                         this.el.append( _this.open_projects_btn.el );
1399                         var child_2 = new Xcls_Button41( _this );
1400                         child_2.ref();
1401                         this.el.append( child_2.el );
1402                 }
1403
1404                 // user defined functions
1405         }
1406         public class Xcls_open_projects_btn : Object
1407         {
1408                 public Gtk.Button el;
1409                 private Xcls_MainWindow  _this;
1410
1411
1412                         // my vars (def)
1413
1414                 // ctor
1415                 public Xcls_open_projects_btn(Xcls_MainWindow _owner )
1416                 {
1417                         _this = _owner;
1418                         _this.open_projects_btn = this;
1419                         this.el = new Gtk.Button();
1420
1421                         // my vars (dec)
1422
1423                         // set gobject values
1424                         this.el.hexpand = true;
1425                         var child_1 = new Xcls_Box38( _this );
1426                         this.el.child = child_1.el;
1427
1428                         //listeners
1429                         this.el.clicked.connect( ( ) => {
1430                                 _this.windowstate.showPopoverFiles(this.el, _this.project, false);
1431                         });
1432                 }
1433
1434                 // user defined functions
1435         }
1436         public class Xcls_Box38 : Object
1437         {
1438                 public Gtk.Box el;
1439                 private Xcls_MainWindow  _this;
1440
1441
1442                         // my vars (def)
1443
1444                 // ctor
1445                 public Xcls_Box38(Xcls_MainWindow _owner )
1446                 {
1447                         _this = _owner;
1448                         this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
1449
1450                         // my vars (dec)
1451
1452                         // set gobject values
1453                         var child_1 = new Xcls_Image39( _this );
1454                         child_1.ref();
1455                         this.el.append( child_1.el );
1456                         var child_2 = new Xcls_Label40( _this );
1457                         child_2.ref();
1458                         this.el.append( child_2.el );
1459                 }
1460
1461                 // user defined functions
1462         }
1463         public class Xcls_Image39 : Object
1464         {
1465                 public Gtk.Image el;
1466                 private Xcls_MainWindow  _this;
1467
1468
1469                         // my vars (def)
1470
1471                 // ctor
1472                 public Xcls_Image39(Xcls_MainWindow _owner )
1473                 {
1474                         _this = _owner;
1475                         this.el = new Gtk.Image();
1476
1477                         // my vars (dec)
1478
1479                         // set gobject values
1480                         this.el.icon_name = "document-open";
1481                         this.el.margin_end = 4;
1482                 }
1483
1484                 // user defined functions
1485         }
1486
1487         public class Xcls_Label40 : Object
1488         {
1489                 public Gtk.Label el;
1490                 private Xcls_MainWindow  _this;
1491
1492
1493                         // my vars (def)
1494
1495                 // ctor
1496                 public Xcls_Label40(Xcls_MainWindow _owner )
1497                 {
1498                         _this = _owner;
1499                         this.el = new Gtk.Label( "Open File" );
1500
1501                         // my vars (dec)
1502
1503                         // set gobject values
1504                 }
1505
1506                 // user defined functions
1507         }
1508
1509
1510
1511         public class Xcls_Button41 : Object
1512         {
1513                 public Gtk.Button el;
1514                 private Xcls_MainWindow  _this;
1515
1516
1517                         // my vars (def)
1518
1519                 // ctor
1520                 public Xcls_Button41(Xcls_MainWindow _owner )
1521                 {
1522                         _this = _owner;
1523                         this.el = new Gtk.Button();
1524
1525                         // my vars (dec)
1526
1527                         // set gobject values
1528                         this.el.hexpand = true;
1529                         var child_1 = new Xcls_Box42( _this );
1530                         this.el.child = child_1.el;
1531
1532                         //listeners
1533                         this.el.clicked.connect( ( ) => {
1534                                 _this.splitview.el.show_sidebar = false;
1535                                 _this.windowstate.showPopoverFiles(_this.el, _this.project, true);
1536                         });
1537                 }
1538
1539                 // user defined functions
1540         }
1541         public class Xcls_Box42 : Object
1542         {
1543                 public Gtk.Box el;
1544                 private Xcls_MainWindow  _this;
1545
1546
1547                         // my vars (def)
1548
1549                 // ctor
1550                 public Xcls_Box42(Xcls_MainWindow _owner )
1551                 {
1552                         _this = _owner;
1553                         this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
1554
1555                         // my vars (dec)
1556
1557                         // set gobject values
1558                         var child_1 = new Xcls_Image43( _this );
1559                         child_1.ref();
1560                         this.el.append( child_1.el );
1561                         var child_2 = new Xcls_Label44( _this );
1562                         child_2.ref();
1563                         this.el.append( child_2.el );
1564                 }
1565
1566                 // user defined functions
1567         }
1568         public class Xcls_Image43 : Object
1569         {
1570                 public Gtk.Image el;
1571                 private Xcls_MainWindow  _this;
1572
1573
1574                         // my vars (def)
1575
1576                 // ctor
1577                 public Xcls_Image43(Xcls_MainWindow _owner )
1578                 {
1579                         _this = _owner;
1580                         this.el = new Gtk.Image();
1581
1582                         // my vars (dec)
1583
1584                         // set gobject values
1585                         this.el.icon_name = "window-new";
1586                         this.el.margin_end = 4;
1587                 }
1588
1589                 // user defined functions
1590         }
1591
1592         public class Xcls_Label44 : Object
1593         {
1594                 public Gtk.Label el;
1595                 private Xcls_MainWindow  _this;
1596
1597
1598                         // my vars (def)
1599
1600                 // ctor
1601                 public Xcls_Label44(Xcls_MainWindow _owner )
1602                 {
1603                         _this = _owner;
1604                         this.el = new Gtk.Label( "New Window" );
1605
1606                         // my vars (dec)
1607
1608                         // set gobject values
1609                 }
1610
1611                 // user defined functions
1612         }
1613
1614
1615
1616
1617         public class Xcls_Paned45 : Object
1618         {
1619                 public Gtk.Paned el;
1620                 private Xcls_MainWindow  _this;
1621
1622
1623                         // my vars (def)
1624
1625                 // ctor
1626                 public Xcls_Paned45(Xcls_MainWindow _owner )
1627                 {
1628                         _this = _owner;
1629                         this.el = new Gtk.Paned( Gtk.Orientation.VERTICAL );
1630
1631                         // my vars (dec)
1632
1633                         // set gobject values
1634                         this.el.vexpand = true;
1635                         var child_1 = new Xcls_ScrolledWindow46( _this );
1636                         this.el.start_child = child_1.el;
1637                         var child_2 = new Xcls_ScrolledWindow60( _this );
1638                         this.el.end_child = child_2.el;
1639                 }
1640
1641                 // user defined functions
1642         }
1643         public class Xcls_ScrolledWindow46 : Object
1644         {
1645                 public Gtk.ScrolledWindow el;
1646                 private Xcls_MainWindow  _this;
1647
1648
1649                         // my vars (def)
1650
1651                 // ctor
1652                 public Xcls_ScrolledWindow46(Xcls_MainWindow _owner )
1653                 {
1654                         _this = _owner;
1655                         this.el = new Gtk.ScrolledWindow();
1656
1657                         // my vars (dec)
1658
1659                         // set gobject values
1660                         var child_1 = new Xcls_ColumnView47( _this );
1661                         this.el.child = child_1.el;
1662                 }
1663
1664                 // user defined functions
1665         }
1666         public class Xcls_ColumnView47 : Object
1667         {
1668                 public Gtk.ColumnView el;
1669                 private Xcls_MainWindow  _this;
1670
1671
1672                         // my vars (def)
1673
1674                 // ctor
1675                 public Xcls_ColumnView47(Xcls_MainWindow _owner )
1676                 {
1677                         _this = _owner;
1678                         new Xcls_winsel( _this );
1679                         this.el = new Gtk.ColumnView( _this.winsel.el );
1680
1681                         // my vars (dec)
1682
1683                         // set gobject values
1684                         new Xcls_projcol( _this );
1685                         this.el.append_column( _this.projcol.el );
1686                         new Xcls_filecol( _this );
1687                         this.el.append_column ( _this.filecol.el  );
1688                 }
1689
1690                 // user defined functions
1691         }
1692         public class Xcls_winsel : Object
1693         {
1694                 public Gtk.SingleSelection el;
1695                 private Xcls_MainWindow  _this;
1696
1697
1698                         // my vars (def)
1699                 public bool selecting;
1700
1701                 // ctor
1702                 public Xcls_winsel(Xcls_MainWindow _owner )
1703                 {
1704                         _this = _owner;
1705                         _this.winsel = this;
1706                         var child_1 = new Xcls_SortListModel49( _this );
1707                         child_1.ref();
1708                         this.el = new Gtk.SingleSelection( child_1.el );
1709
1710                         // my vars (dec)
1711                         this.selecting = false;
1712
1713                         // set gobject values
1714                         this.el.can_unselect = false;
1715                         this.el.autoselect = false;
1716
1717                         //listeners
1718                         this.el.notify["selected"].connect( () => {
1719                                 if (_this.winloading || this.selecting || this.el.selected == Gtk.INVALID_LIST_POSITION) {
1720                                         return;
1721                                 }
1722                                 var ws = this.el.selected_item as WindowState;
1723                                 if (ws == null) {
1724                                         return;
1725                                 }
1726                                 if (ws.file.path != _this.windowstate.file.path) {
1727                                         _this.windowstate.fileViewOpen(ws.file, ws.file_details.new_window,  -1);
1728                                         _this.splitview.el.show_sidebar = false;
1729                                 }
1730                                 
1731                                 this.selectCurrent();
1732                          });
1733                 }
1734
1735                 // user defined functions
1736                 public void selectCurrent () {
1737                         this.selecting = true;
1738                          
1739                         for(var i = 0;i < this.el.get_n_items(); i++) {
1740                                 var ws = this.el.get_item(i) as WindowState;
1741                                 if (ws.file.path == _this.windowstate.file.path) {
1742                                         this.el.selected = i;
1743                                         break;
1744                                 }
1745                         }
1746                         this.selecting = false;
1747                  
1748                 
1749                 }
1750         }
1751         public class Xcls_SortListModel49 : Object
1752         {
1753                 public Gtk.SortListModel el;
1754                 private Xcls_MainWindow  _this;
1755
1756
1757                         // my vars (def)
1758
1759                 // ctor
1760                 public Xcls_SortListModel49(Xcls_MainWindow _owner )
1761                 {
1762                         _this = _owner;
1763                         new Xcls_winfilter( _this );
1764                         var child_2 = new Xcls_StringSorter54( _this );
1765                         child_2.ref();
1766                         this.el = new Gtk.SortListModel( _this.winfilter.el, child_2.el );
1767
1768                         // my vars (dec)
1769
1770                         // set gobject values
1771                 }
1772
1773                 // user defined functions
1774         }
1775         public class Xcls_winfilter : Object
1776         {
1777                 public Gtk.FilterListModel el;
1778                 private Xcls_MainWindow  _this;
1779
1780
1781                         // my vars (def)
1782
1783                 // ctor
1784                 public Xcls_winfilter(Xcls_MainWindow _owner )
1785                 {
1786                         _this = _owner;
1787                         _this.winfilter = this;
1788                         new Xcls_winmodel( _this );
1789                         new Xcls_windowsearch( _this );
1790                         this.el = new Gtk.FilterListModel( _this.winmodel.el, _this.windowsearch.el );
1791
1792                         // my vars (dec)
1793
1794                         // set gobject values
1795                 }
1796
1797                 // user defined functions
1798         }
1799         public class Xcls_windowsearch : Object
1800         {
1801                 public Gtk.StringFilter el;
1802                 private Xcls_MainWindow  _this;
1803
1804
1805                         // my vars (def)
1806
1807                 // ctor
1808                 public Xcls_windowsearch(Xcls_MainWindow _owner )
1809                 {
1810                         _this = _owner;
1811                         _this.windowsearch = this;
1812                         var child_1 = new Xcls_PropertyExpression52( _this );
1813                         child_1.ref();
1814                         this.el = new Gtk.StringFilter( child_1.el );
1815
1816                         // my vars (dec)
1817
1818                         // set gobject values
1819                 }
1820
1821                 // user defined functions
1822         }
1823         public class Xcls_PropertyExpression52 : Object
1824         {
1825                 public Gtk.PropertyExpression el;
1826                 private Xcls_MainWindow  _this;
1827
1828
1829                         // my vars (def)
1830
1831                 // ctor
1832                 public Xcls_PropertyExpression52(Xcls_MainWindow _owner )
1833                 {
1834                         _this = _owner;
1835                         this.el = new Gtk.PropertyExpression( typeof(WindowState), null, "file_name" );
1836
1837                         // my vars (dec)
1838
1839                         // set gobject values
1840                 }
1841
1842                 // user defined functions
1843         }
1844
1845
1846         public class Xcls_winmodel : Object
1847         {
1848                 public GLib.ListStore el;
1849                 private Xcls_MainWindow  _this;
1850
1851
1852                         // my vars (def)
1853
1854                 // ctor
1855                 public Xcls_winmodel(Xcls_MainWindow _owner )
1856                 {
1857                         _this = _owner;
1858                         _this.winmodel = this;
1859                         this.el = new GLib.ListStore( typeof(WindowState) );
1860
1861                         // my vars (dec)
1862
1863                         // set gobject values
1864                 }
1865
1866                 // user defined functions
1867         }
1868
1869
1870         public class Xcls_StringSorter54 : Object
1871         {
1872                 public Gtk.StringSorter el;
1873                 private Xcls_MainWindow  _this;
1874
1875
1876                         // my vars (def)
1877
1878                 // ctor
1879                 public Xcls_StringSorter54(Xcls_MainWindow _owner )
1880                 {
1881                         _this = _owner;
1882                         var child_1 = new Xcls_PropertyExpression55( _this );
1883                         child_1.ref();
1884                         this.el = new Gtk.StringSorter( child_1.el );
1885
1886                         // my vars (dec)
1887
1888                         // set gobject values
1889                         this.el.ignore_case = true;
1890                 }
1891
1892                 // user defined functions
1893         }
1894         public class Xcls_PropertyExpression55 : Object
1895         {
1896                 public Gtk.PropertyExpression el;
1897                 private Xcls_MainWindow  _this;
1898
1899
1900                         // my vars (def)
1901
1902                 // ctor
1903                 public Xcls_PropertyExpression55(Xcls_MainWindow _owner )
1904                 {
1905                         _this = _owner;
1906                         this.el = new Gtk.PropertyExpression( typeof(WindowState), null, "file_name" );
1907
1908                         // my vars (dec)
1909
1910                         // set gobject values
1911                 }
1912
1913                 // user defined functions
1914         }
1915
1916
1917
1918
1919         public class Xcls_projcol : Object
1920         {
1921                 public Gtk.ColumnViewColumn el;
1922                 private Xcls_MainWindow  _this;
1923
1924
1925                         // my vars (def)
1926
1927                 // ctor
1928                 public Xcls_projcol(Xcls_MainWindow _owner )
1929                 {
1930                         _this = _owner;
1931                         _this.projcol = this;
1932                         var child_1 = new Xcls_SignalListItemFactory57( _this );
1933                         child_1.ref();
1934                         this.el = new Gtk.ColumnViewColumn( "Project", child_1.el );
1935
1936                         // my vars (dec)
1937
1938                         // set gobject values
1939                         this.el.id = "projcol";
1940                         this.el.expand = true;
1941                         this.el.resizable = true;
1942                 }
1943
1944                 // user defined functions
1945         }
1946         public class Xcls_SignalListItemFactory57 : Object
1947         {
1948                 public Gtk.SignalListItemFactory el;
1949                 private Xcls_MainWindow  _this;
1950
1951
1952                         // my vars (def)
1953
1954                 // ctor
1955                 public Xcls_SignalListItemFactory57(Xcls_MainWindow _owner )
1956                 {
1957                         _this = _owner;
1958                         this.el = new Gtk.SignalListItemFactory();
1959
1960                         // my vars (dec)
1961
1962                         // set gobject values
1963
1964                         //listeners
1965                         this.el.setup.connect( (listitem) => {
1966                                 var lbl = new Gtk.Label("");
1967                                 (listitem as Gtk.ListItem).set_child(lbl);
1968                                 lbl.justify = Gtk.Justification.LEFT;
1969                                 lbl.xalign = 0;
1970                                 lbl.use_markup = true;
1971                                 lbl.ellipsize = Pango.EllipsizeMode.START;
1972                           
1973                                 (listitem as Gtk.ListItem).activatable = true;
1974                         });
1975                         this.el.bind.connect( (listitem) => {
1976                                  var lb = (Gtk.Label) (listitem as Gtk.ListItem).get_child();
1977                                  var item =  (listitem as Gtk.ListItem).get_item() as WindowState;
1978                                  
1979                                  lb.label = item.project.name;
1980                         
1981                         
1982                           
1983                         
1984                         });
1985                 }
1986
1987                 // user defined functions
1988         }
1989
1990
1991         public class Xcls_filecol : Object
1992         {
1993                 public Gtk.ColumnViewColumn el;
1994                 private Xcls_MainWindow  _this;
1995
1996
1997                         // my vars (def)
1998
1999                 // ctor
2000                 public Xcls_filecol(Xcls_MainWindow _owner )
2001                 {
2002                         _this = _owner;
2003                         _this.filecol = this;
2004                         var child_1 = new Xcls_SignalListItemFactory59( _this );
2005                         child_1.ref();
2006                         this.el = new Gtk.ColumnViewColumn( "File", child_1.el );
2007
2008                         // my vars (dec)
2009
2010                         // set gobject values
2011                         this.el.id = "filecol";
2012                         this.el.expand = true;
2013                         this.el.resizable = true;
2014                 }
2015
2016                 // user defined functions
2017         }
2018         public class Xcls_SignalListItemFactory59 : Object
2019         {
2020                 public Gtk.SignalListItemFactory el;
2021                 private Xcls_MainWindow  _this;
2022
2023
2024                         // my vars (def)
2025
2026                 // ctor
2027                 public Xcls_SignalListItemFactory59(Xcls_MainWindow _owner )
2028                 {
2029                         _this = _owner;
2030                         this.el = new Gtk.SignalListItemFactory();
2031
2032                         // my vars (dec)
2033
2034                         // set gobject values
2035
2036                         //listeners
2037                         this.el.setup.connect( (listitem) => {
2038                                 var lbl = new Gtk.Label("");
2039                                 (listitem as Gtk.ListItem).set_child(lbl);
2040                                 lbl.justify = Gtk.Justification.LEFT;
2041                                 lbl.xalign = 0;
2042                                 lbl.use_markup = true;
2043                                 lbl.ellipsize = Pango.EllipsizeMode.START;
2044                           
2045                                 (listitem as Gtk.ListItem).activatable = true;
2046                         });
2047                         this.el.bind.connect( (listitem) => {
2048                          var lb = (Gtk.Label) (listitem as Gtk.ListItem).get_child();
2049                          var item =  (listitem as Gtk.ListItem).get_item() as WindowState;
2050                          
2051                          lb.label = item.file.relpath;
2052                         
2053                         
2054                           
2055                         
2056                         });
2057                 }
2058
2059                 // user defined functions
2060         }
2061
2062
2063
2064
2065         public class Xcls_ScrolledWindow60 : Object
2066         {
2067                 public Gtk.ScrolledWindow el;
2068                 private Xcls_MainWindow  _this;
2069
2070
2071                         // my vars (def)
2072
2073                 // ctor
2074                 public Xcls_ScrolledWindow60(Xcls_MainWindow _owner )
2075                 {
2076                         _this = _owner;
2077                         this.el = new Gtk.ScrolledWindow();
2078
2079                         // my vars (dec)
2080
2081                         // set gobject values
2082                         this.el.hexpand = true;
2083                         this.el.vexpand = true;
2084                         var child_1 = new Xcls_ColumnView61( _this );
2085                         this.el.child = child_1.el;
2086                 }
2087
2088                 // user defined functions
2089         }
2090         public class Xcls_ColumnView61 : Object
2091         {
2092                 public Gtk.ColumnView el;
2093                 private Xcls_MainWindow  _this;
2094
2095
2096                         // my vars (def)
2097
2098                 // ctor
2099                 public Xcls_ColumnView61(Xcls_MainWindow _owner )
2100                 {
2101                         _this = _owner;
2102                         var child_1 = new Xcls_SingleSelection62( _this );
2103                         child_1.ref();
2104                         this.el = new Gtk.ColumnView( child_1.el );
2105
2106                         // my vars (dec)
2107
2108                         // set gobject values
2109                         this.el.hexpand = true;
2110                         this.el.vexpand = true;
2111                         var child_2 = new Xcls_ColumnViewColumn70( _this );
2112                         child_2.ref();
2113                         this.el.append_column( child_2.el );
2114                         var child_3 = new Xcls_ColumnViewColumn72( _this );
2115                         child_3.ref();
2116                         this.el.append_column ( child_3.el  );
2117                 }
2118
2119                 // user defined functions
2120         }
2121         public class Xcls_SingleSelection62 : Object
2122         {
2123                 public Gtk.SingleSelection el;
2124                 private Xcls_MainWindow  _this;
2125
2126
2127                         // my vars (def)
2128
2129                 // ctor
2130                 public Xcls_SingleSelection62(Xcls_MainWindow _owner )
2131                 {
2132                         _this = _owner;
2133                         var child_1 = new Xcls_SortListModel63( _this );
2134                         child_1.ref();
2135                         this.el = new Gtk.SingleSelection( child_1.el );
2136
2137                         // my vars (dec)
2138
2139                         // set gobject values
2140                         this.el.can_unselect = true;
2141                         this.el.autoselect = false;
2142                 }
2143
2144                 // user defined functions
2145         }
2146         public class Xcls_SortListModel63 : Object
2147         {
2148                 public Gtk.SortListModel el;
2149                 private Xcls_MainWindow  _this;
2150
2151
2152                         // my vars (def)
2153
2154                 // ctor
2155                 public Xcls_SortListModel63(Xcls_MainWindow _owner )
2156                 {
2157                         _this = _owner;
2158                         var child_1 = new Xcls_FilterListModel64( _this );
2159                         child_1.ref();
2160                         var child_2 = new Xcls_StringSorter68( _this );
2161                         child_2.ref();
2162                         this.el = new Gtk.SortListModel( child_1.el, child_2.el );
2163
2164                         // my vars (dec)
2165
2166                         // set gobject values
2167                 }
2168
2169                 // user defined functions
2170         }
2171         public class Xcls_FilterListModel64 : Object
2172         {
2173                 public Gtk.FilterListModel el;
2174                 private Xcls_MainWindow  _this;
2175
2176
2177                         // my vars (def)
2178
2179                 // ctor
2180                 public Xcls_FilterListModel64(Xcls_MainWindow _owner )
2181                 {
2182                         _this = _owner;
2183                         new Xcls_histmodel( _this );
2184                         new Xcls_histsearch( _this );
2185                         this.el = new Gtk.FilterListModel( _this.histmodel.el, _this.histsearch.el );
2186
2187                         // my vars (dec)
2188
2189                         // set gobject values
2190                 }
2191
2192                 // user defined functions
2193         }
2194         public class Xcls_histmodel : Object
2195         {
2196                 public GLib.ListStore el;
2197                 private Xcls_MainWindow  _this;
2198
2199
2200                         // my vars (def)
2201
2202                 // ctor
2203                 public Xcls_histmodel(Xcls_MainWindow _owner )
2204                 {
2205                         _this = _owner;
2206                         _this.histmodel = this;
2207                         this.el = new GLib.ListStore( typeof(WindowState) );
2208
2209                         // my vars (dec)
2210
2211                         // set gobject values
2212                 }
2213
2214                 // user defined functions
2215         }
2216
2217         public class Xcls_histsearch : Object
2218         {
2219                 public Gtk.StringFilter el;
2220                 private Xcls_MainWindow  _this;
2221
2222
2223                         // my vars (def)
2224
2225                 // ctor
2226                 public Xcls_histsearch(Xcls_MainWindow _owner )
2227                 {
2228                         _this = _owner;
2229                         _this.histsearch = this;
2230                         var child_1 = new Xcls_PropertyExpression67( _this );
2231                         child_1.ref();
2232                         this.el = new Gtk.StringFilter( child_1.el );
2233
2234                         // my vars (dec)
2235
2236                         // set gobject values
2237                 }
2238
2239                 // user defined functions
2240         }
2241         public class Xcls_PropertyExpression67 : Object
2242         {
2243                 public Gtk.PropertyExpression el;
2244                 private Xcls_MainWindow  _this;
2245
2246
2247                         // my vars (def)
2248
2249                 // ctor
2250                 public Xcls_PropertyExpression67(Xcls_MainWindow _owner )
2251                 {
2252                         _this = _owner;
2253                         this.el = new Gtk.PropertyExpression( typeof(WindowState), null, "file_name" );
2254
2255                         // my vars (dec)
2256
2257                         // set gobject values
2258                 }
2259
2260                 // user defined functions
2261         }
2262
2263
2264
2265         public class Xcls_StringSorter68 : Object
2266         {
2267                 public Gtk.StringSorter el;
2268                 private Xcls_MainWindow  _this;
2269
2270
2271                         // my vars (def)
2272
2273                 // ctor
2274                 public Xcls_StringSorter68(Xcls_MainWindow _owner )
2275                 {
2276                         _this = _owner;
2277                         var child_1 = new Xcls_PropertyExpression69( _this );
2278                         child_1.ref();
2279                         this.el = new Gtk.StringSorter( child_1.el );
2280
2281                         // my vars (dec)
2282
2283                         // set gobject values
2284                         this.el.ignore_case = true;
2285                 }
2286
2287                 // user defined functions
2288         }
2289         public class Xcls_PropertyExpression69 : Object
2290         {
2291                 public Gtk.PropertyExpression el;
2292                 private Xcls_MainWindow  _this;
2293
2294
2295                         // my vars (def)
2296
2297                 // ctor
2298                 public Xcls_PropertyExpression69(Xcls_MainWindow _owner )
2299                 {
2300                         _this = _owner;
2301                         this.el = new Gtk.PropertyExpression( typeof(WindowState), null, "file_name" );
2302
2303                         // my vars (dec)
2304
2305                         // set gobject values
2306                 }
2307
2308                 // user defined functions
2309         }
2310
2311
2312
2313
2314         public class Xcls_ColumnViewColumn70 : Object
2315         {
2316                 public Gtk.ColumnViewColumn el;
2317                 private Xcls_MainWindow  _this;
2318
2319
2320                         // my vars (def)
2321
2322                 // ctor
2323                 public Xcls_ColumnViewColumn70(Xcls_MainWindow _owner )
2324                 {
2325                         _this = _owner;
2326                         var child_1 = new Xcls_SignalListItemFactory71( _this );
2327                         child_1.ref();
2328                         this.el = new Gtk.ColumnViewColumn( "Project", child_1.el );
2329
2330                         // my vars (dec)
2331
2332                         // set gobject values
2333                         this.el.expand = true;
2334                         this.el.resizable = true;
2335                 }
2336
2337                 // user defined functions
2338         }
2339         public class Xcls_SignalListItemFactory71 : Object
2340         {
2341                 public Gtk.SignalListItemFactory el;
2342                 private Xcls_MainWindow  _this;
2343
2344
2345                         // my vars (def)
2346
2347                 // ctor
2348                 public Xcls_SignalListItemFactory71(Xcls_MainWindow _owner )
2349                 {
2350                         _this = _owner;
2351                         this.el = new Gtk.SignalListItemFactory();
2352
2353                         // my vars (dec)
2354
2355                         // set gobject values
2356
2357                         //listeners
2358                         this.el.setup.connect( (listitem) => {
2359                                 var lbl = new Gtk.Label("");
2360                                 (listitem as Gtk.ListItem).set_child(lbl);
2361                                 lbl.justify = Gtk.Justification.LEFT;
2362                                 lbl.xalign = 1;
2363                                 lbl.use_markup = true;
2364                                 lbl.ellipsize = Pango.EllipsizeMode.START;
2365                           
2366                                 (listitem as Gtk.ListItem).activatable = true;
2367                         });
2368                         this.el.bind.connect( (listitem) => {
2369                                  var lb = (Gtk.Label) (listitem as Gtk.ListItem).get_child();
2370                                  var item =  (listitem as Gtk.ListItem).get_item() as WindowState;
2371                                  
2372                                  lb.label = item.project.name;
2373                         
2374                         
2375                           
2376                         
2377                         });
2378                 }
2379
2380                 // user defined functions
2381         }
2382
2383
2384         public class Xcls_ColumnViewColumn72 : Object
2385         {
2386                 public Gtk.ColumnViewColumn el;
2387                 private Xcls_MainWindow  _this;
2388
2389
2390                         // my vars (def)
2391
2392                 // ctor
2393                 public Xcls_ColumnViewColumn72(Xcls_MainWindow _owner )
2394                 {
2395                         _this = _owner;
2396                         var child_1 = new Xcls_SignalListItemFactory73( _this );
2397                         child_1.ref();
2398                         this.el = new Gtk.ColumnViewColumn( "File", child_1.el );
2399
2400                         // my vars (dec)
2401
2402                         // set gobject values
2403                         this.el.expand = true;
2404                         this.el.resizable = true;
2405                 }
2406
2407                 // user defined functions
2408         }
2409         public class Xcls_SignalListItemFactory73 : Object
2410         {
2411                 public Gtk.SignalListItemFactory el;
2412                 private Xcls_MainWindow  _this;
2413
2414
2415                         // my vars (def)
2416
2417                 // ctor
2418                 public Xcls_SignalListItemFactory73(Xcls_MainWindow _owner )
2419                 {
2420                         _this = _owner;
2421                         this.el = new Gtk.SignalListItemFactory();
2422
2423                         // my vars (dec)
2424
2425                         // set gobject values
2426
2427                         //listeners
2428                         this.el.setup.connect( (listitem) => {
2429                                 var lbl = new Gtk.Label("");
2430                                 (listitem as Gtk.ListItem).set_child(lbl);
2431                                 lbl.justify = Gtk.Justification.LEFT;
2432                                 lbl.xalign = 1;
2433                                 lbl.use_markup = true;
2434                                 lbl.ellipsize = Pango.EllipsizeMode.START;
2435                           
2436                                 (listitem as Gtk.ListItem).activatable = true;
2437                         });
2438                         this.el.bind.connect( (listitem) => {
2439                          var lb = (Gtk.Label) (listitem as Gtk.ListItem).get_child();
2440                          var item =  (listitem as Gtk.ListItem).get_item() as WindowState;
2441                          
2442                          lb.label = item.file.relpath;
2443                         
2444                         
2445                           
2446                         
2447                         });
2448                 }
2449
2450                 // user defined functions
2451         }
2452
2453
2454
2455
2456
2457
2458
2459 }