+ switch (key[0]) {
+ case 'C':
+ switch (key[1]) {
+ case 'a': /* Categories */
+ if (strcmp(key+2, "tegories")) return FALSE;
+ v.type = OBT_DDPARSE_STRINGS; break;
+ case 'o': /* Comment */
+ if (strcmp(key+2, "mment")) return FALSE;
+ v.type = OBT_DDPARSE_LOCALESTRING; break;
+ default:
+ return FALSE;
+ }
+ break;
+ case 'E': /* Exec */
+ if (strcmp(key+1, "xec")) return FALSE;
+ v.type = OBT_DDPARSE_EXEC; parse->flags |= DE_EXEC; break;
+ case 'G': /* GenericName */
+ if (strcmp(key+1, "enericName")) return FALSE;
+ v.type = OBT_DDPARSE_LOCALESTRING; break;
+ case 'I': /* Icon */
+ if (strcmp(key+1, "con")) return FALSE;
+ v.type = OBT_DDPARSE_LOCALESTRING; break;
+ case 'H': /* Hidden */
+ if (strcmp(key+1, "idden")) return FALSE;
+ v.type = OBT_DDPARSE_BOOLEAN; break;
+ case 'M': /* MimeType */
+ if (strcmp(key+1, "imeType")) return FALSE;
+ v.type = OBT_DDPARSE_STRINGS; break;
+ case 'N':
+ switch (key[1]) {
+ case 'a': /* Name */
+ if (strcmp(key+2, "me")) return FALSE;
+ v.type = OBT_DDPARSE_LOCALESTRING; parse->flags |= DE_NAME; break;
+ case 'o':
+ switch (key[2]) {
+ case 'D': /* NoDisplay */
+ if (strcmp(key+3, "isplay")) return FALSE;
+ v.type = OBT_DDPARSE_BOOLEAN; break;
+ case 't': /* NotShowIn */
+ if (strcmp(key+3, "ShowIn")) return FALSE;
+ v.type = OBT_DDPARSE_STRINGS; break;
+ default:
+ return FALSE;
+ }
+ break;
+ default:
+ return FALSE;
+ }
+ break;
+ case 'P': /* Path */
+ if (strcmp(key+1, "ath")) return FALSE;
+ v.type = OBT_DDPARSE_STRING; break;
+ case 'S': /* Path */
+ if (key[1] == 't' && key[2] == 'a' && key[3] == 'r' &&
+ key[4] == 't' && key[5] == 'u' && key[6] == 'p')
+ switch (key[7]) {
+ case 'N': /* StartupNotify */
+ if (strcmp(key+8, "otify")) return FALSE;
+ v.type = OBT_DDPARSE_BOOLEAN; break;
+ case 'W': /* StartupWMClass */
+ if (strcmp(key+8, "MClass")) return FALSE;
+ v.type = OBT_DDPARSE_STRING; break;
+ default:
+ return FALSE;
+ }
+ else
+ return FALSE;
+ break;
+ case 'T':
+ switch (key[1]) {
+ case 'e': /* Terminal */
+ if (strcmp(key+2, "rminal")) return FALSE;
+ v.type = OBT_DDPARSE_BOOLEAN; break;
+ case 'r': /* TryExec */
+ if (strcmp(key+2, "yExec")) return FALSE;
+ v.type = OBT_DDPARSE_STRING; break;
+ case 'y': /* Type */
+ if (strcmp(key+2, "pe")) return FALSE;
+ v.type = OBT_DDPARSE_ENUM_TYPE; parse->flags |= DE_TYPE; break;
+ default:
+ return FALSE;
+ }
+ break;
+ case 'U': /* URL */
+ if (strcmp(key+1, "RL")) return FALSE;
+ v.type = OBT_DDPARSE_STRING; parse->flags |= DE_URL; break;
+ case 'V': /* MimeType */
+ if (strcmp(key+1, "ersion")) return FALSE;
+ v.type = OBT_DDPARSE_STRING; break;
+ default:
+ return FALSE;
+ }