# HG changeset patch # User IBBoard # Date 1295207448 0 # Node ID 8777e4f64d8e8770f54cf30dda1601a72e2634a6 # Parent fac0636ae13bec9ed13c7019f86338d59c1c1555 Fixes #335: Show current points total in status bar * Add label to status bar and set the text on points value change diff -r fac0636ae13b -r 8777e4f64d8e FrmMainWindow.cs --- a/FrmMainWindow.cs Sun Jan 02 21:03:15 2011 +0000 +++ b/FrmMainWindow.cs Sun Jan 16 19:50:48 2011 +0000 @@ -400,7 +400,7 @@ private void OnPointsValueChanged(WarFoundryObject obj, double before, double after) { - //Set points in panel + SetPointsPanelText(); } private void OnFailedUnitRequirement(List failedRequirement) @@ -655,7 +655,14 @@ private void SetPointsPanelText() { - //TODO: Set the points value in the status bar + if (WarFoundryCore.CurrentArmy != null) + { + lblTotalPoints.Text = Translation.GetTranslation("statusPanelPoints", "{0}pts of {1} pts", WarFoundryCore.CurrentArmy.Points, WarFoundryCore.CurrentArmy.MaxPoints); + } + else + { + lblTotalPoints.Text = ""; + } } private void commandStack_CommandStackUpdated() diff -r fac0636ae13b -r 8777e4f64d8e gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs --- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs Sun Jan 02 21:03:15 2011 +0000 +++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs Sun Jan 16 19:50:48 2011 +0000 @@ -36,6 +36,7 @@ private global::Gtk.TreeView treeUnits; private global::Gtk.Notebook unitsNotebook; private global::Gtk.Statusbar statusbar1; + private global::Gtk.Label lblTotalPoints; protected virtual void Build() { @@ -173,11 +174,19 @@ this.statusbar1 = new global::Gtk.Statusbar(); this.statusbar1.Name = "statusbar1"; this.statusbar1.Spacing = 2; - this.vbox1.Add(this.statusbar1); - global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.statusbar1])); - w7.Position = 3; + // Container child statusbar1.Gtk.Box+BoxChild + this.lblTotalPoints = new global::Gtk.Label(); + this.lblTotalPoints.Name = "lblTotalPoints"; + this.statusbar1.Add(this.lblTotalPoints); + global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.statusbar1[this.lblTotalPoints])); + w7.Position = 2; w7.Expand = false; w7.Fill = false; + this.vbox1.Add(this.statusbar1); + global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.statusbar1])); + w8.Position = 3; + w8.Expand = false; + w8.Fill = false; this.Add(this.vbox1); if ((this.Child != null)) { diff -r fac0636ae13b -r 8777e4f64d8e gtk-gui/gui.stetic --- a/gtk-gui/gui.stetic Sun Jan 02 21:03:15 2011 +0000 +++ b/gtk-gui/gui.stetic Sun Jan 16 19:50:48 2011 +0000 @@ -273,7 +273,15 @@ - + + + + + 2 + True + False + False +