summaryrefslogtreecommitdiff
path: root/openbox/plugin.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-08-12 19:18:21 +0000
committerDana Jansens <danakj@orodu.net>2003-08-12 19:18:21 +0000
commit1045079482453424f8320de99639390e3020eb72 (patch)
treeb15a4e7f21b4f21f668beb780127226f216d3e56 /openbox/plugin.c
parent9ea78a4eb0255e8cca6258e5ceb4bfd3e9e9d59e (diff)
adjust for changes to the parsing api.
split the menu into its own file.
Diffstat (limited to 'openbox/plugin.c')
-rw-r--r--openbox/plugin.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/openbox/plugin.c b/openbox/plugin.c
index e95d03e9..9b8e2d59 100644
--- a/openbox/plugin.c
+++ b/openbox/plugin.c
@@ -1,4 +1,5 @@
#include "plugins/interface.h"
+#include "parser/parse.h"
#include <glib.h>
#include <gmodule.h>
@@ -92,7 +93,7 @@ void plugin_shutdown()
g_datalist_clear(&plugins);
}
-gboolean plugin_open_full(char *name, gboolean reopen)
+gboolean plugin_open_full(char *name, gboolean reopen, ObParseInst *i)
{
Plugin *p;
@@ -107,18 +108,18 @@ gboolean plugin_open_full(char *name, gboolean reopen)
g_warning("failed to load plugin '%s'", name);
return FALSE;
}
- p->config();
+ p->config(i);
g_datalist_set_data_full(&plugins, name, p, (GDestroyNotify) plugin_free);
return TRUE;
}
-gboolean plugin_open(char *name) {
- return plugin_open_full(name, FALSE);
+gboolean plugin_open(char *name, ObParseInst *i) {
+ return plugin_open_full(name, FALSE, i);
}
-gboolean plugin_open_reopen(char *name) {
- return plugin_open_full(name, TRUE);
+gboolean plugin_open_reopen(char *name, ObParseInst *i) {
+ return plugin_open_full(name, TRUE, i);
}
void plugin_close(char *name)
@@ -136,7 +137,7 @@ void plugin_startall()
g_datalist_foreach(&plugins, (GDataForeachFunc)foreach_start, NULL);
}
-void plugin_loadall()
+void plugin_loadall(ObParseInst *i)
{
GIOChannel *io;
GError *err;
@@ -156,18 +157,18 @@ void plugin_loadall()
if (io == NULL) {
/* load the default plugins */
- plugin_open("placement");
- plugin_open("resistance");
+ plugin_open("placement", i);
+ plugin_open("resistance", i);
/* XXX rm me when the parser loads me magically */
- plugin_open("client_menu");
+ plugin_open("client_menu", i);
} else {
/* load the plugins in the rc file */
while (g_io_channel_read_line(io, &name, NULL, NULL, &err) ==
G_IO_STATUS_NORMAL) {
g_strstrip(name);
if (name[0] != '\0' && name[0] != '#')
- plugin_open(name);
+ plugin_open(name, i);
g_free(name);
}
g_io_channel_unref(io);