Fedora 18 backport - GObject.ParamFlags does not have READWRITE

This commit is contained in:
James Cameron 2018-11-19 14:09:18 +11:00
parent c7a7dcea7d
commit 85fc4680e9
5 changed files with 25 additions and 0 deletions

View File

@ -64,6 +64,11 @@ from sugar3.graphics.icon import Icon
_ = lambda msg: gettext.dgettext('sugar-toolkit-gtk3', msg)
if not hasattr(GObject.ParamFlags, 'READWRITE'):
GObject.ParamFlags.READWRITE = GObject.ParamFlags.WRITABLE | \
GObject.ParamFlags.READABLE
class Alert(Gtk.EventBox):
"""
Alerts are inside the activity window instead of being a

View File

@ -32,6 +32,11 @@ from sugar3.graphics.palette import Palette, ToolInvoker, WidgetInvoker
_ = lambda msg: gettext.dgettext('sugar-toolkit-gtk3', msg)
if not hasattr(GObject.ParamFlags, 'READWRITE'):
GObject.ParamFlags.READWRITE = GObject.ParamFlags.WRITABLE | \
GObject.ParamFlags.READABLE
def get_svg_color_string(color):
return '#%.2X%.2X%.2X' % (color.red / 257, color.green / 257,
color.blue / 257)

View File

@ -29,6 +29,11 @@ from gi.repository import Gtk
from gi.repository import GObject
if not hasattr(GObject.ParamFlags, 'READWRITE'):
GObject.ParamFlags.READWRITE = GObject.ParamFlags.WRITABLE | \
GObject.ParamFlags.READABLE
class Notebook(Gtk.Notebook):
'''
Notebook class that creates a :class:`Gtk.Notebook`. It is possible to set

View File

@ -33,6 +33,11 @@ _PREVIOUS_PAGE = 0
_NEXT_PAGE = 1
if not hasattr(GObject.ParamFlags, 'READWRITE'):
GObject.ParamFlags.READWRITE = GObject.ParamFlags.WRITABLE | \
GObject.ParamFlags.READABLE
class _TrayViewport(Gtk.Viewport):
__gproperties__ = {

View File

@ -49,6 +49,11 @@ CONN_INTERFACE_ROOM_CONFIG = \
_logger = logging.getLogger('sugar3.presence.activity')
if not hasattr(GObject.ParamFlags, 'READWRITE'):
GObject.ParamFlags.READWRITE = GObject.ParamFlags.WRITABLE | \
GObject.ParamFlags.READABLE
class Activity(GObject.GObject):
"""UI interface for an Activity in the presence service