Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions ui/CommonPanel.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ import (
"github.com/Z-Bolt/OctoScreen/utils"
)

// OctoScreenVersion - set at compilation time.
var OctoScreenVersion = "2.7.0"

type CommonPanel struct {
UI *UI
grid *gtk.Grid
Expand Down
2 changes: 1 addition & 1 deletion ui/SystemPanel.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (this *systemPanel) initialize() {
this.octoPrintInfoBox = uiWidgets.CreateOctoPrintInfoBox(this.UI.Client, logoWidth)
this.Grid().Attach(this.octoPrintInfoBox, 0, 0, 1, 1)

this.octoScreenInfoBox = uiWidgets.CreateOctoScreenInfoBox(this.UI.Client, OctoScreenVersion)
this.octoScreenInfoBox = uiWidgets.CreateOctoScreenInfoBox(this.UI.Client, Version, Build)
this.Grid().Attach(this.octoScreenInfoBox, 1, 0, 2, 1)

this.octoScreenPluginInfoBox = uiWidgets.CreateOctoScreenPluginInfoBox(this.UI.Client, this.UI.UIState, this.UI.OctoPrintPluginIsAvailable)
Expand Down
3 changes: 3 additions & 0 deletions ui/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ import (
"github.com/Z-Bolt/OctoScreen/utils"
)

// Set at compile time via -ldflags (See: MakeFile)
var Version string
var Build string

type UI struct {
sync.Mutex
Expand Down
11 changes: 7 additions & 4 deletions uiWidgets/OctoScreenInfoBox.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package uiWidgets

import (
// "fmt"
"strings"
//"strings"

"github.com/Z-Bolt/OctoScreen/octoprintApis"
// "github.com/Z-Bolt/OctoScreen/octoprintApis/dataModels"
Expand All @@ -15,10 +15,12 @@ type OctoScreenInfoBox struct {

func CreateOctoScreenInfoBox(
client *octoprintApis.Client,
octoScreenVersion string,
Version string,
Build string,
) *OctoScreenInfoBox {
logoImage := utils.MustImageFromFile("logos/octoscreen-isometric-90%.png")

/*
str2 := ""
str3 := ""
stringArray := strings.Split(octoScreenVersion, " ")
Expand All @@ -29,13 +31,14 @@ func CreateOctoScreenInfoBox(
str2 = octoScreenVersion
str3 = ""
}
*/

base := CreateSystemInfoBox(
client,
logoImage,
"OctoScreen",
str2,
str3,
Version,
Build,
)

instance := &OctoScreenInfoBox {
Expand Down