resources/RooUsage.txt
[app.Builder.js] / src / Builder4 / MainWindow.vala
index 1813afd..d62b8db 100644 (file)
@@ -14,6 +14,8 @@ public class Xcls_MainWindow : Object
     }
     public Xcls_headerbar headerbar;
     public Xcls_topbarmenu topbarmenu;
+    public Xcls_openbtn openbtn;
+    public Xcls_openbackbtn openbackbtn;
     public Xcls_vbox vbox;
     public Xcls_mainpane mainpane;
     public Xcls_leftpane leftpane;
@@ -28,7 +30,6 @@ public class Xcls_MainWindow : Object
     public Xcls_projecteditview projecteditview;
     public Xcls_buttonlayout buttonlayout;
     public Xcls_backbutton backbutton;
-    public Xcls_projectbutton projectbutton;
     public Xcls_editfilebutton editfilebutton;
     public Xcls_projecteditbutton projecteditbutton;
     public Xcls_objectshowbutton objectshowbutton;
@@ -38,6 +39,9 @@ public class Xcls_MainWindow : Object
     public Xcls_addfilebutton addfilebutton;
     public Xcls_delprojectbutton delprojectbutton;
     public Xcls_statusbar statusbar;
+    public Xcls_search_entry search_entry;
+    public Xcls_search_results search_results;
+    public Xcls_statusbar_compilestatus_label statusbar_compilestatus_label;
     public Xcls_statusbar_errors statusbar_errors;
     public Xcls_statusbar_warnings statusbar_warnings;
     public Xcls_statusbar_depricated statusbar_depricated;
@@ -75,6 +79,11 @@ public class Xcls_MainWindow : Object
         // init method
 
         //this.el.show_all();
+            //try {
+                 this.el.set_icon_name("roobuilder");
+               //} catch (Exception e) {
+               //      print("no icon found");
+        //     }
 
         //listeners
         this.el.delete_event.connect( (   event) => {
@@ -104,9 +113,46 @@ public class Xcls_MainWindow : Object
             Resources.singleton().checkResources();
         
         });
+        this.el.key_release_event.connect( (event) => {
+            
+            if (this.search_entry.el.is_visible()) {
+                       if (event.keyval == Gdk.Key.f && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
+                           print("SAVE: ctrl-f  pressed");
+                               this.search_entry.el.grab_focus();
+                           return false;
+                       }
+                       
+                       if (event.keyval == Gdk.Key.g && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
+                           print("SAVE: ctrl-g  pressed");
+                               this.search_entry.forwardSearch(true);
+                           return false;
+                       }
+                       
+               }    
+               
+               if (event.keyval == Gdk.Key.n && (event.state & Gdk.ModifierType.CONTROL_MASK ) > 0 ) {
+                       print("SAVE: ctrl-n  pressed");
+                       this.openNewWindow();
+                       return false;
+               }
+               
+           // print(event.key.keyval)
+            
+            return false;
+        
+        });
     }
 
     // user defined functions
+    public void openNewWindow () {
+       Xcls_MainWindow.singleton().no_windows++;
+            var w = new Xcls_MainWindow();
+            w.ref();
+    
+            w.el.show_all();
+            w.initChildren();
+            w.windowstate.switchState(WindowState.State.FILES);
+    }
     public        void initChildren () {
         // this needs putting in a better place..
         this.windowstate = new WindowState(this);
@@ -178,6 +224,12 @@ public class Xcls_MainWindow : Object
             var child_0 = new Xcls_MenuButton4( _this );
             child_0.ref();
             this.el.add (  child_0.el  );
+            var child_1 = new Xcls_openbtn( _this );
+            child_1.ref();
+            this.el.add (  child_1.el  );
+            var child_2 = new Xcls_openbackbtn( _this );
+            child_2.ref();
+            this.el.add (  child_2.el  );
         }
 
         // user defined functions
@@ -271,13 +323,7 @@ public class Xcls_MainWindow : Object
 
             //listeners
             this.el.activate.connect( ( ) => {
-                    Xcls_MainWindow.singleton().no_windows++;
-                    var w = new Xcls_MainWindow();
-                    w.ref();
-            
-                    w.el.show_all();
-                    w.initChildren();
-                    w.windowstate.switchState(WindowState.State.FILES);
+                   _this.openNewWindow();
             });
         }
 
@@ -387,6 +433,121 @@ public class Xcls_MainWindow : Object
     }
 
 
+    public class Xcls_openbtn : Object
+    {
+        public Gtk.Button el;
+        private Xcls_MainWindow  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_openbtn(Xcls_MainWindow _owner )
+        {
+            _this = _owner;
+            _this.openbtn = this;
+            this.el = new Gtk.Button();
+
+            // my vars (dec)
+
+            // set gobject values
+            var child_0 = new Xcls_Image12( _this );
+            child_0.ref();
+            this.el.set_image (  child_0.el  );
+
+            //listeners
+            this.el.clicked.connect( ( ) => {
+               _this.windowstate.switchState(WindowState.State.FILES);
+                  
+            
+            });
+        }
+
+        // user defined functions
+    }
+    public class Xcls_Image12 : Object
+    {
+        public Gtk.Image el;
+        private Xcls_MainWindow  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_Image12(Xcls_MainWindow _owner )
+        {
+            _this = _owner;
+            this.el = new Gtk.Image();
+
+            // my vars (dec)
+
+            // set gobject values
+            this.el.icon_name = "document-open";
+        }
+
+        // user defined functions
+    }
+
+
+    public class Xcls_openbackbtn : Object
+    {
+        public Gtk.Button el;
+        private Xcls_MainWindow  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_openbackbtn(Xcls_MainWindow _owner )
+        {
+            _this = _owner;
+            _this.openbackbtn = this;
+            this.el = new Gtk.Button();
+
+            // my vars (dec)
+
+            // set gobject values
+            this.el.tooltip_text = "Back";
+            this.el.visible = false;
+            var child_0 = new Xcls_Image14( _this );
+            child_0.ref();
+            this.el.set_image (  child_0.el  );
+
+            //listeners
+            this.el.clicked.connect( ( ) => {
+              
+                _this.windowstate.switchState(WindowState.State.PREVIEW);
+                
+            
+            });
+        }
+
+        // user defined functions
+    }
+    public class Xcls_Image14 : Object
+    {
+        public Gtk.Image el;
+        private Xcls_MainWindow  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_Image14(Xcls_MainWindow _owner )
+        {
+            _this = _owner;
+            this.el = new Gtk.Image();
+
+            // my vars (dec)
+
+            // set gobject values
+            this.el.icon_name = "go-previous";
+        }
+
+        // user defined functions
+    }
+
+
 
 
     public class Xcls_vbox : Object
@@ -442,7 +603,7 @@ public class Xcls_MainWindow : Object
             var child_0 = new Xcls_leftpane( _this );
             child_0.ref();
             this.el.add1 (  child_0.el  );
-            var child_1 = new Xcls_Box17( _this );
+            var child_1 = new Xcls_Box21( _this );
             child_1.ref();
             this.el.add2 (  child_1.el  );
         }
@@ -550,7 +711,7 @@ public class Xcls_MainWindow : Object
 
 
 
-    public class Xcls_Box17 : Object
+    public class Xcls_Box21 : Object
     {
         public Gtk.Box el;
         private Xcls_MainWindow  _this;
@@ -559,7 +720,7 @@ public class Xcls_MainWindow : Object
             // my vars (def)
 
         // ctor
-        public Xcls_Box17(Xcls_MainWindow _owner )
+        public Xcls_Box21(Xcls_MainWindow _owner )
         {
             _this = _owner;
             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
@@ -872,39 +1033,36 @@ public class Xcls_MainWindow : Object
             // my vars (dec)
 
             // set gobject values
-            var child_0 = new Xcls_BoxLayout25( _this );
+            var child_0 = new Xcls_BoxLayout29( _this );
             child_0.ref();
             this.el.layout_manager = child_0.el;
             var child_1 = new Xcls_backbutton( _this );
             child_1.ref();
             this.el.add_child (  child_1.el  );
-            var child_2 = new Xcls_projectbutton( _this );
+            var child_2 = new Xcls_editfilebutton( _this );
             child_2.ref();
             this.el.add_child (  child_2.el  );
-            var child_3 = new Xcls_editfilebutton( _this );
+            var child_3 = new Xcls_projecteditbutton( _this );
             child_3.ref();
             this.el.add_child (  child_3.el  );
-            var child_4 = new Xcls_projecteditbutton( _this );
+            var child_4 = new Xcls_objectshowbutton( _this );
             child_4.ref();
             this.el.add_child (  child_4.el  );
-            var child_5 = new Xcls_objectshowbutton( _this );
+            var child_5 = new Xcls_addpropbutton( _this );
             child_5.ref();
             this.el.add_child (  child_5.el  );
-            var child_6 = new Xcls_addpropbutton( _this );
+            var child_6 = new Xcls_addlistenerbutton( _this );
             child_6.ref();
             this.el.add_child (  child_6.el  );
-            var child_7 = new Xcls_addlistenerbutton( _this );
+            var child_7 = new Xcls_addprojectbutton( _this );
             child_7.ref();
             this.el.add_child (  child_7.el  );
-            var child_8 = new Xcls_addprojectbutton( _this );
+            var child_8 = new Xcls_addfilebutton( _this );
             child_8.ref();
             this.el.add_child (  child_8.el  );
-            var child_9 = new Xcls_addfilebutton( _this );
+            var child_9 = new Xcls_delprojectbutton( _this );
             child_9.ref();
             this.el.add_child (  child_9.el  );
-            var child_10 = new Xcls_delprojectbutton( _this );
-            child_10.ref();
-            this.el.add_child (  child_10.el  );
 
             // init method
 
@@ -929,7 +1087,7 @@ public class Xcls_MainWindow : Object
 
         // user defined functions
     }
-    public class Xcls_BoxLayout25 : Object
+    public class Xcls_BoxLayout29 : Object
     {
         public Clutter.BoxLayout el;
         private Xcls_MainWindow  _this;
@@ -938,7 +1096,7 @@ public class Xcls_MainWindow : Object
             // my vars (def)
 
         // ctor
-        public Xcls_BoxLayout25(Xcls_MainWindow _owner )
+        public Xcls_BoxLayout29(Xcls_MainWindow _owner )
         {
             _this = _owner;
             this.el = new Clutter.BoxLayout();
@@ -969,123 +1127,6 @@ public class Xcls_MainWindow : Object
 
             // my vars (dec)
 
-            // set gobject values
-            var child_0 = new Xcls_Actor27( _this );
-            child_0.ref();
-            this.el.add_child (  child_0.el  );
-
-            // init method
-
-            this.el.set_size(50,50);
-        }
-
-        // user defined functions
-    }
-    public class Xcls_Actor27 : Object
-    {
-        public GtkClutter.Actor el;
-        private Xcls_MainWindow  _this;
-
-
-            // my vars (def)
-
-        // ctor
-        public Xcls_Actor27(Xcls_MainWindow _owner )
-        {
-            _this = _owner;
-            this.el = new GtkClutter.Actor();
-
-            // my vars (dec)
-
-            // set gobject values
-            var child_0 = new Xcls_Button28( _this );
-            child_0.ref();
-
-            // init method
-
-            ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
-        }
-
-        // user defined functions
-    }
-    public class Xcls_Button28 : Object
-    {
-        public Gtk.Button el;
-        private Xcls_MainWindow  _this;
-
-
-            // my vars (def)
-
-        // ctor
-        public Xcls_Button28(Xcls_MainWindow _owner )
-        {
-            _this = _owner;
-            this.el = new Gtk.Button();
-
-            // my vars (dec)
-
-            // set gobject values
-            this.el.width_request = 50;
-            this.el.height_request = 50;
-            this.el.tooltip_text = "Back";
-            var child_0 = new Xcls_Image29( _this );
-            child_0.ref();
-            this.el.set_image (  child_0.el  );
-
-            //listeners
-            this.el.clicked.connect( ( ) => {
-              
-                _this.windowstate.switchState(WindowState.State.PREVIEW);
-                
-            
-            });
-        }
-
-        // user defined functions
-    }
-    public class Xcls_Image29 : Object
-    {
-        public Gtk.Image el;
-        private Xcls_MainWindow  _this;
-
-
-            // my vars (def)
-
-        // ctor
-        public Xcls_Image29(Xcls_MainWindow _owner )
-        {
-            _this = _owner;
-            this.el = new Gtk.Image();
-
-            // my vars (dec)
-
-            // set gobject values
-            this.el.icon_name = "go-previous";
-        }
-
-        // user defined functions
-    }
-
-
-
-
-    public class Xcls_projectbutton : Object
-    {
-        public Clutter.Actor el;
-        private Xcls_MainWindow  _this;
-
-
-            // my vars (def)
-
-        // ctor
-        public Xcls_projectbutton(Xcls_MainWindow _owner )
-        {
-            _this = _owner;
-            _this.projectbutton = this;
-            this.el = new Clutter.Actor();
-
-            // my vars (dec)
-
             // set gobject values
             var child_0 = new Xcls_Actor31( _this );
             child_0.ref();
@@ -1144,14 +1185,20 @@ public class Xcls_MainWindow : Object
             // set gobject values
             this.el.width_request = 50;
             this.el.height_request = 50;
+            this.el.tooltip_text = "Back";
             var child_0 = new Xcls_Image33( _this );
             child_0.ref();
             this.el.set_image (  child_0.el  );
 
             //listeners
             this.el.clicked.connect( ( ) => {
-               _this.windowstate.switchState(WindowState.State.FILES);
-                  
+               if (_this.windowstate.state == WindowState.State.FILEPROJECT) {
+                
+                    _this.windowstate.switchState(WindowState.State.FILES);
+                 } else { 
+                   _this.windowstate.switchState(WindowState.State.PREVIEW);
+                }
+                
             
             });
         }
@@ -1175,7 +1222,7 @@ public class Xcls_MainWindow : Object
             // my vars (dec)
 
             // set gobject values
-            this.el.icon_name = "document-open";
+            this.el.icon_name = "go-previous";
         }
 
         // user defined functions
@@ -1391,7 +1438,13 @@ public class Xcls_MainWindow : Object
 
             //listeners
             this.el.clicked.connect( ( ) => {
-                 _this.windowstate.switchState(WindowState.State.PROJECT);
+                 
+                 if (_this.windowstate.state == WindowState.State.FILES) {
+                 
+                    _this.windowstate.switchState(WindowState.State.FILEPROJECT);
+                 } else {
+                    _this.windowstate.switchState(WindowState.State.PROJECT);
+                }     
                
             
             
@@ -2004,19 +2057,20 @@ public class Xcls_MainWindow : Object
             //listeners
             this.el.clicked.connect( () => {
                 // create a new file in project..
-                
+                print("add file selected\n");
                 // what's the currently selected project...
                 var proj = _this.windowstate.left_projects.getSelectedProject();
                 
                 if (proj == null) {
+                       print("no project selected?\n");
                     return  ;
                 }
                 
-                
+                print("creating file?");
                 
                 var f = JsRender.JsRender.factory(proj.xtype,  proj, "");
                 _this.project = proj;
-                
+                    print("showing popup?");
                  _this.windowstate.file_details.show(
                    f, this.el
                 );
@@ -2221,9 +2275,12 @@ public class Xcls_MainWindow : Object
             var child_1 = new Xcls_statusbar( _this );
             child_1.ref();
             this.el.pack_start (  child_1.el , true,true,0 );
-            var child_2 = new Xcls_MenuBar69( _this );
+            var child_2 = new Xcls_search_entry( _this );
             child_2.ref();
-            this.el.pack_end (  child_2.el , false,true,0 );
+            this.el.pack_start (  child_2.el , false,true,0 );
+            var child_3 = new Xcls_MenuBar70( _this );
+            child_3.ref();
+            this.el.pack_end (  child_3.el , false,true,0 );
         }
 
         // user defined functions
@@ -2294,7 +2351,102 @@ public class Xcls_MainWindow : Object
         // user defined functions
     }
 
-    public class Xcls_MenuBar69 : Object
+    public class Xcls_search_entry : Object
+    {
+        public Gtk.SearchEntry el;
+        private Xcls_MainWindow  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_search_entry(Xcls_MainWindow _owner )
+        {
+            _this = _owner;
+            _this.search_entry = this;
+            this.el = new Gtk.SearchEntry();
+
+            // my vars (dec)
+
+            // set gobject values
+
+            // init method
+
+            var description =   Pango.FontDescription.from_string("monospace");
+               description.set_size(8000);
+                this.el.override_font(description);
+
+            //listeners
+            this.el.key_press_event.connect( (event) => {
+                
+               if (event.keyval == Gdk.Key.Return) {
+                       this.forwardSearch(false);
+                   return true;
+            
+               }    
+               // print(event.key.keyval)
+                
+                return false;
+            
+            });
+            this.el.changed.connect( () => {
+               if (this.el.text == "") {
+                       _this.search_results.el.hide();
+                       return;
+               }
+               var res = 0;
+               switch(_this.windowstate.state) {
+                       case WindowState.State.CODEONLY:
+                       case WindowState.State.CODE:
+                               // search the code being edited..
+                               res = _this.windowstate.code_editor.search(this.el.text);
+                               
+                               break;
+                       case WindowState.State.PREVIEW:
+                               if (_this.windowstate.file.xtype == "Gtk") {
+                                        res = _this.windowstate.window_gladeview.search(this.el.text);
+                               } else { 
+                                        res = _this.windowstate.window_rooview.search(this.el.text);                   
+                               }
+                       
+                       
+                               break;
+               }
+               _this.search_results.el.show();
+               if (res > 0) {
+                       _this.search_results.el.label = "%d Matches".printf(res);
+               } else {
+                       _this.search_results.el.label = "No Matches";
+               }
+                       
+               
+               
+            });
+        }
+
+        // user defined functions
+        public void forwardSearch (bool change_focus) {
+               switch(_this.windowstate.state) {
+                       case WindowState.State.CODEONLY:
+                       case WindowState.State.CODE:
+                               // search the code being edited..
+                               _this.windowstate.code_editor.forwardSearch(change_focus);
+                               
+                               break;
+                       case WindowState.State.PREVIEW:
+                               if (_this.windowstate.file.xtype == "Gtk") {
+                                       _this.windowstate.window_gladeview.forwardSearch(change_focus);
+                               } else { 
+                                        _this.windowstate.window_rooview.forwardSearch(change_focus);
+                               }
+                       
+                               break;
+               }
+               
+        }
+    }
+
+    public class Xcls_MenuBar70 : Object
     {
         public Gtk.MenuBar el;
         private Xcls_MainWindow  _this;
@@ -2303,7 +2455,7 @@ public class Xcls_MainWindow : Object
             // my vars (def)
 
         // ctor
-        public Xcls_MenuBar69(Xcls_MainWindow _owner )
+        public Xcls_MenuBar70(Xcls_MainWindow _owner )
         {
             _this = _owner;
             this.el = new Gtk.MenuBar();
@@ -2311,26 +2463,96 @@ public class Xcls_MainWindow : Object
             // my vars (dec)
 
             // set gobject values
-            var child_0 = new Xcls_MenuItem70( _this );
+            var child_0 = new Xcls_search_results( _this );
             child_0.ref();
             this.el.add (  child_0.el  );
-            var child_1 = new Xcls_statusbar_errors( _this );
+            var child_1 = new Xcls_statusbar_compilestatus_label( _this );
             child_1.ref();
             this.el.add (  child_1.el  );
-            var child_2 = new Xcls_statusbar_warnings( _this );
+            var child_2 = new Xcls_statusbar_errors( _this );
             child_2.ref();
             this.el.add (  child_2.el  );
-            var child_3 = new Xcls_statusbar_depricated( _this );
+            var child_3 = new Xcls_statusbar_warnings( _this );
             child_3.ref();
             this.el.add (  child_3.el  );
-            var child_4 = new Xcls_statusbar_run( _this );
+            var child_4 = new Xcls_statusbar_depricated( _this );
             child_4.ref();
             this.el.add (  child_4.el  );
+            var child_5 = new Xcls_statusbar_run( _this );
+            child_5.ref();
+            this.el.add (  child_5.el  );
+        }
+
+        // user defined functions
+    }
+    public class Xcls_search_results : Object
+    {
+        public Gtk.ImageMenuItem el;
+        private Xcls_MainWindow  _this;
+
+
+            // my vars (def)
+        public Xcls_ValaCompileErrors popup;
+
+        // ctor
+        public Xcls_search_results(Xcls_MainWindow _owner )
+        {
+            _this = _owner;
+            _this.search_results = this;
+            this.el = new Gtk.ImageMenuItem();
+
+            // my vars (dec)
+
+            // set gobject values
+            this.el.always_show_image = true;
+            this.el.label = "Matches";
+            var child_0 = new Xcls_Image72( _this );
+            child_0.ref();
+            this.el.set_image (  child_0.el  );
+
+            //listeners
+            this.el.button_press_event.connect( () => {
+            /*
+                if (this.popup == null) {
+                    this.popup = new Xcls_ValaCompileErrors();
+                    this.popup.window = _this;
+                }
+               
+                
+                this.popup.show(this.notices, this.el);
+                */
+                return true;
+            });
         }
 
         // user defined functions
     }
-    public class Xcls_MenuItem70 : Object
+    public class Xcls_Image72 : Object
+    {
+        public Gtk.Image el;
+        private Xcls_MainWindow  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_Image72(Xcls_MainWindow _owner )
+        {
+            _this = _owner;
+            this.el = new Gtk.Image();
+
+            // my vars (dec)
+
+            // set gobject values
+            this.el.icon_name = "system-search";
+            this.el.sensitive = false;
+        }
+
+        // user defined functions
+    }
+
+
+    public class Xcls_statusbar_compilestatus_label : Object
     {
         public Gtk.MenuItem el;
         private Xcls_MainWindow  _this;
@@ -2339,9 +2561,10 @@ public class Xcls_MainWindow : Object
             // my vars (def)
 
         // ctor
-        public Xcls_MenuItem70(Xcls_MainWindow _owner )
+        public Xcls_statusbar_compilestatus_label(Xcls_MainWindow _owner )
         {
             _this = _owner;
+            _this.statusbar_compilestatus_label = this;
             this.el = new Gtk.MenuItem();
 
             // my vars (dec)
@@ -2376,7 +2599,7 @@ public class Xcls_MainWindow : Object
             // set gobject values
             this.el.always_show_image = true;
             this.el.label = "Errors";
-            var child_0 = new Xcls_Image72( _this );
+            var child_0 = new Xcls_Image75( _this );
             child_0.ref();
             this.el.set_image (  child_0.el  );
 
@@ -2401,7 +2624,7 @@ public class Xcls_MainWindow : Object
         
         }
     }
-    public class Xcls_Image72 : Object
+    public class Xcls_Image75 : Object
     {
         public Gtk.Image el;
         private Xcls_MainWindow  _this;
@@ -2410,7 +2633,7 @@ public class Xcls_MainWindow : Object
             // my vars (def)
 
         // ctor
-        public Xcls_Image72(Xcls_MainWindow _owner )
+        public Xcls_Image75(Xcls_MainWindow _owner )
         {
             _this = _owner;
             this.el = new Gtk.Image();
@@ -2448,7 +2671,7 @@ public class Xcls_MainWindow : Object
             // set gobject values
             this.el.always_show_image = true;
             this.el.label = "Warnings";
-            var child_0 = new Xcls_Image74( _this );
+            var child_0 = new Xcls_Image77( _this );
             child_0.ref();
             this.el.set_image (  child_0.el  );
 
@@ -2472,7 +2695,7 @@ public class Xcls_MainWindow : Object
         
         }
     }
-    public class Xcls_Image74 : Object
+    public class Xcls_Image77 : Object
     {
         public Gtk.Image el;
         private Xcls_MainWindow  _this;
@@ -2481,7 +2704,7 @@ public class Xcls_MainWindow : Object
             // my vars (def)
 
         // ctor
-        public Xcls_Image74(Xcls_MainWindow _owner )
+        public Xcls_Image77(Xcls_MainWindow _owner )
         {
             _this = _owner;
             this.el = new Gtk.Image();
@@ -2519,7 +2742,7 @@ public class Xcls_MainWindow : Object
             // set gobject values
             this.el.always_show_image = true;
             this.el.label = "Depricated";
-            var child_0 = new Xcls_Image76( _this );
+            var child_0 = new Xcls_Image79( _this );
             child_0.ref();
             this.el.set_image (  child_0.el  );
 
@@ -2544,7 +2767,7 @@ public class Xcls_MainWindow : Object
         
         }
     }
-    public class Xcls_Image76 : Object
+    public class Xcls_Image79 : Object
     {
         public Gtk.Image el;
         private Xcls_MainWindow  _this;
@@ -2553,7 +2776,7 @@ public class Xcls_MainWindow : Object
             // my vars (def)
 
         // ctor
-        public Xcls_Image76(Xcls_MainWindow _owner )
+        public Xcls_Image79(Xcls_MainWindow _owner )
         {
             _this = _owner;
             this.el = new Gtk.Image();
@@ -2589,20 +2812,26 @@ public class Xcls_MainWindow : Object
             // set gobject values
             this.el.always_show_image = true;
             this.el.label = "Run";
-            var child_0 = new Xcls_Image78( _this );
+            var child_0 = new Xcls_Image81( _this );
             child_0.ref();
             this.el.set_image (  child_0.el  );
 
             //listeners
             this.el.button_press_event.connect( () => {
+               if (_this.windowstate.file == null) {
+                       return true;
+               }
                _this.windowstate.valasource.spawnExecute(_this.windowstate.file);
-                return true;
+               
+               _this.windowstate.compile_results.show(this.el,true);
+               
+               return true;
             });
         }
 
         // user defined functions
     }
-    public class Xcls_Image78 : Object
+    public class Xcls_Image81 : Object
     {
         public Gtk.Image el;
         private Xcls_MainWindow  _this;
@@ -2611,7 +2840,7 @@ public class Xcls_MainWindow : Object
             // my vars (def)
 
         // ctor
-        public Xcls_Image78(Xcls_MainWindow _owner )
+        public Xcls_Image81(Xcls_MainWindow _owner )
         {
             _this = _owner;
             this.el = new Gtk.Image();