diff pidgin/gtkicon-theme.c @ 25122:9525fb966efb

theme loader cleanup, and remove a few warnings
author Justin Rodriguez <ffdragon@soc.pidgin.im>
date Tue, 26 Aug 2008 08:28:25 +0000
parents 0bbfb20bad19
children 1a4417138a8f
line wrap: on
line diff
--- a/pidgin/gtkicon-theme.c	Sun Aug 10 03:27:12 2008 +0000
+++ b/pidgin/gtkicon-theme.c	Tue Aug 26 08:28:25 2008 +0000
@@ -45,9 +45,6 @@
 static GObjectClass *parent_class = NULL;
 
 /******************************************************************************
- * Enums
- *****************************************************************************/
-/******************************************************************************
  * GObject Stuff                                                              
  *****************************************************************************/
 
@@ -61,14 +58,14 @@
 
 	priv = PIDGIN_ICON_THEME_GET_PRIVATE(instance);
 
-	priv->icon_files = g_hash_table_new_full (g_str_hash,
+	priv->icon_files = g_hash_table_new_full(g_str_hash,
 						   g_str_equal,
 						   g_free,
 						   g_free);
 }
 
 static void 
-pidgin_icon_theme_finalize (GObject *obj)
+pidgin_icon_theme_finalize(GObject *obj)
 {
 	PidginIconThemePrivate *priv;
 
@@ -76,21 +73,21 @@
 	
 	g_hash_table_destroy(priv->icon_files);
 
-	parent_class->finalize (obj);
+	parent_class->finalize(obj);
 }
 
 static void
-pidgin_icon_theme_class_init (PidginIconThemeClass *klass)
+pidgin_icon_theme_class_init(PidginIconThemeClass *klass)
 {
 	GObjectClass *obj_class = G_OBJECT_CLASS(klass);
 
-	parent_class = g_type_class_peek_parent (klass);
+	parent_class = g_type_class_peek_parent(klass);
 
         obj_class->finalize = pidgin_icon_theme_finalize;
 }
 
 GType 
-pidgin_icon_theme_get_type (void)
+pidgin_icon_theme_get_type(void)
 {
   static GType type = 0;
   if (type == 0) {
@@ -106,7 +103,7 @@
       pidgin_icon_theme_init,    /* instance_init */
       NULL,   /* value table */
     };
-    type = g_type_register_static (PURPLE_TYPE_THEME,
+    type = g_type_register_static(PURPLE_TYPE_THEME,
                                    "PidginIconTheme",
                                    &info, G_TYPE_FLAG_ABSTRACT);
   }
@@ -119,7 +116,7 @@
  *****************************************************************************/
 
 const gchar *
-pidgin_icon_theme_get_file(PidginIconTheme *theme,
+pidgin_icon_theme_get_icon(PidginIconTheme *theme,
 			    const gchar *id)
 {
 	PidginIconThemePrivate *priv;
@@ -132,7 +129,7 @@
 }
 
 void 
-pidgin_icon_theme_set_file(PidginIconTheme *theme,
+pidgin_icon_theme_set_icon(PidginIconTheme *theme,
 			    const gchar *id, 
 			    const gchar *filename)
 {
@@ -141,7 +138,8 @@
 	
 	priv = PIDGIN_ICON_THEME_GET_PRIVATE(theme);
 
-	if (filename != NULL)g_hash_table_replace(priv->icon_files,
+	if (filename != NULL)
+		g_hash_table_replace(priv->icon_files,
                  	             g_strdup(id),
                         	     g_strdup(filename));
 	else g_hash_table_remove(priv->icon_files, id);