Update of /cvsroot/gaim/gaim/src
In directory usw-pr-cvs1:/tmp/cvs-serv24612/src
Modified Files:
gtkimhtml.c
Log Message:
Played with the font loader some more in gtkimhtml.c
This one is the closest I've done to Eric's, I think. It should cause the least problems.
Also fixed the chatlist plugin again.
Index: gtkimhtml.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.c,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -d -r1.98 -r1.99
--- gtkimhtml.c 3 Mar 2002 20:19:30 -0000 1.98
+++ gtkimhtml.c 4 Mar 2002 03:04:48 -0000 1.99
@@ -638,10 +638,7 @@
gc = gdk_gc_new (window);
cmap = gtk_widget_get_colormap (GTK_WIDGET (imhtml));
- if (line->selected) {
- gdk_color_alloc (cmap, imhtml->default_hl_color);
- gdk_gc_set_foreground(gc, imhtml->default_hl_color);
- } else if (bit->bg != NULL) {
+ if (bit->bg != NULL) {
gdk_color_alloc (cmap, bit->bg);
gdk_gc_set_foreground (gc, bit->bg);
} else {
@@ -651,11 +648,14 @@
gdk_draw_rectangle (window, gc, TRUE, line->x - xoff, line->y - yoff, line->width, line->height);
- if (bit->back != NULL) {
- gdk_color_alloc (cmap, bit->back);
- gdk_gc_set_foreground (gc, bit->back);
+ if (line->selected) {
+ gdk_color_alloc (cmap, imhtml->default_hl_color);
+ gdk_gc_set_foreground(gc, imhtml->default_hl_color);
gdk_draw_rectangle (window, gc, TRUE, line->x - xoff, line->y - yoff,
width, line->height);
+ } else if (bit->back != NULL) {
+ gdk_color_alloc (cmap, bit->back);
+ gdk_gc_set_foreground (gc, bit->back);
}
if (bit->bm) {
@@ -2179,29 +2179,27 @@
/* If the font didn't load, we change some of the xlfds one by one
* to get the closest we can. */
if (!ret_font) {
- if (!useregenc &&
- (!italics || italicsind == 2) &&
- !usebold && !usesize) {
- useregenc = TRUE;
- usebold = TRUE;
- italicsind = 0;
- usesize = TRUE;
- if (names && !names[nameind++]) {
- ret_font = gdk_font_ref(default_font);
- break;
- }
- }
- if (useregenc)
+ if (useregenc) {
useregenc = FALSE;
- else if (usesize) {
- useregenc = TRUE;
- usesize = FALSE;
} else if (italics && italicsind != 2) {
useregenc = TRUE;
italicsind++;
- } else if (usebold) {
+ } else if (bold && usebold) {
useregenc = TRUE;
+ italicsind=0;
usebold = FALSE;
+ } else if (usesize) {
+ useregenc = TRUE;
+ italicsind = 0;
+ usebold = TRUE;
+ usesize = FALSE;
+ } else if (names && names[nameind++]) {
+ useregenc = TRUE;
+ italicsind = 0;
+ usebold = TRUE;
+ usesize = TRUE;
+ } else {
+ ret_font = gdk_font_ref(default_font);
}
}
g_strfreev (names);
|