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

« back to all changes in this revision

Viewing changes to shell/rb-play-order-random-equal-weights.c

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

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
static double rb_random_equal_weights_get_entry_weight (RBRandomPlayOrder *rorder,
27
27
                                                        RhythmDB *db, RhythmDBEntry *entry);
28
28
 
29
 
static RBPlayOrderClass *parent_class = NULL;
30
 
 
31
 
GType
32
 
rb_random_play_order_equal_weights_get_type (void)
33
 
{
34
 
        static GType rb_random_play_order_equal_weights_type = 0;
35
 
 
36
 
        if (rb_random_play_order_equal_weights_type == 0)
37
 
        {
38
 
                static const GTypeInfo our_info =
39
 
                {
40
 
                        sizeof (RBRandomPlayOrderEqualWeightsClass),
41
 
                        NULL,
42
 
                        NULL,
43
 
                        (GClassInitFunc) rb_random_play_order_equal_weights_class_init,
44
 
                        NULL,
45
 
                        NULL,
46
 
                        sizeof (RBRandomPlayOrderEqualWeights),
47
 
                        0,
48
 
                        NULL
49
 
                };
50
 
 
51
 
                rb_random_play_order_equal_weights_type = g_type_register_static (RB_TYPE_RANDOM_PLAY_ORDER,
52
 
                                "RBRandomPlayOrderEqualWeights",
53
 
                                &our_info, 0);
54
 
        }
55
 
 
56
 
        return rb_random_play_order_equal_weights_type;
57
 
}
 
29
G_DEFINE_TYPE (RBRandomPlayOrderEqualWeights,
 
30
               rb_random_play_order_equal_weights,
 
31
               RB_TYPE_RANDOM_PLAY_ORDER)
58
32
 
59
33
static void
60
34
rb_random_play_order_equal_weights_class_init (RBRandomPlayOrderEqualWeightsClass *klass)
61
35
{
62
36
        RBRandomPlayOrderClass *rorder;
63
37
 
64
 
        parent_class = g_type_class_peek_parent (klass);
65
 
 
66
38
        rorder = RB_RANDOM_PLAY_ORDER_CLASS (klass);
67
39
        rorder->get_entry_weight = rb_random_equal_weights_get_entry_weight;
68
40
}
79
51
        return RB_PLAY_ORDER (rorder);
80
52
}
81
53
 
 
54
static void
 
55
rb_random_play_order_equal_weights_init (RBRandomPlayOrderEqualWeights *porder)
 
56
{
 
57
}
 
58
 
82
59
static double
83
60
rb_random_equal_weights_get_entry_weight (RBRandomPlayOrder *rorder, RhythmDB *db, RhythmDBEntry *entry)
84
61
{