diff console/gntblist.c @ 13927:9309d27d780c

[gaim-migrate @ 16447] Pseudo-shadow effect for the windows and buttons. Uses non-ASCII emblems for buddies in the buddy-list if locale is set to UTF. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Thu, 06 Jul 2006 17:54:46 +0000
parents fdf2dbed6faa
children 917a71dd02eb
line wrap: on
line diff
--- a/console/gntblist.c	Thu Jul 06 09:21:57 2006 +0000
+++ b/console/gntblist.c	Thu Jul 06 17:54:46 2006 +0000
@@ -141,7 +141,7 @@
 		GaimStatusPrimitive prim;
 		GaimPresence *presence;
 		GaimStatus *now;
-
+		gboolean ascii = gnt_ascii_only();
 		
 		presence = gaim_buddy_get_presence(buddy);
 		now = gaim_presence_get_active_status(presence);
@@ -150,29 +150,15 @@
 
 		switch(prim)
 		{
-#if 1
 			case GAIM_STATUS_OFFLINE:
-				strncpy(status, "x", sizeof(status) - 1);
+				strncpy(status, ascii ? "x" : "⊗", sizeof(status) - 1);
 				break;
 			case GAIM_STATUS_AVAILABLE:
-				strncpy(status, "o", sizeof(status) - 1);
+				strncpy(status, ascii ? "o" : "◯", sizeof(status) - 1);
 				break;
 			default:
-				strncpy(status, ".", sizeof(status) - 1);
-				break;
-#else
-			/* XXX: Let's use these some time */
-			case GAIM_STATUS_OFFLINE:
-				strncpy(status, "⊗", sizeof(status) - 1);
+				strncpy(status, ascii ? "." : "⊖", sizeof(status) - 1);
 				break;
-			case GAIM_STATUS_AVAILABLE:
-				/* XXX: Detect idleness */
-				strncpy(status, "◯", sizeof(status) - 1);
-				break;
-			default:
-				strncpy(status, "⊖", sizeof(status) - 1);
-				break;
-#endif
 		}
 		name = gaim_buddy_get_alias(buddy);
 	}
@@ -412,7 +398,7 @@
 
 	ggblist->tree = gnt_tree_new();
 	GNT_WIDGET_SET_FLAGS(ggblist->tree, GNT_WIDGET_NO_BORDER);
-	gnt_widget_set_size(ggblist->tree, 25, getmaxy(stdscr) - 3);
+	gnt_widget_set_size(ggblist->tree, 25, getmaxy(stdscr) - 4);
 
 	gnt_box_add_widget(GNT_BOX(ggblist->window), ggblist->tree);
 	gnt_widget_show(ggblist->window);