From 573c824ddcaa0821ebd9c2a663e31091211052c4 Mon Sep 17 00:00:00 2001 From: iasunsea Date: Tue, 4 Apr 2023 20:22:29 +0800 Subject: [PATCH] gui add reserved mem range remind --- com_redhat_kdump/gui/spokes/kdump.glade | 11 +++++++++++ com_redhat_kdump/gui/spokes/kdump.py | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/com_redhat_kdump/gui/spokes/kdump.glade b/com_redhat_kdump/gui/spokes/kdump.glade index 4016724..9a3790f 100644 --- a/com_redhat_kdump/gui/spokes/kdump.glade +++ b/com_redhat_kdump/gui/spokes/kdump.glade @@ -197,6 +197,17 @@ 0 + + + True + False + start + + + 2 + 0 + + True diff --git a/com_redhat_kdump/gui/spokes/kdump.py b/com_redhat_kdump/gui/spokes/kdump.py index 2b759d6..305949a 100644 --- a/com_redhat_kdump/gui/spokes/kdump.py +++ b/com_redhat_kdump/gui/spokes/kdump.py @@ -75,7 +75,8 @@ def initialize(self): self._autoButton = self.builder.get_object("autoButton") self._manualButton = self.builder.get_object("manualButton") self._fadumpButton = self.builder.get_object("fadumpCheck") - self._toBeReservedSpin = self.builder.get_object("toBeReservedSpin") + self._rangeReservedMemMB = self.builder.get_object("rangeReservedMemMB") + self._totalMemMB = self.builder.get_object("totalMemMB") self._totalMemMB = self.builder.get_object("totalMemMB") self._usableMemMB = self.builder.get_object("usableMemMB") self._autoWarn = self.builder.get_object("autoReservationWarning") @@ -92,6 +93,7 @@ def initialize(self): adjustment = Gtk.Adjustment(lower, lower, upper, step, step, 0) self._toBeReservedSpin.set_adjustment(adjustment) self._toBeReservedSpin.set_value(lower) + self._rangeReservedMemMB.set_text(" (%d - %d MB)" % (lower, upper)) # Connect a callback to the PropertiesChanged signal. storage = STORAGE.get_proxy()