load the engine out of the config shit. tho the ordering is fucked atm
This commit is contained in:
parent
93783c2a04
commit
9f68b12062
4 changed files with 22 additions and 23 deletions
|
@ -22,21 +22,16 @@ void cparse_go(char *filename, FILE *);
|
|||
|
||||
void config_startup()
|
||||
{
|
||||
/* test definition */
|
||||
ConfigDefEntry *def;
|
||||
/* set up built in variables! and their default values! */
|
||||
|
||||
def = config_def_new("test", Config_String);
|
||||
config_def_set(def);
|
||||
config_def_set(config_def_new("engine", Config_String));
|
||||
config_def_set(config_def_new("theme", Config_String));
|
||||
config_def_set(config_def_new("font", Config_String));
|
||||
config_def_set(config_def_new("font.shadow.offset", Config_Integer));
|
||||
config_def_set(config_def_new("font.shadow.tint", Config_Integer));
|
||||
config_def_set(config_def_new("titlebar.layout", Config_String));
|
||||
|
||||
def = config_def_new("test", Config_String);
|
||||
config_def_set(def);
|
||||
|
||||
def = config_def_new("testlist", Config_String);
|
||||
config_def_add_value(def, "one");
|
||||
config_def_add_value(def, "two");
|
||||
config_def_set(def);
|
||||
|
||||
g_datalist_foreach(&config_def, print_config, NULL);
|
||||
/*g_datalist_foreach(&config_def, print_config, NULL);*/
|
||||
}
|
||||
|
||||
void config_shutdown()
|
||||
|
@ -75,7 +70,7 @@ gboolean config_set(char *name, ConfigValueType type, ConfigValue value)
|
|||
name = g_ascii_strdown(name, -1);
|
||||
g_message("Setting %s", name);
|
||||
|
||||
g_datalist_foreach(&config_def, print_config, NULL);
|
||||
/*g_datalist_foreach(&config_def, print_config, NULL);*/
|
||||
def = g_datalist_get_data(&config_def, name);
|
||||
|
||||
if (def == NULL) {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "engine.h"
|
||||
#include "config.h"
|
||||
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
|
@ -58,14 +59,17 @@ static gboolean load(char *name)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void engine_startup(char *engine)
|
||||
void engine_startup()
|
||||
{
|
||||
module = NULL;
|
||||
ConfigValue engine;
|
||||
|
||||
if (engine != NULL) {
|
||||
if (load(engine))
|
||||
module = NULL;
|
||||
g_message("ENGINE STARTUP");
|
||||
if (config_get("engine", Config_String, &engine)) {
|
||||
g_warning("GOT ENGINE %s", engine.string);
|
||||
if (load(engine.string))
|
||||
return;
|
||||
g_warning("Failed to load the engine '%s'", engine);
|
||||
g_warning("Failed to load the engine '%s'", engine.string);
|
||||
g_message("Falling back to the default: '%s'", DEFAULT_ENGINE);
|
||||
}
|
||||
if (!load(DEFAULT_ENGINE)) {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "../engines/engineinterface.h"
|
||||
|
||||
void engine_startup(char *engine);
|
||||
void engine_startup();
|
||||
void engine_shutdown();
|
||||
|
||||
EngineFrameNew *engine_frame_new;
|
||||
|
|
|
@ -148,7 +148,7 @@ int main(int argc, char **argv)
|
|||
render_startup();
|
||||
font_startup();
|
||||
themerc_startup();
|
||||
engine_startup(themerc_engine);
|
||||
engine_startup();
|
||||
event_startup();
|
||||
screen_startup();
|
||||
focus_startup();
|
||||
|
@ -156,8 +156,6 @@ int main(int argc, char **argv)
|
|||
grab_startup();
|
||||
plugin_startup();
|
||||
|
||||
config_parse();
|
||||
|
||||
/* XXX load all plugins!! */
|
||||
plugin_open("focus");
|
||||
plugin_open("keyboard");
|
||||
|
@ -165,6 +163,8 @@ int main(int argc, char **argv)
|
|||
plugin_open("placement");
|
||||
plugin_open("resistance");
|
||||
|
||||
config_parse();
|
||||
|
||||
/* get all the existing windows */
|
||||
client_manage_all();
|
||||
|
||||
|
|
Loading…
Reference in a new issue