Mercurial > pidgin
diff src/gtkimhtml.c @ 10899:1e6bdc7175e9
[gaim-migrate @ 12619]
Bits'n'pieces:
Don't allow gaim-remote "clones" to knock gaim out by specifying a big packet
length.
Correctly bound the point sizes in gtkimhtml & yahoo
Fix up some code in MSN that isn't actually being used, just in case someone
comes along and submits a patch that would use it.
Don't try writing to the server in MSN if you're not actually connected
Fix message flags in SILC
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Thu, 05 May 2005 13:09:28 +0000 |
parents | 6240d7fd5b2c |
children | d056acc96b30 |
line wrap: on
line diff
--- a/src/gtkimhtml.c Tue May 03 04:40:53 2005 +0000 +++ b/src/gtkimhtml.c Thu May 05 13:09:28 2005 +0000 @@ -96,10 +96,9 @@ static void paste_received_cb (GtkClipboard *clipboard, GtkSelectionData *selection_data, gpointer data); static void paste_plaintext_received_cb (GtkClipboard *clipboard, const gchar *text, gpointer data); -/* 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. */ +/* POINT_SIZE converts from AIM font sizes to a point size scale factor. */ #define MAX_FONT_SIZE 7 -#define POINT_SIZE(x) (options & GTK_IMHTML_USE_POINTSIZE ? x : _point_sizes [MIN ((x), MAX_FONT_SIZE) - 1]) +#define POINT_SIZE(x) (_point_sizes [MIN ((x > 0 ? x : 1), MAX_FONT_SCALE) - 1]) static gdouble _point_sizes [] = { .69444444, .8333333, 1, 1.2, 1.44, 1.728, 2.0736}; enum { @@ -3453,7 +3452,7 @@ GtkTextAttributes *attr = gtk_text_view_get_default_attributes(GTK_TEXT_VIEW(imhtml)); tag = gtk_text_buffer_create_tag(imhtml->text_buffer, str, "size", (gint) (pango_font_description_get_size(attr->font) * - (double) _point_sizes[size-1]), NULL); + (double) POINT_SIZE(size)), NULL); gtk_text_attributes_unref(attr); }