Commits

Thibaut Colar committed 61cef46

tets on windows the doc pane and restored the docPane "open file in editor" command

  • Participants
  • Parent commits 3aae9ea

Comments (0)

Files changed (1)

File src/brie/fan/widget/HelpPane.fan

           render(search.text)
         }
       }
-      top = GridPane
+      top = EdgePane
       {
-        numCols = 3
-        Button{image = gfx::Image(`fan://icons/x16/arrowLeft.png`);
-        onAction.add |Event e|
+        top = GridPane
+        {
+          numCols = 3
+          Button{image = gfx::Image(`fan://icons/x16/arrowLeft.png`);
+          onAction.add |Event e|
+            {
+              browser.back
+            }
+          },
+          Button{image = gfx::Image(`fan://camembert/res/home.png`, false);
+          onAction.add |Event e| {render("")}},
+          search,
+        }
+        center = Button
+        {
+          it.text = "Open in Editor"
+          onAction.add |Event e|
           {
-            browser.back
-            /*if( ! pageHistory.isEmpty) pageHistory.pop()
-            if( ! pageHistory.isEmpty)
-            {
-              render(pageHistory.pop())
-            }*/
+            goto(search.text)
           }
-        },
-        Button{image = gfx::Image(`fan://camembert/res/home.png`, false);
-        onAction.add |Event e| {render("")}},
-        search,
+        }
       }
       center = BorderPane
       {
       show
   }
 
+  Void goto(Str where)
+  {
+    if(where.contains("::"))
+    {
+      if(where.contains("#"))
+        where = where[0 ..< where.index("#")]
+      info := sys.index.matchTypes(where, MatchKind.exact).first
+      if(info != null)
+      {
+        try
+        {
+         frame.goto(Item(info))
+        }
+        catch(Err err){}
+      }
+    }
+  }
+
   private Void show()
   {
     this.visible = true