~mvo/software-center/pygi-properties-fixes

« back to all changes in this revision

Viewing changes to softwarecenter/ui/gtk3/widgets/cellrenderers.py

  • Committer: Michael Vogt
  • Date: 2012-04-10 10:37:07 UTC
  • Revision ID: michael.vogt@ubuntu.com-20120410103707-cdvxo85tvky7np5a
softwarecenter/ui/gtk3/widgets/cellrenderers.py: move from __gproperties__ to GObject.Property() usage

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
    MAX_STARS = 5
45
45
    STAR_SIZE = EM
46
46
 
47
 
    __gproperties__ = {
48
 
        'application': (GObject.TYPE_PYOBJECT, 'document',
49
 
                       'a xapian document containing pkg information',
50
 
                       GObject.PARAM_READWRITE),
51
 
 
52
 
        'isactive': (bool, 'isactive', 'is cell active/selected', False,
53
 
                    GObject.PARAM_READWRITE),
54
 
                    }
 
47
    # initialize declared properties (LP: #965937)
 
48
    application = GObject.Property(
 
49
        type=GObject.TYPE_PYOBJECT,
 
50
        nick='document',
 
51
        blurb='a xapian document containing pkg information',
 
52
        flags=GObject.PARAM_READWRITE|GObject.PARAM_CONSTRUCT,
 
53
        default=None)
 
54
    isactive = GObject.Property(
 
55
        type=bool,
 
56
        nick='isactive',
 
57
        blurb='is cell active/selected',
 
58
        flags=GObject.PARAM_READWRITE|GObject.PARAM_CONSTRUCT,
 
59
        default=False)
55
60
 
56
61
    def __init__(self, icons, layout, show_ratings, overlay_icon_name):
57
 
        GObject.GObject.__init__(self)
 
62
        Gtk.CellRendererText.__init__(self)
58
63
 
59
64
        # the icon pixbuf to be displayed in the row
60
65
        self.icon = None