comparison pidgin/gtkblist-theme.c @ 23475:1242a922a4bc

start of blist themes (themes have no effect on display)
author Justin Rodriguez <ffdragon@soc.pidgin.im>
date Thu, 10 Jul 2008 06:49:45 +0000
parents
children 8941e76e0762
comparison
equal deleted inserted replaced
23474:331a7a69d955 23475:1242a922a4bc
1 /*
2 * Buddy List Themes for Pidgin
3 *
4 * Pidgin is the legal property of its developers, whose names are too numerous
5 * to list here. Please refer to the COPYRIGHT file distributed with this
6 * source distribution.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
21 *
22 */
23
24 #include "gtkblist-theme.h"
25
26 #define PIDGIN_BUDDY_LIST_THEME_GET_PRIVATE(Gobject) \
27 ((PidginBuddyListThemePrivate *) ((PIDGIN_BUDDY_LIST_THEME(Gobject))->priv))
28
29
30 /******************************************************************************
31 * Structs
32 *****************************************************************************/
33 typedef struct {
34 gchar *icon_theme;
35
36 /* Buddy list */
37 gchar *blist_color;
38 gdouble opacity;
39
40 /* groups */
41 gchar *expanded_bgcolor;
42 gchar *expanded_tcolor;
43 gchar *expanded_font;
44
45 gchar *minimized_bgcolor;
46 gchar *minimized_tcolor;
47 gchar *minimized_font;
48
49 /* buddy */
50 gchar *buddy_bgcolor1;
51 gchar *buddy_bgcolor2;
52
53 gint icon;
54 gint text;
55 gint status_icon;
56 gboolean status;
57
58 gchar *online_font;
59 gchar *online_color;
60
61 gchar *away_font;
62 gchar *away_color;
63
64 gchar *offline_font;
65 gchar *offline_color;
66
67 gchar *message_font;
68 gchar *message_color;
69
70 gchar *status_font;
71 gchar *status_color;
72
73 } PidginBuddyListThemePrivate;
74
75 /******************************************************************************
76 * Globals
77 *****************************************************************************/
78
79 static GObjectClass *parent_class = NULL;
80
81 /******************************************************************************
82 * Enums
83 *****************************************************************************/
84
85 /******************************************************************************
86 * GObject Stuff
87 *****************************************************************************/
88
89 static void
90 pidgin_buddy_list_theme_init(GTypeInstance *instance,
91 gpointer klass)
92 {
93 PidginBuddyListThemePrivate *priv;
94
95 (PIDGIN_BUDDY_LIST_THEME(instance))->priv = g_new0(PidginBuddyListThemePrivate, 1);
96
97 priv = PIDGIN_BUDDY_LIST_THEME_GET_PRIVATE(instance);
98
99 }
100
101 static void
102 pidgin_buddy_list_theme_finalize (GObject *obj)
103 {
104 PidginBuddyListThemePrivate *priv;
105
106 priv = PIDGIN_BUDDY_LIST_THEME_GET_PRIVATE(obj);
107
108 parent_class->finalize (obj);
109 }
110
111 static void
112 pidgin_buddy_list_theme_class_init (PidginBuddyListThemeClass *klass)
113 {
114 GObjectClass *obj_class = G_OBJECT_CLASS(klass);
115
116 parent_class = g_type_class_peek_parent (klass);
117
118 obj_class->finalize = pidgin_buddy_list_theme_finalize;
119 }
120
121 GType
122 pidgin_buddy_list_theme_get_type (void)
123 {
124 static GType type = 0;
125 if (type == 0) {
126 static const GTypeInfo info = {
127 sizeof (PidginBuddyListThemeClass),
128 NULL, /* base_init */
129 NULL, /* base_finalize */
130 (GClassInitFunc)pidgin_buddy_list_theme_class_init, /* class_init */
131 NULL, /* class_finalize */
132 NULL, /* class_data */
133 sizeof (PidginBuddyListTheme),
134 0, /* n_preallocs */
135 pidgin_buddy_list_theme_init, /* instance_init */
136 NULL, /* value table */
137 };
138 type = g_type_register_static (PURPLE_TYPE_THEME,
139 "PidginBuddyListTheme",
140 &info, 0);
141 }
142 return type;
143 }
144
145
146 /*****************************************************************************
147 * Public API functions
148 *****************************************************************************/
149