File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed
Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -257,6 +257,7 @@ func loop() {
257257 if err != nil {
258258 log .Panicf ("cannot parse arguments: %s" , err )
259259 }
260+ Systray .SetConfig (configPath )
260261
261262 // Parse additional ini config if defined
262263 if len (* additionalConfig ) > 0 {
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import (
2121 "os/exec"
2222 "strings"
2323
24+ "github.com/arduino/go-paths-helper"
2425 log "github.com/sirupsen/logrus"
2526)
2627
@@ -36,6 +37,8 @@ type Systray struct {
3637 AdditionalConfig string
3738 // The path of the exe (only used in update)
3839 path string
40+ // The path of the configuration file
41+ configPath * paths.Path
3942}
4043
4144// Restart restarts the program
@@ -92,3 +95,7 @@ func (s *Systray) Update(path string) {
9295 s .path = path
9396 s .Restart ()
9497}
98+
99+ func (s * Systray ) SetConfig (configPath * paths.Path ) {
100+ s .configPath = configPath
101+ }
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ func (s *Systray) start() {
5757 // Add links
5858 mURL := systray .AddMenuItem ("Go to Arduino Create" , "Arduino Create" )
5959 mDebug := systray .AddMenuItem ("Open Debug Console" , "Debug console" )
60+ mConfig := systray .AddMenuItem ("Open Configuration" , "Config File" )
6061
6162 // Remove crash-reports
6263 mRmCrashes := systray .AddMenuItem ("Remove crash reports" , "" )
@@ -78,6 +79,8 @@ func (s *Systray) start() {
7879 _ = open .Start ("https://create.arduino.cc" )
7980 case <- mDebug .ClickedCh :
8081 _ = open .Start (s .DebugURL ())
82+ case <- mConfig .ClickedCh :
83+ _ = open .Start (s .configPath .String ())
8184 case <- mRmCrashes .ClickedCh :
8285 s .RemoveCrashes ()
8386 s .updateMenuItem (mRmCrashes , s .CrashesIsEmpty ())
You can’t perform that action at this time.
0 commit comments