-#include <string.h>
-#include "modest-icon-factory.h"
-
-static GHashTable *icon_hash = NULL;
-
-static
-gboolean equal_func (const gchar *s1, const gchar *s2)
-{
- return strcmp (s1, s2) == 0;
-}
-
-static
-void free_pixbuf (GdkPixbuf *pixbuf)
-{
- if (pixbuf)
- g_object_unref (G_OBJECT(pixbuf));
-}
-
-
-void
-modest_icon_factory_init (void)
-{
- if (icon_hash) {
- g_printerr ("modest: modest_icon_factory_init "
- "should be called only once\n");
- return;
- }
-
- icon_hash = g_hash_table_new_full (g_str_hash,
- (GEqualFunc)equal_func,
- (GDestroyNotify)g_free,
- (GDestroyNotify)free_pixbuf);
-}
-
-
-void
-modest_icon_factory_uninit (void)
-{
- if (!icon_hash) {
- g_printerr ("modest: modest_icon_factory_uninit "
- "must only be called with initialized "
- "ModestIconFactories\n");
- return;
- }
-
- g_hash_table_destroy (icon_hash);
- icon_hash = NULL;
-}
-
-