im.pidgin.pidgin: 872484bf9e23965956bacedc374083deeb3329d4
sadrul at pidgin.im
sadrul at pidgin.im
Sun Dec 2 02:40:38 EST 2007
-----------------------------------------------------------------
Revision: 872484bf9e23965956bacedc374083deeb3329d4
Ancestor: 222a94048dd0dc63bbf0d1bc45985618bec433a8
Author: sadrul at pidgin.im
Date: 2007-12-02T07:16:05
Branch: im.pidgin.pidgin
Modified files:
finch/libgnt/gntcolors.c
ChangeLog:
Try to reuse an existing color.
-------------- next part --------------
============================================================
--- finch/libgnt/gntcolors.c 77e9ad645a3e0e458240eec63b91fe1242bd5fda
+++ finch/libgnt/gntcolors.c f51ccbc7749fd0a6361fc6edc41cccdd2d85efe0
@@ -294,6 +294,13 @@ int gnt_color_add_pair(int fg, int bg)
int gnt_color_add_pair(int fg, int bg)
{
+ int i;
+ for (i = 1; i < custom_type; i++) {
+ short f, b;
+ if (pair_content(i, &f, &b) != ERR &&
+ f == fg && b == bg)
+ return i;
+ }
init_pair(custom_type, fg, bg);
return custom_type++;
}
More information about the Commits
mailing list