Mon, 08 Jun 2009 02:24:49 +0000
Use the JID for adding a chat/buddy because the name is for descriptive
purpose only, and using it will not fill in the Add Chat dialog correctly.
Because the JID is not visible, the user will not know what to actually put
there instead.
|
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 | #include "gtkicon-theme.h" |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
24 | #include "pidginstock.h" |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
25 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
26 | #include <gtk/gtk.h> |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
27 | |
|
13cd30de531b
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) \ |
|
13cd30de531b
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)) |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
30 | |
|
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 | * Structs |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
33 | *****************************************************************************/ |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
34 | |
|
23965
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
35 | typedef struct { |
|
13cd30de531b
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 */ |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
37 | GHashTable *icon_files; |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
38 | } PidginIconThemePrivate; |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
39 | |
|
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 | * Globals |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
42 | *****************************************************************************/ |
|
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 | 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
|
45 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
46 | /****************************************************************************** |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
47 | * GObject Stuff |
|
23965
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
48 | *****************************************************************************/ |
|
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 | static void |
|
13cd30de531b
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, |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
52 | gpointer klass) |
|
23965
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
53 | { |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
54 | PidginIconThemePrivate *priv; |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
55 | |
|
13cd30de531b
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); |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
57 | |
|
13cd30de531b
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); |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
59 | |
|
23972
90e0da03c053
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23967
diff
changeset
|
60 | priv->icon_files = g_hash_table_new_full(g_str_hash, |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
61 | g_str_equal, g_free, g_free); |
|
23965
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
62 | } |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
63 | |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
64 | static void |
|
23972
90e0da03c053
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23967
diff
changeset
|
65 | 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
|
66 | { |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
67 | PidginIconThemePrivate *priv; |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
68 | |
|
13cd30de531b
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); |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
70 | |
|
23965
13cd30de531b
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); |
|
23973
189295d2ee8e
clean up formatting, and added render settings for the names/markup on the blist
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23972
diff
changeset
|
72 | g_free(priv); |
|
23965
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
73 | |
|
23972
90e0da03c053
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23967
diff
changeset
|
74 | 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
|
75 | } |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
76 | |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
77 | static void |
|
23972
90e0da03c053
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23967
diff
changeset
|
78 | 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
|
79 | { |
|
13cd30de531b
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); |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
81 | |
|
23972
90e0da03c053
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23967
diff
changeset
|
82 | 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
|
83 | |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
84 | obj_class->finalize = pidgin_icon_theme_finalize; |
|
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 | |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
87 | GType |
|
23972
90e0da03c053
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23967
diff
changeset
|
88 | 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
|
89 | { |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
90 | static GType type = 0; |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
91 | if (type == 0) { |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
92 | static const GTypeInfo info = { |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
93 | sizeof(PidginIconThemeClass), |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
94 | NULL, /* base_init */ |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
95 | NULL, /* base_finalize */ |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
96 | (GClassInitFunc)pidgin_icon_theme_class_init, /* class_init */ |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
97 | NULL, /* class_finalize */ |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
98 | NULL, /* class_data */ |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
99 | sizeof(PidginIconTheme), |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
100 | 0, /* n_preallocs */ |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
101 | pidgin_icon_theme_init, /* instance_init */ |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
102 | NULL, /* value table */ |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
103 | }; |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
104 | type = g_type_register_static(PURPLE_TYPE_THEME, |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
105 | "PidginIconTheme", &info, G_TYPE_FLAG_ABSTRACT); |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
106 | } |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
107 | return type; |
|
23965
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
108 | } |
|
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 | /***************************************************************************** |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
111 | * Public API functions |
|
23965
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 | const gchar * |
|
23972
90e0da03c053
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23967
diff
changeset
|
115 | pidgin_icon_theme_get_icon(PidginIconTheme *theme, |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
116 | const gchar *id) |
|
23965
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 | PidginIconThemePrivate *priv; |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
119 | |
|
13cd30de531b
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); |
|
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 | priv = PIDGIN_ICON_THEME_GET_PRIVATE(theme); |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
123 | |
|
23965
13cd30de531b
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); |
|
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 | |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
127 | void |
|
23972
90e0da03c053
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23967
diff
changeset
|
128 | pidgin_icon_theme_set_icon(PidginIconTheme *theme, |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
129 | const gchar *id, |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
130 | const gchar *filename) |
|
23965
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
131 | { |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
132 | PidginIconThemePrivate *priv; |
|
13cd30de531b
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)); |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
134 | |
|
23965
13cd30de531b
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); |
|
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
136 | |
|
23972
90e0da03c053
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23967
diff
changeset
|
137 | if (filename != NULL) |
|
90e0da03c053
theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23967
diff
changeset
|
138 | g_hash_table_replace(priv->icon_files, |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
139 | g_strdup(id), g_strdup(filename)); |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
140 | else |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23973
diff
changeset
|
141 | g_hash_table_remove(priv->icon_files, id); |
|
23965
13cd30de531b
Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
142 | } |