From 1fb2579ae625db2dbce09b8bc4aff89c82f0f904 Mon Sep 17 00:00:00 2001 From: kehiy Date: Tue, 13 Aug 2024 19:20:39 +0330 Subject: [PATCH] feat(gui): adding IsPrune to node widget --- cmd/gtk/assets/ui/widget_node.ui | 35 ++++++++++++++++++++++++++++---- cmd/gtk/widget_node.go | 2 ++ 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/cmd/gtk/assets/ui/widget_node.ui b/cmd/gtk/assets/ui/widget_node.ui index 7441c68e2..07a97c25f 100644 --- a/cmd/gtk/assets/ui/widget_node.ui +++ b/cmd/gtk/assets/ui/widget_node.ui @@ -1,5 +1,5 @@ - + @@ -48,7 +48,7 @@ 0.019999999552965164 in - + 400 True @@ -191,7 +191,7 @@ 0 - 10 + 11 @@ -204,7 +204,7 @@ 1 - 10 + 11 @@ -386,6 +386,33 @@ 6 + + + True + False + start + True + True + ✂️ Is Prune: + + + 0 + 10 + + + + + True + False + start + True + True + + + 1 + 10 + + diff --git a/cmd/gtk/widget_node.go b/cmd/gtk/widget_node.go index 66b1599ea..f518d5978 100644 --- a/cmd/gtk/widget_node.go +++ b/cmd/gtk/widget_node.go @@ -48,6 +48,7 @@ func buildWidgetNode(model *nodeModel) (*widgetNode, error) { labelNetwork := getLabelObj(builder, "id_label_network") labelNetworkID := getLabelObj(builder, "id_label_network_id") labelMoniker := getLabelObj(builder, "id_label_moniker") + labelIsPrune := getLabelObj(builder, "id_label_is_prune") cwd, err := os.Getwd() if err != nil { @@ -57,6 +58,7 @@ func buildWidgetNode(model *nodeModel) (*widgetNode, error) { labelNetwork.SetText(model.node.State().Genesis().ChainType().String()) labelNetworkID.SetText(model.node.Network().SelfID().String()) labelMoniker.SetText(model.node.Sync().Moniker()) + labelIsPrune.SetText(strconv.FormatBool(model.node.State().IsPruned())) w := &widgetNode{ Box: box,