X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=plugins%2Fplacement%2Fhistory.c;h=797aef3b8978606a3444b8095583b4c2be739b14;hb=1052ca3f744bdad473b6e4028999375fb11d220b;hp=9d932b9edfbe7e0ca292738f298f91ae0d6782ce;hpb=d2857b11944146e2e6973b7f7280cb57e1ee260b;p=chaz%2Fopenbox diff --git a/plugins/placement/history.c b/plugins/placement/history.c index 9d932b9e..797aef3b 100644 --- a/plugins/placement/history.c +++ b/plugins/placement/history.c @@ -3,7 +3,7 @@ #include "kernel/frame.h" #include "kernel/client.h" #include "kernel/screen.h" -#include "kernel/parse.h" +#include "parser/parse.h" #include "history.h" #include #include @@ -41,9 +41,9 @@ static struct HistoryItem *history_find(const char *name, const char *class, /* find the client */ for (it = history_list; it != NULL; it = it->next) { hi = it->data; - if (!g_utf8_collate(hi->name, name) && - !g_utf8_collate(hi->class, class) && - !g_utf8_collate(hi->role, role)) + if (!strcmp(hi->name, name) && + !strcmp(hi->class, class) && + !strcmp(hi->role, role)) return hi; } return NULL; @@ -193,18 +193,8 @@ static void load_history() char *role; struct HistoryItem *hi; - if (!(doc = xmlParseFile(history_path))) + if (!parse_load(history_path, "openbox_history", &doc, &node)) return; - if (!(node = xmlDocGetRootElement(doc))) { - xmlFreeDoc(doc); - doc = NULL; - return; - } - if (xmlStrcasecmp(node->name, (const xmlChar*)"openbox_history")) { - xmlFreeDoc(doc); - doc = NULL; - return; - } node = parse_find_node("entry", node->xmlChildrenNode); while (node) {