Tue, 26 Aug 2008 08:28:25 +0000
theme loader cleanup, and remove a few warnings
|
23965
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
1 | /* |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
2 | * Icon Themes for Pidgin |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
3 | * |
|
13cd30de531b
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 |
|
13cd30de531b
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 |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
6 | * source distribution. |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
7 | * |
|
13cd30de531b
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 |
|
13cd30de531b
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 |
|
13cd30de531b
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 |
|
13cd30de531b
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. |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
12 | * |
|
13cd30de531b
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, |
|
13cd30de531b
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 |
|
13cd30de531b
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 |
|
13cd30de531b
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. |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
17 | * |
|
13cd30de531b
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 |
|
13cd30de531b
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 |
|
13cd30de531b
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 |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
21 | * |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
22 | */ |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
23 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
24 | #include "gtkicon-theme.h" |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
25 | #include "pidginstock.h" |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
26 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
27 | #include <gtk/gtk.h> |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
28 | |
|
13cd30de531b
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) \ |
|
13cd30de531b
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)) |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
31 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
32 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
33 | /****************************************************************************** |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
34 | * Structs |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
35 | *****************************************************************************/ |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
36 | typedef struct { |
|
13cd30de531b
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 */ |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
38 | GHashTable *icon_files; |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
39 | } PidginIconThemePrivate; |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
40 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
41 | /****************************************************************************** |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
42 | * Globals |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
43 | *****************************************************************************/ |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
44 | |
|
13cd30de531b
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; |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
46 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
47 | /****************************************************************************** |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
48 | * GObject Stuff |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
49 | *****************************************************************************/ |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
50 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
51 | static void |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
52 | pidgin_icon_theme_init(GTypeInstance *instance, |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
53 | gpointer klass) |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
54 | { |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
55 | PidginIconThemePrivate *priv; |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
56 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
57 | (PIDGIN_ICON_THEME(instance))->priv = g_new0(PidginIconThemePrivate, 1); |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
58 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
59 | priv = PIDGIN_ICON_THEME_GET_PRIVATE(instance); |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
60 | |
|
23972
90e0da03c053
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23967
diff
changeset
|
61 | priv->icon_files = g_hash_table_new_full(g_str_hash, |
|
23965
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
62 | g_str_equal, |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
63 | g_free, |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
64 | g_free); |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
65 | } |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
66 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
67 | static void |
|
23972
90e0da03c053
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23967
diff
changeset
|
68 | pidgin_icon_theme_finalize(GObject *obj) |
|
23965
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
69 | { |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
70 | PidginIconThemePrivate *priv; |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
71 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
72 | priv = PIDGIN_ICON_THEME_GET_PRIVATE(obj); |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
73 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
74 | g_hash_table_destroy(priv->icon_files); |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
75 | |
|
23972
90e0da03c053
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23967
diff
changeset
|
76 | parent_class->finalize(obj); |
|
23965
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
77 | } |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
78 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
79 | static void |
|
23972
90e0da03c053
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23967
diff
changeset
|
80 | pidgin_icon_theme_class_init(PidginIconThemeClass *klass) |
|
23965
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
81 | { |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
82 | GObjectClass *obj_class = G_OBJECT_CLASS(klass); |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
83 | |
|
23972
90e0da03c053
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23967
diff
changeset
|
84 | parent_class = g_type_class_peek_parent(klass); |
|
23965
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
85 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
86 | obj_class->finalize = pidgin_icon_theme_finalize; |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
87 | } |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
88 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
89 | GType |
|
23972
90e0da03c053
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23967
diff
changeset
|
90 | pidgin_icon_theme_get_type(void) |
|
23965
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
91 | { |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
92 | static GType type = 0; |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
93 | if (type == 0) { |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
94 | static const GTypeInfo info = { |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
95 | sizeof (PidginIconThemeClass), |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
96 | NULL, /* base_init */ |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
97 | NULL, /* base_finalize */ |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
98 | (GClassInitFunc)pidgin_icon_theme_class_init, /* class_init */ |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
99 | NULL, /* class_finalize */ |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
100 | NULL, /* class_data */ |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
101 | sizeof (PidginIconTheme), |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
102 | 0, /* n_preallocs */ |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
103 | pidgin_icon_theme_init, /* instance_init */ |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
104 | NULL, /* value table */ |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
105 | }; |
|
23972
90e0da03c053
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23967
diff
changeset
|
106 | type = g_type_register_static(PURPLE_TYPE_THEME, |
|
23965
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
107 | "PidginIconTheme", |
|
23967
cc5667bc8f1e
Clean up status icon themes a bit
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23965
diff
changeset
|
108 | &info, G_TYPE_FLAG_ABSTRACT); |
|
23965
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
109 | } |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
110 | return type; |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
111 | } |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
112 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
113 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
114 | /***************************************************************************** |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
115 | * Public API functions |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
116 | *****************************************************************************/ |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
117 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
118 | const gchar * |
|
23972
90e0da03c053
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23967
diff
changeset
|
119 | pidgin_icon_theme_get_icon(PidginIconTheme *theme, |
|
23965
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
120 | const gchar *id) |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
121 | { |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
122 | PidginIconThemePrivate *priv; |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
123 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
124 | g_return_val_if_fail(PIDGIN_IS_ICON_THEME(theme), NULL); |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
125 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
126 | priv = PIDGIN_ICON_THEME_GET_PRIVATE(theme); |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
127 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
128 | return g_hash_table_lookup(priv->icon_files, id); |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
129 | } |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
130 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
131 | void |
|
23972
90e0da03c053
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23967
diff
changeset
|
132 | pidgin_icon_theme_set_icon(PidginIconTheme *theme, |
|
23965
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
133 | const gchar *id, |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
134 | const gchar *filename) |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
135 | { |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
136 | PidginIconThemePrivate *priv; |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
137 | g_return_if_fail(PIDGIN_IS_ICON_THEME(theme)); |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
138 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
139 | priv = PIDGIN_ICON_THEME_GET_PRIVATE(theme); |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
140 | |
|
23972
90e0da03c053
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23967
diff
changeset
|
141 | if (filename != NULL) |
|
90e0da03c053
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23967
diff
changeset
|
142 | g_hash_table_replace(priv->icon_files, |
|
23965
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
143 | g_strdup(id), |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
144 | g_strdup(filename)); |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
145 | else g_hash_table_remove(priv->icon_files, id); |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
146 | } |