for MoveResizeTo, make <x>current</x> the same as not specifying <x/> at all

This commit is contained in:
Dana Jansens 2007-07-22 08:25:18 -04:00
parent 7d26873a32
commit dd41ae9889

View file

@ -33,15 +33,17 @@ static void parse_coord(xmlDocPtr doc, xmlNodePtr n, gint *pos,
gboolean *opposite, gboolean *center) gboolean *opposite, gboolean *center)
{ {
gchar *s = parse_string(doc, n); gchar *s = parse_string(doc, n);
if (!g_ascii_strcasecmp(s, "center")) if (g_ascii_strcasecmp(s, "current") != 0) {
*center = TRUE; if (!g_ascii_strcasecmp(s, "center"))
else { *center = TRUE;
if (s[0] == '-') else {
*opposite = TRUE; if (s[0] == '-')
if (s[0] == '-' || s[0] == '+') *opposite = TRUE;
*pos = atoi(s+1); if (s[0] == '-' || s[0] == '+')
else *pos = atoi(s+1);
*pos = atoi(s); else
*pos = atoi(s);
}
} }
g_free(s); g_free(s);
} }