Esempio n. 1
0
static int parse_position(const char *pos)
{
	if (strcmp("top", pos) == 0)
		return PANEL_POSITION_TOP;
	else if (strcmp("bottom", pos) == 0)
		return PANEL_POSITION_BOTTOM;
	XWARNING("Unknown position type: %s, back to default 'top'", pos);
	return PANEL_POSITION_TOP;
}
Esempio n. 2
0
static int parse_draw_mode(const char *name, struct config_format_entry *e)
{
	struct config_format_entry *ee = find_config_format_entry(e, name);
	if (!ee || !ee->value)
		return DRAW_MODE_ALL;

	if (strcmp("all", ee->value) == 0) {
		return DRAW_MODE_ALL;
	} else if (strcmp("only_text", ee->value) == 0) {
		return DRAW_MODE_ONLY_TEXT;
	} else if (strcmp("only_icon", ee->value) == 0) {
		return DRAW_MODE_ONLY_ICON;
	}

	XWARNING("Unknown draw mode value, using \"all\" (line: %d)",
		ee->value, ee->line);
	return DRAW_MODE_ALL;
}