pidgin/gtkicon-theme.c

Wed, 21 Sep 2011 06:45:26 +0000

author
Elliott Sales de Andrade <qulogic@pidgin.im>
date
Wed, 21 Sep 2011 06:45:26 +0000
changeset 32575
eb4fc932fae9
parent 32535
232a97824349
child 39238
53cfb9400de8
permissions
-rw-r--r--

Apply conversation theme when opening the GTK conversation. All the
parsing stuff was moved out of the theme code and into the conversation
code.

Someone (not me!) needs to check the code I commented out and see if
we really need that stuff (and then port it to WebKit/styling).

We also need to determine where to place Template.html and the rest
of our (not-yet-written) default theme.

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) \
32535
232a97824349 Use GObject's instance private data for all the theme GObjects.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25875
diff changeset
29 (G_TYPE_INSTANCE_GET_PRIVATE((Gobject), PIDGIN_TYPE_ICON_THEME, PidginIconThemePrivate))
23965
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 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
57
23972
90e0da03c053 theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23967
diff changeset
58 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
59 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
60 }
13cd30de531b Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
61
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23973
diff changeset
62 static void
23972
90e0da03c053 theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23967
diff changeset
63 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
64 {
13cd30de531b Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
65 PidginIconThemePrivate *priv;
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 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
68
23965
13cd30de531b Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
69 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
70
23972
90e0da03c053 theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23967
diff changeset
71 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
72 }
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 static void
23972
90e0da03c053 theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23967
diff changeset
75 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
76 {
13cd30de531b Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
77 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
78
23972
90e0da03c053 theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23967
diff changeset
79 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
80
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23973
diff changeset
81 obj_class->finalize = pidgin_icon_theme_finalize;
32535
232a97824349 Use GObject's instance private data for all the theme GObjects.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25875
diff changeset
82
232a97824349 Use GObject's instance private data for all the theme GObjects.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25875
diff changeset
83 g_type_class_add_private(klass, sizeof(PidginIconThemePrivate));
23965
13cd30de531b Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
84 }
13cd30de531b Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
85
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23973
diff changeset
86 GType
23972
90e0da03c053 theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23967
diff changeset
87 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
88 {
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23973
diff changeset
89 static GType type = 0;
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23973
diff changeset
90 if (type == 0) {
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23973
diff changeset
91 static const GTypeInfo info = {
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23973
diff changeset
92 sizeof(PidginIconThemeClass),
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23973
diff changeset
93 NULL, /* base_init */
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23973
diff changeset
94 NULL, /* base_finalize */
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23973
diff changeset
95 (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
96 NULL, /* class_finalize */
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23973
diff changeset
97 NULL, /* class_data */
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23973
diff changeset
98 sizeof(PidginIconTheme),
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23973
diff changeset
99 0, /* n_preallocs */
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23973
diff changeset
100 pidgin_icon_theme_init, /* instance_init */
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23973
diff changeset
101 NULL, /* value table */
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23973
diff changeset
102 };
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23973
diff changeset
103 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
104 "PidginIconTheme", &info, G_TYPE_FLAG_ABSTRACT);
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23973
diff changeset
105 }
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23973
diff changeset
106 return type;
23965
13cd30de531b Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
107 }
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 /*****************************************************************************
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23973
diff changeset
110 * Public API functions
23965
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 const gchar *
23972
90e0da03c053 theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23967
diff changeset
114 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
115 const gchar *id)
23965
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 PidginIconThemePrivate *priv;
13cd30de531b Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
118
13cd30de531b Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
119 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
120
13cd30de531b Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
121 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
122
23965
13cd30de531b Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
123 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
124 }
13cd30de531b Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
125
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23973
diff changeset
126 void
23972
90e0da03c053 theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23967
diff changeset
127 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
128 const gchar *id,
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23973
diff changeset
129 const gchar *filename)
23965
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 PidginIconThemePrivate *priv;
13cd30de531b Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
132 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
133
23965
13cd30de531b Add the icon theme files, and re-work some things
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
134 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
135
23972
90e0da03c053 theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23967
diff changeset
136 if (filename != NULL)
90e0da03c053 theme loader cleanup, and remove a few warnings
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23967
diff changeset
137 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
138 g_strdup(id), g_strdup(filename));
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23973
diff changeset
139 else
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23973
diff changeset
140 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
141 }

mercurial