changeset 5367:fc0441fbf159

[gaim-migrate @ 5743] javabsp fixed y!m point sizes (again) committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Wed, 14 May 2003 04:11:23 +0000
parents 23898d72679c
children c4e7a079cc04
files plugins/simple.c src/gtkconv.c src/gtkimhtml.c src/gtkimhtml.h src/protocols/yahoo/yahoo.c src/prpl.h
diffstat 6 files changed, 15 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/simple.c	Wed May 14 01:15:58 2003 +0000
+++ b/plugins/simple.c	Wed May 14 04:11:23 2003 +0000
@@ -21,7 +21,7 @@
 {
 	2,                                                /**< api_version    */
 	GAIM_PLUGIN_STANDARD,                             /**< type           */
-	NULL,                                             /**< ui_requirement */
+    NULL,                                             /**< ui_requirement */
 	0,                                                /**< flags          */
 	NULL,                                             /**< dependencies   */
 	GAIM_PRIORITY_DEFAULT,                            /**< priority       */
--- a/src/gtkconv.c	Wed May 14 01:15:58 2003 +0000
+++ b/src/gtkconv.c	Wed May 14 04:11:23 2003 +0000
@@ -3676,6 +3676,7 @@
 
 	if (gaim_window_get_conversation_count(win) == 1)
 		g_timeout_add(0, (GSourceFunc)update_send_as_selection, win);
+
 }
 
 static void
@@ -3962,6 +3963,8 @@
 
 	if (!(logging_options & OPT_LOG_STRIP_HTML))
 		gtk_font_options ^= GTK_IMHTML_RETURN_LOG;
+	if (GAIM_PLUGIN_PROTOCOL_INFO(conv->account->gc->prpl)->options & OPT_PROTO_USE_POINTSIZE)
+		gtk_font_options ^= GTK_IMHTML_USE_POINTSIZE;
 
 	if (flags & WFLAG_SYSTEM) {
 		if (convo_options & OPT_CONVO_SHOW_TIME)
--- a/src/gtkimhtml.c	Wed May 14 01:15:58 2003 +0000
+++ b/src/gtkimhtml.c	Wed May 14 04:11:23 2003 +0000
@@ -71,7 +71,7 @@
 /* POINT_SIZE converts from AIM font sizes to point sizes.  It probably should be redone in such a
  * way that it base the sizes off the default font size rather than using arbitrary font sizes. */
 #define MAX_FONT_SIZE 7
-#define POINT_SIZE(x) (_point_sizes [MIN ((x), MAX_FONT_SIZE) - 1])
+#define POINT_SIZE(x) (options & GTK_IMHTML_USE_POINTSIZE ? x : _point_sizes [MIN ((x), MAX_FONT_SIZE) - 1])
 static gint _point_sizes [] = { 8, 10, 12, 14, 20, 30, 40 };
 
 /* The four elements present in a <FONT> tag contained in a struct */
--- a/src/gtkimhtml.h	Wed May 14 01:15:58 2003 +0000
+++ b/src/gtkimhtml.h	Wed May 14 04:11:23 2003 +0000
@@ -88,7 +88,8 @@
 	GTK_IMHTML_NO_NEWLINE   = 1 << 4,
 	GTK_IMHTML_NO_SIZES	= 1 << 5,
 	GTK_IMHTML_NO_SCROLL	= 1 << 6,
-	GTK_IMHTML_RETURN_LOG	= 1 << 7
+	GTK_IMHTML_RETURN_LOG	= 1 << 7,
+	GTK_IMHTML_USE_POINTSIZE = 1 << 8
 } GtkIMHtmlOptions;
 
 GtkType    gtk_imhtml_get_type         (void);
@@ -167,7 +168,6 @@
 void gaim_hr_add_to(GtkIMHtmlScalable *, GtkIMHtml *, GtkTextIter *);
 
 
-
 #ifdef __cplusplus
 }
 #endif
--- a/src/protocols/yahoo/yahoo.c	Wed May 14 01:15:58 2003 +0000
+++ b/src/protocols/yahoo/yahoo.c	Wed May 14 04:11:23 2003 +0000
@@ -1459,7 +1459,7 @@
 static GaimPluginProtocolInfo prpl_info =
 {
 	GAIM_PROTO_YAHOO,
-	OPT_PROTO_MAIL_CHECK,
+	OPT_PROTO_MAIL_CHECK | OPT_PROTO_USE_POINTSIZE,
 	NULL,
 	NULL,
 	yahoo_list_icon,
--- a/src/prpl.h	Wed May 14 01:15:58 2003 +0000
+++ b/src/prpl.h	Wed May 14 04:11:23 2003 +0000
@@ -159,6 +159,13 @@
 	 */
 	OPT_PROTO_PASSWORD_OPTIONAL = 0x00000100,
 
+	/**
+	 * Allows font size to be specified in sane point size
+	 *
+	 * Probably just Jabber and Y!M
+	 */
+	OPT_PROTO_USE_POINTSIZE = 0x00000200,
+
 } GaimProtocolOptions;
 
 /** Custom away message. */