im.pidgin.pidgin: 076a7bfc9283437acb17a9e8d87235539b662227

sadrul at pidgin.im sadrul at pidgin.im
Fri Nov 30 13:26:31 EST 2007


-----------------------------------------------------------------
Revision: 076a7bfc9283437acb17a9e8d87235539b662227
Ancestor: 1318f94102a869d0ffb2bc95a5e421a7f7145f62
Author: sadrul at pidgin.im
Date: 2007-11-30T18:10:16
Branch: im.pidgin.pidgin

Modified files:
        ChangeLog ChangeLog.API doc/finch.1.in finch/gntblist.c
        finch/libgnt/gntcolors.c

ChangeLog: 

Update the changelogs. Correct the man page. Allow 'default' to mean the
default color (-1).

-------------- next part --------------
============================================================
--- ChangeLog	75fbeac2422587141e107c5afd887ead0505ebff
+++ ChangeLog	b111f777dc7d497ec6fb3ade0e6e36cc55eadcc6
@@ -1,5 +1,10 @@ Pidgin and Finch: The Pimpin' Penguin IM
 Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul
 
+version 2.3.1 (??/??/????):
+	Finch:
+	* Color is used in the buddylist to indicate status. Look at the sample
+	  gntrc file in the man-page for details.
+
 version 2.3.0 (11/24/2007):
 	http://developer.pidgin.im/query?status=closed&milestone=2.3.0
 		NOTE: Some bugs marked fixed in 2.2.1, 2.2.2 or 2.2.3 may not
============================================================
--- ChangeLog.API	83f4523a5007e1518b6adfcb8c83073e0ddd1434
+++ ChangeLog.API	e79b673ea18efa03e5f01a1a24a652f8064c0929
@@ -1,5 +1,14 @@ Pidgin and Finch: The Pimpin' Penguin IM
 Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul
 
+version 2.3.1 (??/??/????):
+	Finch:
+		libgnt:
+		* Added gnt_tree_set_row_color to set the color for a row in a tree.
+		* Added gnt_style_get_string_list
+		* Added gnt_color_add_pair to define a new color.
+		* Added gnt_colors_get_color to get an ncurses color value from a
+		  string.
+
 version 2.3.0 (11/24/2007):
 	libpurple:
 		Added:
============================================================
--- doc/finch.1.in	33fa40a729dd634ed7c147b8bdc82b1c04de9175
+++ doc/finch.1.in	10c696423b33a1805e2d44bbc2b6218449c677c7
@@ -137,13 +137,13 @@ A sample file looks like:
 .br
 [Finch]
 .br
-online-color: green; black
+color-available = green; black
 .br
-away-color: blue; black
+color-away = blue; black
 .br
-idle-color: gray; black
+color-idle = gray; black
 .br
-offline-color: red; black
+color-offline = red; black
 .br
 #See below for details on color
 .br
============================================================
--- finch/gntblist.c	7bf883ace177505998b169a9181edfe7de0b757b
+++ finch/gntblist.c	cac01acd755fc8dfe697d9fc6871e218a81cbc3d
@@ -27,7 +27,6 @@
 
 #include <account.h>
 #include <blist.h>
-#include <curses.h>
 #include <notify.h>
 #include <request.h>
 #include <savedstatuses.h>
@@ -1788,22 +1787,19 @@ void finch_blist_init()
 
 void finch_blist_init()
 {
-	short fg, bg;
-	if (has_colors()) {
-		pair_content(GNT_COLOR_NORMAL, &fg, &bg);
-		color_available = get_color("color-available");
-		if (!color_available)
-			color_available = gnt_color_add_pair(COLOR_GREEN, bg);
-		color_away = get_color("color-away");
-		if (!color_away)
-			color_away = gnt_color_add_pair(COLOR_BLUE, bg);
-		color_idle = get_color("color-idle");
-		if (!color_idle)
-			color_idle = gnt_color_add_pair(COLOR_CYAN, bg);
-		color_offline = get_color("color-offline");
-		if (!color_offline)
-			color_offline = gnt_color_add_pair(COLOR_RED, bg);
-	}
+	color_available = get_color("color-available");
+	if (!color_available)
+		color_available = gnt_color_add_pair(COLOR_GREEN, -1);
+	color_away = get_color("color-away");
+	if (!color_away)
+		color_away = gnt_color_add_pair(COLOR_BLUE, -1);
+	color_idle = get_color("color-idle");
+	if (!color_idle)
+		color_idle = gnt_color_add_pair(COLOR_CYAN, -1);
+	color_offline = get_color("color-offline");
+	if (!color_offline)
+		color_offline = gnt_color_add_pair(COLOR_RED, -1);
+
 	purple_prefs_add_none(PREF_ROOT);
 	purple_prefs_add_none(PREF_ROOT "/size");
 	purple_prefs_add_int(PREF_ROOT "/size/width", 20);
============================================================
--- finch/libgnt/gntcolors.c	4a67c539e7fbdec118d41961202a6958250d48dc
+++ finch/libgnt/gntcolors.c	77e9ad645a3e0e458240eec63b91fe1242bd5fda
@@ -164,8 +164,12 @@ gnt_colors_get_color(char *key)
 		color = COLOR_MAGENTA;
 	else if (strcmp(key, "cyan") == 0)
 		color = COLOR_CYAN;
-	else
+	else if (strcmp(key, "default") == 0)
 		color = -1;
+	else {
+		g_warning("Invalid color name: %s\n", key);
+		color = -1;
+	}
 	return color;
 }
 


More information about the Commits mailing list