firstboot: fix gtk warning about non-zero page size

Pygtk documentation says the page size field is not used, but actually
there will be a gtk warning below:

/usr/share/firstboot/modules/firstboot_kdump.py:216: GtkWarning: GtkSpinButton: setting an adjustment with non-zero page size is deprecated
  self.kdumpMemspin = gtk.SpinButton(self.memAdjustment, 0, 0)

Fix it by setting the last field to 0.

Signed-off-by: Dave Young <dyoung@redhat.com>
Reviewed-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
Dave Young 2012-08-28 16:22:15 +08:00
parent ed4d7a3865
commit dc5f48e90a

View File

@ -212,7 +212,7 @@ class moduleClass(Module):
self.labelTotal.set_width_chars(32) self.labelTotal.set_width_chars(32)
# how much ram to reserve for kdump # how much ram to reserve for kdump
self.memAdjustment = gtk.Adjustment(self.kdumpMem, lowerBound, upperBound, step, step, 64) self.memAdjustment = gtk.Adjustment(self.kdumpMem, lowerBound, upperBound, step, step, 0)
self.kdumpMemspin = gtk.SpinButton(self.memAdjustment, 0, 0) self.kdumpMemspin = gtk.SpinButton(self.memAdjustment, 0, 0)
self.kdumpMemspin.set_update_policy(gtk.UPDATE_IF_VALID) self.kdumpMemspin.set_update_policy(gtk.UPDATE_IF_VALID)
self.kdumpMemspin.set_numeric(True) self.kdumpMemspin.set_numeric(True)