summaryrefslogtreecommitdiff
path: root/common.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-05 15:02:09 -0600
committerJeff Carr <[email protected]>2024-02-05 15:02:09 -0600
commita57a8b5a6348a9142088a0170a3682cdc0ecdb23 (patch)
tree618771ba9ba68d612a981b4fa0fa475304b15267 /common.go
parent8fcf5f668b182bd382b489cd19cfdcd59628b279 (diff)
prepare for protobufv0.20.0
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'common.go')
-rw-r--r--common.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/common.go b/common.go
index fd9d3b5..3196573 100644
--- a/common.go
+++ b/common.go
@@ -99,7 +99,7 @@ func (n *Node) Bool() bool {
default:
}
- return widget.GetBool(n.value)
+ return false
}
func (n *Node) Int() int {
@@ -107,14 +107,13 @@ func (n *Node) Int() int {
return -1
}
- return widget.GetInt(n.value)
+ return -1
}
func (n *Node) SetBool(b bool) {
switch n.WidgetType {
case widget.Checkbox:
n.checked = b
- n.value = b
default:
log.Warn("WidgetType not bool", n.WidgetType, n.id)
}
@@ -123,7 +122,7 @@ func (n *Node) SetBool(b bool) {
func (n *Node) SetInt(i int) {
switch n.WidgetType {
default:
- n.value = i
+ // n.value = i
// log.Warn("WidgetType not bool", n.WidgetType, n.id)
}
}
@@ -144,7 +143,7 @@ func (n *Node) String() string {
default:
}
- return widget.GetString(n.value)
+ return widget.GetString(n.currentS)
}
func (n *Node) Strings() []string {
@@ -181,8 +180,8 @@ func (n *Node) AppendText(str string) {
if !n.Ready() {
return
}
- tmp := widget.GetString(n.value) + str
- n.value = tmp
+ tmp := n.currentS + str
+ n.newString = tmp
n.changed = true
// inform the toolkits