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

« back to all changes in this revision

Viewing changes to shell/rb-history.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 Song History List
3
4
 *
4
5
 *  Copyright (C) 2003 Jeffrey Yasskin <jyasskin@mail.utexas.edu>
19
20
 *  
20
21
 */ 
21
22
 
 
23
#include <string.h>
 
24
 
22
25
#include "rb-history.h"
23
26
 
24
27
#include "rhythmdb.h"
25
 
#include <string.h>
26
28
#include "gsequence.h"
27
29
 
28
30
struct RBHistoryPrivate
40
42
        gpointer destroy_userdata;
41
43
};
42
44
 
 
45
#define RB_HISTORY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), RB_TYPE_HISTORY, RBHistoryPrivate))
 
46
 
43
47
#define MAX_HISTORY_SIZE 50
44
48
 
45
49
static void rb_history_class_init (RBHistoryClass *klass);
128
132
                                                            0,
129
133
                                                            G_PARAM_READWRITE));
130
134
 
 
135
        g_type_class_add_private (klass, sizeof (RBHistoryPrivate));
131
136
}
132
137
 
133
138
RBHistory *
150
155
static void
151
156
rb_history_init (RBHistory *hist)
152
157
{
153
 
        hist->priv = g_new0 (RBHistoryPrivate, 1);
 
158
        hist->priv = RB_HISTORY_GET_PRIVATE (hist);
154
159
 
155
160
        hist->priv->entry_to_seqptr = g_hash_table_new (g_direct_hash,
156
161
                                                        g_direct_equal);
172
177
 
173
178
        g_hash_table_destroy (hist->priv->entry_to_seqptr);
174
179
        g_sequence_free (hist->priv->seq);
175
 
        g_free (hist->priv);
176
180
 
177
181
        G_OBJECT_CLASS (parent_class)->finalize (object);
178
182
}