*/
#include "config.h"
-
-#include <string.h>
-
-#include <glib/gi18n-lib.h>
-#include <telepathy-glib/dbus.h>
-#include <gtk/gtk.h>
-
-#include <telepathy-glib/util.h>
-
-#include <libempathy/empathy-gsettings.h>
-#include <libempathy/empathy-utils.h>
-
#include "empathy-theme-manager.h"
-#include "empathy-chat-view.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
{
}
}
-EmpathyChatView *
+EmpathyThemeAdium *
empathy_theme_manager_create_view (EmpathyThemeManager *self)
{
g_return_val_if_fail (EMPATHY_IS_THEME_MANAGER (self), NULL);
if (self->priv->adium_data != NULL)
- return EMPATHY_CHAT_VIEW (theme_manager_create_adium_view (self));
+ return theme_manager_create_adium_view (self);
g_return_val_if_reached (NULL);
}
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;
}