pidgin.next.minor: ee8cbf9d: Fix some theme manager assertion failure...

rlaager at pidgin.im rlaager at pidgin.im
Mon Dec 1 12:26:00 EST 2008


-----------------------------------------------------------------
Revision: ee8cbf9dcaea5349c8f63742fd6b5f7134345c0e
Ancestor: 0be4982c76350b1b175220fb6b818186eba549cd
Author: rlaager at pidgin.im
Date: 2008-12-01T17:04:29
Branch: im.pidgin.pidgin.next.minor
URL: http://d.pidgin.im/viewmtn/revision/info/ee8cbf9dcaea5349c8f63742fd6b5f7134345c0e

Modified files:
        libpurple/core.c libpurple/theme-loader.c
        libpurple/theme-manager.c libpurple/theme.c

ChangeLog: 

Fix some theme manager assertion failures.

-------------- next part --------------
============================================================
--- libpurple/core.c	633db0362f344b6c7db6ddebdef93bdff63a43ca
+++ libpurple/core.c	080672068ed297385dd324886b9997f925668a4b
@@ -174,6 +174,8 @@ purple_core_init(const char *ui)
 	purple_xfers_init();
 	purple_idle_init();
 	purple_smileys_init();
+	purple_theme_manager_init();
+	purple_theme_manager_refresh();
 	/*
 	 * Call this early on to try to auto-detect our IP address and
 	 * hopefully save some time later.
@@ -182,8 +184,6 @@ purple_core_init(const char *ui)
 
 	if (ops != NULL && ops->ui_init != NULL)
 		ops->ui_init();
-	
-	purple_theme_manager_refresh();
 
 	return TRUE;
 }
============================================================
--- libpurple/theme-loader.c	99341dbdac18cdf837335477ff8d27a94feece7b
+++ libpurple/theme-loader.c	23e27823c3e0c45bb432b357d0ab5b406c7f77fe
@@ -20,7 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  *
  */
-
+#include "internal.h"
 #include "theme-loader.h"
 
 #define PURPLE_THEME_LOADER_GET_PRIVATE(PurpleThemeLoader) \
============================================================
--- libpurple/theme-manager.c	30d7a59573c55ecf0a5c7adef204fe9a75a47988
+++ libpurple/theme-manager.c	9e32265ea5a385e932563d5cf29f883fc7f02ad9
@@ -20,9 +20,10 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  *
  */
-
+#include <glib.h>
 #include <string.h>
 
+#include "internal.h"
 #include "theme-manager.h"
 #include "util.h"
 
@@ -67,8 +68,8 @@ purple_theme_manager_make_key(const gcha
 static gchar *
 purple_theme_manager_make_key(const gchar *name, const gchar *type)
 {
-	g_return_val_if_fail(name && strlen(name), NULL);
-	g_return_val_if_fail(type && strlen(type), NULL);		
+	g_return_val_if_fail(name && *name, NULL);
+	g_return_val_if_fail(type && *type, NULL);		
 	return g_strconcat(type, "/", name, NULL);
 }
 
@@ -109,12 +110,13 @@ purple_theme_manager_build_dir(const gch
 
 	rdir = g_dir_open(root, 0, NULL);
 
-	g_return_if_fail(rdir);
+	if (!rdir)
+		return;
 
 	/* Parses directory by root/name/purple/type */
 	while((name = g_dir_read_name(rdir))) {
 		purple_dir = g_build_filename(root, name, "purple", NULL);
-		tdir =  g_dir_open(purple_dir, 0, NULL);
+		tdir = g_dir_open(purple_dir, 0, NULL);
 	
 		if(!tdir) {
 			g_free(purple_dir);
@@ -150,9 +152,9 @@ purple_theme_manager_init(void)
 purple_theme_manager_init(void)
 {
 	theme_table = g_hash_table_new_full(g_str_hash,
-               	                             g_str_equal,
-               	                             g_free,
-               	                             g_object_unref);
+	       	                             g_str_equal,
+	       	                             g_free,
+	       	                             g_object_unref);
 }
 
 void 
============================================================
--- libpurple/theme.c	53cc43633c204df22cf78a1a9cf18daddb897892
+++ libpurple/theme.c	2af1a4dd0442fcaeab3720d4eea4f0afc1dd2aac
@@ -20,12 +20,13 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  *
  */
+#include <glib.h>
+#include <string.h>
 
+#include "internal.h"
 #include "theme.h"
 #include "util.h"
 
-#include <string.h>
-
 #define PURPLE_THEME_GET_PRIVATE(PurpleTheme) \
 	((PurpleThemePrivate *) ((PurpleTheme)->priv))
 


More information about the Commits mailing list