~ubuntu-branches/ubuntu/precise/rhythmbox/precise-201203091205

« back to all changes in this revision

Viewing changes to widgets/rb-rating.c

Tags: upstream-0.9.2cvs20060102
ImportĀ upstreamĀ versionĀ 0.9.2cvs20060102

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
 
1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
 
2
 *
2
3
 *  arch-tag: Implementation of rating renderer object
3
4
 *
4
5
 *  Copyright (C) 2002 Olivier Martin <oleevye@wanadoo.fr>
65
66
        RBRatingPixbufs *pixbufs;
66
67
};
67
68
 
 
69
#define RB_RATING_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), RB_TYPE_RATING, RBRatingPrivate))
 
70
 
68
71
enum
69
72
{
70
73
        PROP_0,
135
138
                              G_TYPE_NONE,
136
139
                              1,
137
140
                              G_TYPE_DOUBLE);
 
141
 
 
142
        g_type_class_add_private (klass, sizeof (RBRatingPrivate));
138
143
}
139
144
 
140
145
static void
141
146
rb_rating_init (RBRating *rating)
142
147
{
143
 
        rating->priv = g_new0 (RBRatingPrivate, 1);
 
148
        rating->priv = RB_RATING_GET_PRIVATE (rating);
144
149
 
145
150
        /* create the needed icons */
146
151
        rating->priv->pixbufs = rb_rating_pixbufs_new ();
159
164
 
160
165
        rating = RB_RATING (object);
161
166
        rb_rating_pixbufs_free (rating->priv->pixbufs);
162
 
        g_free (rating->priv);
163
167
 
164
168
        G_OBJECT_CLASS (parent_class)->finalize (object);
165
169
}