changeset 8691:0eb5161ef333

[gaim-migrate @ 9444] Patch by Stu Tomlinson to disable the font size and background color buttons in MSN, and close the tags in msn/utils.c. Thanks :) committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 18 Apr 2004 03:27:33 +0000
parents b3b3384bc1e6
children 0680ca680e92
files src/account.h src/connection.h src/gtkconv.c src/protocols/msn/msn.c src/protocols/msn/utils.c
diffstat 5 files changed, 14 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/account.h	Sun Apr 18 01:37:19 2004 +0000
+++ b/src/account.h	Sun Apr 18 03:27:33 2004 +0000
@@ -72,7 +72,7 @@
 	GSList *permit;             /**< Permit list.                         */
 	GSList *deny;               /**< Deny list.                           */
 	int perm_deny;              /**< The permit/deny setting.             */
- 	GaimLog *system_log;        /**< The system log                       */
+	GaimLog *system_log;        /**< The system log                       */
 };
 
 #ifdef __cplusplus
--- a/src/connection.h	Sun Apr 18 01:37:19 2004 +0000
+++ b/src/connection.h	Sun Apr 18 03:27:33 2004 +0000
@@ -42,7 +42,8 @@
 					           background colors.                  */
 	GAIM_CONNECTION_AUTO_RESP  = 0x0004,  /**< Send auto responses when away.       */
 	GAIM_CONNECTION_FORMATTING_WBFO = 0x0008, /**< The text buffer must be formatted as a whole */
-	GAIM_CONNECTION_NO_NEWLINES = 0x0010  /**< No new lines are allowed in outgoing messages */
+	GAIM_CONNECTION_NO_NEWLINES = 0x0010, /**< No new lines are allowed in outgoing messages */
+	GAIM_CONNECTION_NO_FONTSIZE = 0x0020 /**< Connection does not send/receive font sizes */
 } GaimConnectionFlags;
 
 typedef enum
--- a/src/gtkconv.c	Sun Apr 18 01:37:19 2004 +0000
+++ b/src/gtkconv.c	Sun Apr 18 03:27:33 2004 +0000
@@ -248,7 +248,8 @@
 			gtk_imhtml_toggle_fontface(GTK_IMHTML(c->entry), c->fontface);
 		}
 
-		if (gaim_prefs_get_bool("/gaim/gtk/conversations/use_custom_size"))
+		if (!(gc->flags & GAIM_CONNECTION_NO_FONTSIZE) &&
+			gaim_prefs_get_bool("/gaim/gtk/conversations/use_custom_size"))
 		{
 		        gtk_imhtml_font_set_size(GTK_IMHTML(c->entry),
 					gaim_prefs_get_int("/gaim/gtk/conversations/font_size"));
@@ -2368,6 +2369,10 @@
 				buttons &= ~GTK_IMHTML_IMAGE;
 			if (gc->flags & GAIM_CONNECTION_NO_BGCOLOR)
 				buttons &= ~GTK_IMHTML_BACKCOLOR;
+			if (gc->flags & GAIM_CONNECTION_NO_FONTSIZE) {
+				buttons &= ~GTK_IMHTML_GROW;
+				buttons &= ~GTK_IMHTML_SHRINK;
+			}
 		} else {
 			buttons = GTK_IMHTML_SMILEY;
 		}
--- a/src/protocols/msn/msn.c	Sun Apr 18 01:37:19 2004 +0000
+++ b/src/protocols/msn/msn.c	Sun Apr 18 03:27:33 2004 +0000
@@ -499,7 +499,7 @@
 		msn_http_session_init(session);
 
 	gc->proto_data = session;
-	gc->flags |= GAIM_CONNECTION_HTML | GAIM_CONNECTION_FORMATTING_WBFO;
+	gc->flags |= GAIM_CONNECTION_HTML | GAIM_CONNECTION_FORMATTING_WBFO | GAIM_CONNECTION_NO_BGCOLOR | GAIM_CONNECTION_NO_FONTSIZE;
 
 	gaim_connection_update_progress(gc, _("Connecting"), 0, MSN_CONNECT_STEPS);
 
--- a/src/protocols/msn/utils.c	Sun Apr 18 01:37:19 2004 +0000
+++ b/src/protocols/msn/utils.c	Sun Apr 18 03:27:33 2004 +0000
@@ -57,6 +57,10 @@
 			pre = g_string_append_c(pre, '<');
 			pre = g_string_append_c(pre, *cur);
 			pre = g_string_append_c(pre, '>');
+			post = g_string_prepend_c(post, '>');
+			post = g_string_prepend_c(post, *cur);
+			post = g_string_prepend_c(post, '/');
+			post = g_string_prepend_c(post, '<');
 			cur++;
 		}
 	}