]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-theme-manager.c
Change Finnish translation team web page to l10n.gnome.org
[empathy.git] / libempathy-gtk / empathy-theme-manager.c
index a74b3c823fe03410847d232c23187a286515f383..81361c1ef87c25505ed6d16e4c2936415f4149a1 100644 (file)
  */
 
 #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
 {
@@ -189,13 +177,13 @@ theme_manager_notify_adium_variant_cb (GSettings *gsettings_chat,
     }
 }
 
-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);
 }
@@ -370,9 +358,9 @@ empathy_theme_manager_get_adium_themes (void)
       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);
 
@@ -442,19 +430,21 @@ empathy_theme_manager_find_theme (const gchar *name)
 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;
 }