From 8af51d8a1be9c3cb9d89d1d8378de72f42599760 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Fri, 9 Jun 2006 12:47:48 +0000 Subject: add role matching to per app settings and fix a small memleak in the code that frees the per app list --- openbox/config.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'openbox/config.c') diff --git a/openbox/config.c b/openbox/config.c index e117de27..5b669685 100644 --- a/openbox/config.c +++ b/openbox/config.c @@ -124,6 +124,8 @@ static void parse_per_app_settings(ObParseInst *i, xmlDocPtr doc, xmlNodePtr n, c; ObAppSettings *settings = g_new0(ObAppSettings, 1); settings->name = name; + if (!parse_attr_string("role", app, &settings->role)) + settings->role = NULL; settings->decor = TRUE; if ((n = parse_find_node("decor", app->children))) @@ -755,7 +757,11 @@ void config_shutdown() g_free(it->data); g_slist_free(config_menu_files); - for (it = config_per_app_settings; it; it = g_slist_next(it)) + for (it = config_per_app_settings; it; it = g_slist_next(it)) { + ObAppSettings *itd = (ObAppSettings *)it->data; + g_free(itd->name); + g_free(itd->role); g_free(it->data); + } g_slist_free(config_per_app_settings); } -- cgit v1.2.3