*/
#include "config.h"
-
-#include <string.h>
-
-#include <glib/gi18n-lib.h>
-#include <gtk/gtk.h>
-
-#include <telepathy-glib/telepathy-glib.h>
-
-#include <libempathy/empathy-gsettings.h>
-#include <libempathy/empathy-utils.h>
-
#include "empathy-theme-manager.h"
-#include "empathy-theme-adium.h"
+
+#include "empathy-gsettings.h"
#define DEBUG_FLAG EMPATHY_DEBUG_OTHER
-#include <libempathy/empathy-debug.h>
+#include "empathy-debug.h"
struct _EmpathyThemeManagerPriv
{
g_free (path);
}
+ result = g_hash_table_get_values (hash);
/* Pass ownership of the info hash table to the list */
- result = g_list_copy_deep (g_hash_table_get_values (hash),
- (GCopyFunc) g_hash_table_ref, NULL);
+ g_list_foreach (result, (GFunc) g_hash_table_ref, NULL);
g_hash_table_unref (hash);
gchar *
empathy_theme_manager_dup_theme_name_from_path (const gchar *path)
{
- gchar *fullname, *result;
- gchar **tmp;
+ gchar *fullname = NULL, *result = NULL;
+ gchar **tmp = NULL;
if (path == NULL)
return NULL;
fullname = g_path_get_basename (path);
if (!g_str_has_suffix (fullname, ".AdiumMessageStyle"))
- return NULL;
+ goto out;
tmp = g_strsplit (fullname, ".AdiumMessageStyle", 0);
result = g_strdup (tmp[0]);
+out:
g_strfreev (tmp);
+ g_free (fullname);
return result;
}