changeset 3000:6d95285533df

[gaim-migrate @ 3013] 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. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Mon, 04 Mar 2002 03:04:49 +0000
parents 82b1553d53d0
children 87fff45fa36b
files plugins/chatlist.c src/gtkimhtml.c src/protocols/oscar/oscar.c src/protocols/oscar/ssi.c
diffstat 4 files changed, 28 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/chatlist.c	Sun Mar 03 23:53:28 2002 +0000
+++ b/plugins/chatlist.c	Mon Mar 04 03:04:49 2002 +0000
@@ -178,7 +178,7 @@
 		if (!g_strncasecmp(AOL_SRCHSTR, c, strlen(AOL_SRCHSTR))) {
 			char *t;
 			int len = 0;
-			int exchange = 4;
+			int exchange = 5;
 			char *name = NULL;
 
 			c += strlen(AOL_SRCHSTR);
@@ -190,8 +190,8 @@
 					name[len - 1] = ' ';
 				else if (*t == '&') {
 					name[len - 1] = 0;
-					sscanf(t, "&amp;Exchange=%d", &exchange);
-					c = t + strlen("&amp;Exchange=x");
+					sscanf(t, "&Exchange=%d", &exchange);
+					c = t + strlen("&Exchange=x");
 					break;
 				} else
 					name[len - 1] = *t;
--- a/src/gtkimhtml.c	Sun Mar 03 23:53:28 2002 +0000
+++ b/src/gtkimhtml.c	Mon Mar 04 03:04:49 2002 +0000
@@ -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) {
+	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);
-		gdk_draw_rectangle (window, gc, TRUE, line->x - xoff, line->y - yoff,
-				    width, line->height);
 	}
 
 	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);
--- a/src/protocols/oscar/oscar.c	Sun Mar 03 23:53:28 2002 +0000
+++ b/src/protocols/oscar/oscar.c	Mon Mar 04 03:04:49 2002 +0000
@@ -2768,7 +2768,7 @@
 	/* Delete the buddy list */
 	if (odata->icq) {
 		aim_ssi_deletelist(sess, fr->conn);
-		return;
+		return 1;
 	}
 
 	/* Activate SSI */
--- a/src/protocols/oscar/ssi.c	Sun Mar 03 23:53:28 2002 +0000
+++ b/src/protocols/oscar/ssi.c	Mon Mar 04 03:04:49 2002 +0000
@@ -212,7 +212,7 @@
  */
 faim_export int aim_ssi_deletelist(aim_session_t *sess, aim_conn_t *conn)
 {
-	int i, num;
+	int num;
 	struct aim_ssi_item *cur, **items;
 
 	for (cur=sess->ssi.items, num=0; cur; cur=cur->next)
@@ -853,7 +853,7 @@
  */
 faim_export int aim_ssi_setpermdeny(aim_session_t *sess, aim_conn_t *conn, int permdeny) {
 	struct aim_ssi_item *cur, *tmp;
-	fu16_t i, j;
+	fu16_t j;
 	aim_tlv_t *tlv;
 
 	if (!sess || !conn)