summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 15fc8e0)
raw | patch | inline | side by side (parent: 15fc8e0)
author | Florian Forster <ff@octo.it> | |
Wed, 28 Jul 2010 14:51:21 +0000 (16:51 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Wed, 28 Jul 2010 14:51:21 +0000 (16:51 +0200) |
src/action_list_graphs.c | patch | blob | history | |
src/graph_list.c | patch | blob | history | |
src/graph_list.h | patch | blob | history |
index 1984cd5bfb29d818a9d8ee768808ee719dc8c403..f59da7c474ff1e222ca6bc0f99b5d5b98fc85c36 100644 (file)
--- a/src/action_list_graphs.c
+++ b/src/action_list_graphs.c
static int print_all_graphs (__attribute__((unused)) void *user_data) /* {{{ */
{
+ const char *dynamic;
+ _Bool include_dynamic = 0;
+
+ dynamic = param ("dynamic");
+ if ((dynamic != NULL)
+ && (strcmp ("true", dynamic) == 0))
+ include_dynamic = 1;
+
printf (" <ul class=\"graph_list\">\n");
- gl_graph_get_all (print_one_graph, /* user_data = */ NULL);
+ gl_graph_get_all (include_dynamic, print_one_graph, /* user_data = */ NULL);
printf (" </ul>\n");
return (0);
diff --git a/src/graph_list.c b/src/graph_list.c
index b40547692441a39a39ea9e86b35fcdc9694cbd98..60cb82a925f0abc1751840ee32347fa8d1231dad 100644 (file)
--- a/src/graph_list.c
+++ b/src/graph_list.c
return (0);
} /* }}} int graph_config_submit */
-int gl_graph_get_all (graph_callback_t callback, /* {{{ */
- void *user_data)
+int gl_graph_get_all (_Bool include_dynamic, /* {{{ */
+ graph_callback_t callback, void *user_data)
{
size_t i;
return (status);
}
+ if (!include_dynamic)
+ return (0);
+
for (i = 0; i < gl_dynamic_num; i++)
{
int status;
diff --git a/src/graph_list.h b/src/graph_list.h
index f7cb40e7cd729f5b7b9e4ebcfe9a760f962bf9c1..43d44066f9d28f330d3df47ab8d3b685916d6f90 100644 (file)
--- a/src/graph_list.h
+++ b/src/graph_list.h
graph_config_t *gl_graph_get_selected (void);
-int gl_graph_get_all (graph_callback_t callback, void *user_data);
+int gl_graph_get_all (_Bool include_dynamic,
+ graph_callback_t callback, void *user_data);
int gl_graph_instance_get_all (graph_config_t *cfg, graph_inst_callback_t callback,
void *user_data);