Mercurial > pidgin.yaz
annotate pidgin/gtkicon-theme.c @ 23697:0bbfb20bad19
Clean up status icon themes a bit
author | Justin Rodriguez <ffdragon@soc.pidgin.im> |
---|---|
date | Fri, 08 Aug 2008 20:47:15 +0000 |
parents | f29e173320a7 |
children | 9525fb966efb |
rev | line source |
---|---|
23695
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
1 /* |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
2 * Icon Themes for Pidgin |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
3 * |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
4 * Pidgin is the legal property of its developers, whose names are too numerous |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
5 * to list here. Please refer to the COPYRIGHT file distributed with this |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
6 * source distribution. |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
7 * |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
8 * This program is free software; you can redistribute it and/or modify |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
9 * it under the terms of the GNU General Public License as published by |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
10 * the Free Software Foundation; either version 2 of the License, or |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
11 * (at your option) any later version. |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
12 * |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
13 * This program is distributed in the hope that it will be useful, |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
16 * GNU General Public License for more details. |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
17 * |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
18 * You should have received a copy of the GNU General Public License |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
19 * along with this program; if not, write to the Free Software |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
21 * |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
22 */ |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
23 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
24 #include "gtkicon-theme.h" |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
25 #include "pidginstock.h" |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
26 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
27 #include <gtk/gtk.h> |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
28 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
29 #define PIDGIN_ICON_THEME_GET_PRIVATE(Gobject) \ |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
30 ((PidginIconThemePrivate *) ((PIDGIN_ICON_THEME(Gobject))->priv)) |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
31 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
32 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
33 /****************************************************************************** |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
34 * Structs |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
35 *****************************************************************************/ |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
36 typedef struct { |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
37 /* used to store filenames of diffrent icons */ |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
38 GHashTable *icon_files; |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
39 } PidginIconThemePrivate; |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
40 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
41 /****************************************************************************** |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
42 * Globals |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
43 *****************************************************************************/ |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
44 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
45 static GObjectClass *parent_class = NULL; |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
46 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
47 /****************************************************************************** |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
48 * Enums |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
49 *****************************************************************************/ |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
50 /****************************************************************************** |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
51 * GObject Stuff |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
52 *****************************************************************************/ |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
53 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
54 static void |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
55 pidgin_icon_theme_init(GTypeInstance *instance, |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
56 gpointer klass) |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
57 { |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
58 PidginIconThemePrivate *priv; |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
59 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
60 (PIDGIN_ICON_THEME(instance))->priv = g_new0(PidginIconThemePrivate, 1); |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
61 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
62 priv = PIDGIN_ICON_THEME_GET_PRIVATE(instance); |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
63 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
64 priv->icon_files = g_hash_table_new_full (g_str_hash, |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
65 g_str_equal, |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
66 g_free, |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
67 g_free); |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
68 } |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
69 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
70 static void |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
71 pidgin_icon_theme_finalize (GObject *obj) |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
72 { |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
73 PidginIconThemePrivate *priv; |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
74 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
75 priv = PIDGIN_ICON_THEME_GET_PRIVATE(obj); |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
76 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
77 g_hash_table_destroy(priv->icon_files); |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
78 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
79 parent_class->finalize (obj); |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
80 } |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
81 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
82 static void |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
83 pidgin_icon_theme_class_init (PidginIconThemeClass *klass) |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
84 { |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
85 GObjectClass *obj_class = G_OBJECT_CLASS(klass); |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
86 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
87 parent_class = g_type_class_peek_parent (klass); |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
88 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
89 obj_class->finalize = pidgin_icon_theme_finalize; |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
90 } |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
91 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
92 GType |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
93 pidgin_icon_theme_get_type (void) |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
94 { |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
95 static GType type = 0; |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
96 if (type == 0) { |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
97 static const GTypeInfo info = { |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
98 sizeof (PidginIconThemeClass), |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
99 NULL, /* base_init */ |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
100 NULL, /* base_finalize */ |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
101 (GClassInitFunc)pidgin_icon_theme_class_init, /* class_init */ |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
102 NULL, /* class_finalize */ |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
103 NULL, /* class_data */ |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
104 sizeof (PidginIconTheme), |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
105 0, /* n_preallocs */ |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
106 pidgin_icon_theme_init, /* instance_init */ |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
107 NULL, /* value table */ |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
108 }; |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
109 type = g_type_register_static (PURPLE_TYPE_THEME, |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
110 "PidginIconTheme", |
23697
0bbfb20bad19
Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23695
diff
changeset
|
111 &info, G_TYPE_FLAG_ABSTRACT); |
23695
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
112 } |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
113 return type; |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
114 } |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
115 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
116 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
117 /***************************************************************************** |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
118 * Public API functions |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
119 *****************************************************************************/ |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
120 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
121 const gchar * |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
122 pidgin_icon_theme_get_file(PidginIconTheme *theme, |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
123 const gchar *id) |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
124 { |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
125 PidginIconThemePrivate *priv; |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
126 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
127 g_return_val_if_fail(PIDGIN_IS_ICON_THEME(theme), NULL); |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
128 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
129 priv = PIDGIN_ICON_THEME_GET_PRIVATE(theme); |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
130 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
131 return g_hash_table_lookup(priv->icon_files, id); |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
132 } |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
133 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
134 void |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
135 pidgin_icon_theme_set_file(PidginIconTheme *theme, |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
136 const gchar *id, |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
137 const gchar *filename) |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
138 { |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
139 PidginIconThemePrivate *priv; |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
140 g_return_if_fail(PIDGIN_IS_ICON_THEME(theme)); |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
141 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
142 priv = PIDGIN_ICON_THEME_GET_PRIVATE(theme); |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
143 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
144 if (filename != NULL)g_hash_table_replace(priv->icon_files, |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
145 g_strdup(id), |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
146 g_strdup(filename)); |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
147 else g_hash_table_remove(priv->icon_files, id); |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
148 } |