Mercurial > pidgin.yaz
annotate pidgin/gtkicon-theme.c @ 31806:c39838d078e4
Credit where due. Refs #13180.
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Sun, 13 Mar 2011 18:04:52 +0000 |
parents | 0c7b74fc558e |
children | 4d92a431d0a1 |
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 #include "gtkicon-theme.h" |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
24 #include "pidginstock.h" |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
25 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
26 #include <gtk/gtk.h> |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
27 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
28 #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
|
29 ((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
|
30 |
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 * Structs |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
33 *****************************************************************************/ |
25402
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
34 |
23695
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
35 typedef struct { |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
36 /* 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
|
37 GHashTable *icon_files; |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
38 } PidginIconThemePrivate; |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
39 |
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 * Globals |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
42 *****************************************************************************/ |
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 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
|
45 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
46 /****************************************************************************** |
25402
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
47 * GObject Stuff |
23695
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
48 *****************************************************************************/ |
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 static void |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
51 pidgin_icon_theme_init(GTypeInstance *instance, |
25402
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
52 gpointer klass) |
23695
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 PidginIconThemePrivate *priv; |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
55 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
56 (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
|
57 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
58 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
|
59 |
23702
9525fb966efb
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23697
diff
changeset
|
60 priv->icon_files = g_hash_table_new_full(g_str_hash, |
25402
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
61 g_str_equal, g_free, g_free); |
23695
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
62 } |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
63 |
25402
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
64 static void |
23702
9525fb966efb
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23697
diff
changeset
|
65 pidgin_icon_theme_finalize(GObject *obj) |
23695
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
66 { |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
67 PidginIconThemePrivate *priv; |
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 priv = PIDGIN_ICON_THEME_GET_PRIVATE(obj); |
25402
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
70 |
23695
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
71 g_hash_table_destroy(priv->icon_files); |
23703
1a4417138a8f
clean up formatting, and added render settings for the names/markup on the blist
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23702
diff
changeset
|
72 g_free(priv); |
23695
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
73 |
23702
9525fb966efb
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23697
diff
changeset
|
74 parent_class->finalize(obj); |
23695
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
75 } |
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 static void |
23702
9525fb966efb
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23697
diff
changeset
|
78 pidgin_icon_theme_class_init(PidginIconThemeClass *klass) |
23695
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
79 { |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
80 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
|
81 |
23702
9525fb966efb
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23697
diff
changeset
|
82 parent_class = g_type_class_peek_parent(klass); |
23695
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
83 |
25402
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
84 obj_class->finalize = pidgin_icon_theme_finalize; |
23695
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
85 } |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
86 |
25402
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
87 GType |
23702
9525fb966efb
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23697
diff
changeset
|
88 pidgin_icon_theme_get_type(void) |
23695
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
89 { |
25402
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
90 static GType type = 0; |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
91 if (type == 0) { |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
92 static const GTypeInfo info = { |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
93 sizeof(PidginIconThemeClass), |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
94 NULL, /* base_init */ |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
95 NULL, /* base_finalize */ |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
96 (GClassInitFunc)pidgin_icon_theme_class_init, /* class_init */ |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
97 NULL, /* class_finalize */ |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
98 NULL, /* class_data */ |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
99 sizeof(PidginIconTheme), |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
100 0, /* n_preallocs */ |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
101 pidgin_icon_theme_init, /* instance_init */ |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
102 NULL, /* value table */ |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
103 }; |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
104 type = g_type_register_static(PURPLE_TYPE_THEME, |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
105 "PidginIconTheme", &info, G_TYPE_FLAG_ABSTRACT); |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
106 } |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
107 return type; |
23695
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 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
110 /***************************************************************************** |
25402
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
111 * Public API functions |
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 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
114 const gchar * |
23702
9525fb966efb
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23697
diff
changeset
|
115 pidgin_icon_theme_get_icon(PidginIconTheme *theme, |
25402
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
116 const gchar *id) |
23695
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 PidginIconThemePrivate *priv; |
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 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
|
121 |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
122 priv = PIDGIN_ICON_THEME_GET_PRIVATE(theme); |
25402
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
123 |
23695
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
124 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
|
125 } |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
126 |
25402
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
127 void |
23702
9525fb966efb
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23697
diff
changeset
|
128 pidgin_icon_theme_set_icon(PidginIconTheme *theme, |
25402
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
129 const gchar *id, |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
130 const gchar *filename) |
23695
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
131 { |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
132 PidginIconThemePrivate *priv; |
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
133 g_return_if_fail(PIDGIN_IS_ICON_THEME(theme)); |
25402
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
134 |
23695
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
135 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
|
136 |
23702
9525fb966efb
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23697
diff
changeset
|
137 if (filename != NULL) |
9525fb966efb
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23697
diff
changeset
|
138 g_hash_table_replace(priv->icon_files, |
25402
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
139 g_strdup(id), g_strdup(filename)); |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
140 else |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
23703
diff
changeset
|
141 g_hash_table_remove(priv->icon_files, id); |
23695
f29e173320a7
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
142 } |