pidgin: e7d456f9: Fix fallback of Status.html to Content.h...

qulogic at pidgin.im qulogic at pidgin.im
Thu Sep 22 22:40:47 EDT 2011


----------------------------------------------------------------------
Revision: e7d456f915d62b570b1d83c985a4da5b1e982054
Parent:   6cba0d6cd68fbf5e0d3989623f7e5a58c6b4016d
Author:   qulogic at pidgin.im
Date:     09/22/11 22:19:47
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/e7d456f915d62b570b1d83c985a4da5b1e982054

Changelog: 

Fix fallback of Status.html to Content.html.

Changes against parent 6cba0d6cd68fbf5e0d3989623f7e5a58c6b4016d

  patched  pidgin/gtkconv-theme.c

-------------- next part --------------
============================================================
--- pidgin/gtkconv-theme.c	6a293cf127fb569df6bbbd9f887e53e57007754c
+++ pidgin/gtkconv-theme.c	50cff656f86238a21c9b709124ea3a23244f1a29
@@ -319,39 +319,39 @@ static const char *
 }
 
 static const char *
-get_status_html(PidginConvThemePrivate *priv, const char *dir)
+get_content_html(PidginConvThemePrivate *priv, const char *dir)
 {
 	char *file;
 
-	if (priv->status_html)
-		return priv->status_html;
+	if (priv->content_html)
+		return priv->content_html;
 
-	file = g_build_filename(dir, "Contents", "Resources", "Status.html", NULL);
-	if (!g_file_get_contents(file, &priv->status_html, NULL, NULL)) {
-		purple_debug_info("webkit", "%s could not find Resources/Status.html\n", dir);
-		priv->status_html = g_strdup("");
+	file = g_build_filename(dir, "Contents", "Resources", "Content.html", NULL);
+	if (!g_file_get_contents(file, &priv->content_html, NULL, NULL)) {
+		purple_debug_info("webkit", "%s did not have a Content.html\n", dir);
+		priv->content_html = g_strdup("");
 	}
 	g_free(file);
 
-	return priv->status_html;
+	return priv->content_html;
 }
 
 static const char *
-get_content_html(PidginConvThemePrivate *priv, const char *dir)
+get_status_html(PidginConvThemePrivate *priv, const char *dir)
 {
 	char *file;
 
-	if (priv->content_html)
-		return priv->content_html;
+	if (priv->status_html)
+		return priv->status_html;
 
-	file = g_build_filename(dir, "Contents", "Resources", "Content.html", NULL);
-	if (!g_file_get_contents(file, &priv->content_html, NULL, NULL)) {
-		purple_debug_info("webkit", "%s did not have a Content.html\n", dir);
-		priv->content_html = g_strdup("");
+	file = g_build_filename(dir, "Contents", "Resources", "Status.html", NULL);
+	if (!g_file_get_contents(file, &priv->status_html, NULL, NULL)) {
+		purple_debug_info("webkit", "%s could not find Resources/Status.html\n", dir);
+		priv->status_html = g_strdup(get_content_html(priv, dir));
 	}
 	g_free(file);
 
-	return priv->content_html;
+	return priv->status_html;
 }
 
 static const char *


More information about the Commits mailing list