changeset 2694:91f4da998025

[gaim-migrate @ 2707] people are going to hate me for this but for some reason my encoding was coming up as ANSI_X3.4-1968. so it didn't work for me, so i removed it. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 08 Nov 2001 02:39:02 +0000
parents 2c746e70f2b3
children d4be9f5b8d58
files src/gtkimhtml.c
diffstat 1 files changed, 13 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkimhtml.c	Thu Nov 08 02:29:31 2001 +0000
+++ b/src/gtkimhtml.c	Thu Nov 08 02:39:02 2001 +0000
@@ -91,22 +91,6 @@
 	gchar **image;
 };
 
-static gchar*
-getcharset ()
-{
-	static gchar charset [64];
-#ifdef HAVE_LANGINFO_CODESET
-	gchar *ch = nl_langinfo (CODESET);
-	if (!g_strncasecmp (ch, "iso-", 4))
-		g_snprintf (charset, sizeof (charset), "iso%s", ch + 4);
-	else
-		g_snprintf (charset, sizeof (charset), ch);
-#else
-	g_snprintf (charset, sizeof (charset), "iso8859-*");
-#endif
-	return charset;
-}
-
 static GtkSmileyTree*
 gtk_smiley_tree_new ()
 {
@@ -1862,20 +1846,16 @@
 #endif
 }
 
-#define TRY_FONT	{ \
-				gchar *tmp = g_strjoinv ("-", newvals); \
-				GdkFont *ret_font; \
-				if (default_font->type == GDK_FONT_FONT) \
-					ret_font = gdk_font_load (tmp); \
-				else \
-					ret_font = gdk_fontset_load (tmp); \
-				g_free (tmp); \
-				if (ret_font) { \
-					g_strfreev (xflds); \
-					g_strfreev (names); \
-					g_strfreev (csvals); \
-					return ret_font; \
-				} \
+#define TRY_FONT	tmp = g_strjoinv ("-", newvals); \
+			if (default_font->type == GDK_FONT_FONT) \
+				ret_font = gdk_font_load (tmp); \
+			else \
+				ret_font = gdk_fontset_load (tmp); \
+			g_free (tmp); \
+			if (ret_font) { \
+				g_strfreev (xflds); \
+				g_strfreev (names); \
+				return ret_font; \
 			}
 
 
@@ -1894,8 +1874,9 @@
 	gint i;
 	gchar **names;
 	gchar fs[10];
-	gchar *charset;
-	gchar **csvals;
+
+	gchar *tmp;
+	GdkFont *ret_font;
 
 	if (!name && !bold && !italics && !fontsize)
 		return gdk_font_ref (default_font);
@@ -1908,8 +1889,6 @@
 #define ITALICS 4
 #define SIZE 6
 #define PTSZ 7
-#define REG 13
-#define ENC 14
 #define END 15
 
 	if (name)
@@ -1918,8 +1897,6 @@
 		names = g_new0 (gchar *, 2);
 		names [0] = g_strdup (xflds [NAME]);
 	}
-	charset = getcharset ();
-	csvals = g_strsplit (charset, "-", 2);
 
 	for (i = 0; xflds [i]; i++)
 		newvals [i] = xflds [i];
@@ -1933,8 +1910,6 @@
 		newvals [SIZE] = fs;
 		newvals [PTSZ] = "";
 	}
-	newvals [REG] = csvals [0];
-	newvals [ENC] = csvals [1];
 	newvals [END] = NULL;
 
 	TRY_FONT;
@@ -1983,7 +1958,6 @@
 
 	g_strfreev (xflds);
 	g_strfreev (names);
-	g_strfreev (csvals);
 
 	return gdk_font_ref (default_font);
 }