diff --git a/gramps/gui/configure.py b/gramps/gui/configure.py index 8146f5090..d16f5f4a4 100644 --- a/gramps/gui/configure.py +++ b/gramps/gui/configure.py @@ -443,7 +443,9 @@ class ConfigureDialog(ManagedWindow): if not callback: callback = self.update_slider lwidget = BasicLabel("%s: " % label) - adj = Gtk.Adjustment(config.get(constant), range[0], range[1], 1, 0, 0) + adj = Gtk.Adjustment(value=config.get(constant), lower=range[0], + upper=range[1], step_increment=1, + page_increment=0, page_size=0) slider = Gtk.Scale(adjustment=adj) slider.set_digits(0) slider.set_value_pos(Gtk.PositionType.BOTTOM) @@ -463,7 +465,9 @@ class ConfigureDialog(ManagedWindow): if not callback: callback = self.update_spinner lwidget = BasicLabel("%s: " % label) - adj = Gtk.Adjustment(config.get(constant), range[0], range[1], 1, 0, 0) + adj = Gtk.Adjustment(value=config.get(constant), lower=range[0], + upper=range[1], step_increment=1, + page_increment=0, page_size=0) spinner = Gtk.SpinButton(adjustment=adj, climb_rate=0.0, digits=0) spinner.connect('value-changed', callback, constant) spinner.set_hexpand(True) diff --git a/gramps/gui/editors/filtereditor.py b/gramps/gui/editors/filtereditor.py index 2ef4726d3..8cc51c8fa 100644 --- a/gramps/gui/editors/filtereditor.py +++ b/gramps/gui/editors/filtereditor.py @@ -149,7 +149,8 @@ class MyInteger(Gtk.SpinButton): def __init__(self, min, max): GObject.GObject.__init__(self) - self.set_adjustment(Gtk.Adjustment(min, min, max, 1)) + self.set_adjustment(Gtk.Adjustment(value=min, lower=min, upper=max, + step_increment=1)) self.show() def get_text(self): diff --git a/gramps/gui/plug/_guioptions.py b/gramps/gui/plug/_guioptions.py index 119303ed2..82f5d9fad 100644 --- a/gramps/gui/plug/_guioptions.py +++ b/gramps/gui/plug/_guioptions.py @@ -299,10 +299,10 @@ class GuiNumberOption(Gtk.SpinButton): decimals = 0 step = self.__option.get_step() - adj = Gtk.Adjustment(1, - self.__option.get_min(), - self.__option.get_max(), - step) + adj = Gtk.Adjustment(value=1, + lower=self.__option.get_min(), + upper=self.__option.get_max(), + step_increment=step) # Calculate the number of decimal places if necessary if step < 1: diff --git a/gramps/plugins/lib/maps/placeselection.py b/gramps/plugins/lib/maps/placeselection.py index fd0c11432..32ce3844d 100644 --- a/gramps/plugins/lib/maps/placeselection.py +++ b/gramps/plugins/lib/maps/placeselection.py @@ -124,7 +124,8 @@ class PlaceSelection(ManagedWindow, OsmGps): ' oval depending on the latitude.')) label.set_valign(Gtk.Align.END) self.window.vbox.pack_start(label, False, True, 0) - adj = Gtk.Adjustment(1.0, 0.1, 3.0, 0.1, 0, 0) + adj = Gtk.Adjustment(value=1.0, lower=0.1, upper=3.0, + step_increment=0.1, page_increment=0, page_size=0) # default value is 1.0, minimum is 0.1 and max is 3.0 slider = Gtk.Scale(orientation=Gtk.Orientation.HORIZONTAL, adjustment=adj)