feature: add E_THEME_OVERRIDE to specify an edje file to use as the override for the default theme

similar to E_MODULE_SRC_PATH, this allows editing a theme without contaminating the current system
This commit is contained in:
Mike Blumenkrantz 2013-08-19 08:39:43 +01:00
parent 8c218fd28e
commit af0464a8c6
1 changed files with 6 additions and 0 deletions

View File

@ -10,11 +10,17 @@ static E_Fm2_Mime_Handler *theme_hdl = NULL;
EINTERN int
e_theme_init(void)
{
const char *theme_override;
/* Register mime handler */
theme_hdl = e_fm2_mime_handler_new(_("Set As Theme"), "preferences-desktop-theme",
e_theme_handler_set, NULL,
e_theme_handler_test, NULL);
if (theme_hdl) e_fm2_mime_handler_glob_add(theme_hdl, "*.edj");
theme_override = getenv("E_THEME_OVERRIDE");
if (theme_override) elm_theme_overlay_add(NULL, theme_override);
return 1;
}