1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-23 19:39:06 +00:00

couple small fixes

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@455 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Brenden Matthews 2005-12-31 17:36:16 +00:00
parent a48b5f9428
commit 2d14e4af68
3 changed files with 26 additions and 12 deletions

View File

@ -1,5 +1,10 @@
# $Id$
2005-12-31
* Fixed bug with use_xft causing ignorance of font selection (sf.net
bug 1387564)
* Fixed issue with parsing of hex values for colours
2005-12-30
* Added BMPx (http://beep-media-player.org/) support

View File

@ -4840,12 +4840,10 @@ else if (strcasecmp(name, a) == 0 || strcasecmp(name, b) == 0)
use_xft = string_to_bool(value);
}
CONF("font") {
if (!use_xft) {
if (value) {
set_first_font(value);
} else
CONF_ERR;
}
if (value) {
set_first_font(value);
} else
CONF_ERR;
}
CONF("xftalpha") {
if (value && font_count >= 0)
@ -4868,10 +4866,12 @@ else if (strcasecmp(name, a) == 0 || strcasecmp(name, b) == 0)
}
CONF("font") {
#endif
if (value) {
set_first_font(value);
} else
CONF_ERR;
if (use_xft) {
if (value) {
set_first_font(value);
} else
CONF_ERR;
}
}
CONF("gap_x") {
if (value)

View File

@ -366,8 +366,17 @@ long get_x11_color(const char *name)
color.pixel = 0;
if (!XParseColor
(display, DefaultColormap(display, screen), name, &color)) {
ERR("can't parse X color '%s'", name);
return 0xFF00FF;
/* lets check if it's a hex colour with the # missing in front
* if yes, then do something about it
*/
char newname[64];
newname[0] = '#';
strncpy(&newname[1], name, 62);
/* now lets try again */
if (!XParseColor(display, DefaultColormap(display, screen), &newname[0], &color)) {
ERR("can't parse X color '%s'", name);
return 0xFF00FF;
}
}
if (!XAllocColor
(display, DefaultColormap(display, screen), &color))