diff options
| author | Mikael Magnusson <mikachu@comhem.se> | 2006-06-09 12:47:48 +0000 |
|---|---|---|
| committer | Mikael Magnusson <mikachu@comhem.se> | 2006-06-09 12:47:48 +0000 |
| commit | 8af51d8a1be9c3cb9d89d1d8378de72f42599760 (patch) | |
| tree | f2fc8feaffe44238fa9db44632c7a15eab7b5a7a /openbox/config.c | |
| parent | 4a42260849ab284cc6a257c3d0cb74b4633a39de (diff) | |
add role matching to per app settings and fix a small memleak in the code that frees the per app list
Diffstat (limited to 'openbox/config.c')
| -rw-r--r-- | openbox/config.c | 8 |
1 files changed, 7 insertions, 1 deletions
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); } |
