gboolean config_focus_follow;
gboolean config_focus_last;
gboolean config_focus_last_on_desktop;
-gboolean config_focus_popup;
-gboolean config_desktop_popup;
char *config_theme;
gint config_mouse_threshold;
gint config_mouse_dclicktime;
-gchar *config_menu_path;
+GSList *config_menu_files;
gint config_resist_win;
gint config_resist_edge;
config_focus_last = parse_bool(doc, n);
if ((n = parse_find_node("focusLastOnDesktop", node)))
config_focus_last_on_desktop = parse_bool(doc, n);
- if ((n = parse_find_node("cyclingDialog", node)))
- config_focus_popup = parse_bool(doc, n);
}
static void parse_theme(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
node = node->xmlChildrenNode;
if ((n = parse_find_node("theme", node))) {
+ gchar *c;
+
g_free(config_theme);
- config_theme = parse_string(doc, n);
+ c = parse_string(doc, n);
+ config_theme = expand_tilde(c);
+ g_free(c);
}
- if ((n = parse_find_node("titlelayout", node))) {
+ if ((n = parse_find_node("titleLayout", node))) {
g_free(config_title_layout);
config_title_layout = parse_string(doc, n);
}
nname = parse_find_node("name", nname->next);
}
}
- if ((n = parse_find_node("cyclingDialog", node)))
- config_desktop_popup = parse_bool(doc, n);
}
static void parse_resize(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
static void parse_menu(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, void *d)
{
- xmlNodePtr n;
-
- node = node->xmlChildrenNode;
- if ((n = parse_find_node("location", node))) {
- gchar *c;
-
- c = parse_string(doc, n);
- config_menu_path = expand_tilde(c);
- g_free(c);
+ for (node = node->xmlChildrenNode; node; node = node->next) {
+ if (!xmlStrcasecmp(node->name, (const xmlChar*) "file")) {
+ gchar *c;
+
+ c = parse_string(doc, node);
+ config_menu_files = g_slist_append(config_menu_files,
+ expand_tilde(c));
+ g_free(c);
+ }
}
}
config_focus_follow = FALSE;
config_focus_last = TRUE;
config_focus_last_on_desktop = TRUE;
- config_focus_popup = TRUE;
parse_register(i, "focus", parse_focus, NULL);
config_desktops_num = 4;
config_desktops_names = NULL;
- config_desktop_popup = TRUE;
parse_register(i, "desktops", parse_desktops, NULL);
parse_register(i, "resistance", parse_resistance, NULL);
- config_menu_path = NULL;
+ config_menu_files = NULL;
parse_register(i, "menu", parse_menu, NULL);
}
g_free(config_theme);
- for (it = config_desktops_names; it; it = it->next)
+ for (it = config_desktops_names; it; it = g_slist_next(it))
g_free(it->data);
g_slist_free(config_desktops_names);
+
+ for (it = config_menu_files; it; it = g_slist_next(it))
+ g_free(it->data);
+ g_slist_free(config_menu_files);
}