From cea48b618f1903f54eedc1f5283b8252e091f4b1 Mon Sep 17 00:00:00 2001 From: prculley Date: Fri, 13 Sep 2019 16:37:55 -0500 Subject: [PATCH] Fix GObject.PARAM_READWRITE deprecation --- gramps/gui/widgets/validatedmaskedentry.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gramps/gui/widgets/validatedmaskedentry.py b/gramps/gui/widgets/validatedmaskedentry.py index 2427e55cf..89eee5e29 100644 --- a/gramps/gui/widgets/validatedmaskedentry.py +++ b/gramps/gui/widgets/validatedmaskedentry.py @@ -942,6 +942,8 @@ VALIDATION_ICON_WIDTH = 16 MANDATORY_ICON = 'dialog-information' ERROR_ICON = 'process-stop' DELAY_TIME = 2500 +READWRITE = (GObject.PARAM_READWRITE if GLib.check_version(2, 42, 0) else + GObject.ParamFlags.READWRITE) class ValidatableMaskedEntry(MaskedEntry): """ @@ -971,12 +973,12 @@ class ValidatableMaskedEntry(MaskedEntry): 'data-type': (GObject.TYPE_PYOBJECT, 'Data Type of the widget', 'Type object', - GObject.PARAM_READWRITE), + READWRITE), 'mandatory': (GObject.TYPE_BOOLEAN, 'Mandatory', 'Mandatory', False, - GObject.PARAM_READWRITE), + READWRITE), } # FIXME put the data type support back