src/Builder4/MainWindow.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 2 Jun 2015 13:13:31 +0000 (21:13 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 2 Jun 2015 13:13:31 +0000 (21:13 +0800)
src/Builder4/MainWindow.vala

src/Builder4/MainWindow.bjs
src/Builder4/MainWindow.vala

index 6ebbe8e..bde6319 100644 (file)
          "* pack" : "pack_start,false,true,0",
          "xtype" : "Entry",
          "$ xns" : "Gtk",
-         "| void forwardSearch" : "() {\n\n}\n"
+         "| void forwardSearch" : "() {\n\tswitch(_this.windowstate.state) {\n\t\tcase WindowState.State.CODEONLY:\n\t\tcase WindowState.State.CODE:\n\t\t\t// search the code being edited..\n\t\t\tres = _this.windowstate.code_editor.forwardSearch();\n\t\t\t\n\t\t\tbreak;\n\t\tcase WindowState.State.PREVIEW:\n\t\t\tif (_this.windowstate.file.xtype == \"Gtk\") {\n\t\t\t\t //res = _this.windowstate.window_gladeview.forwardSearch();\n\t\t\t}\n\t\t\n\t\t\n\t\t\tbreak;\n\t}\n}\n"
         },
         {
          "* pack" : "pack_end,false,true,0",
index 7880498..6021d65 100644 (file)
@@ -2379,7 +2379,21 @@ public class Xcls_MainWindow : Object
 
         // user defined functions
         public void forwardSearch () {
-        
+               switch(_this.windowstate.state) {
+                       case WindowState.State.CODEONLY:
+                       case WindowState.State.CODE:
+                               // search the code being edited..
+                               res = _this.windowstate.code_editor.forwardSearch();
+                               
+                               break;
+                       case WindowState.State.PREVIEW:
+                               if (_this.windowstate.file.xtype == "Gtk") {
+                                        //res = _this.windowstate.window_gladeview.forwardSearch();
+                               }
+                       
+                       
+                               break;
+               }
         }
     }