|
|
|
@ -1,5 +1,6 @@ |
|
|
|
|
#include "private.h" |
|
|
|
|
#include "utils.h" |
|
|
|
|
#include "theme.h" |
|
|
|
|
#include "config.h" |
|
|
|
|
#include <unistd.h> |
|
|
|
|
#include <pwd.h> |
|
|
|
|
|
|
|
|
@ -25,6 +26,33 @@ theme_path_get(const char *name) |
|
|
|
|
return path1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const char * |
|
|
|
|
config_theme_path_get(const Config *config) |
|
|
|
|
{ |
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(config, NULL); |
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(config->theme, NULL); |
|
|
|
|
|
|
|
|
|
if (strchr(config->theme, '/')) |
|
|
|
|
return config->theme; |
|
|
|
|
|
|
|
|
|
return theme_path_get(config->theme); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const char * |
|
|
|
|
config_theme_path_default_get(const Config *config) |
|
|
|
|
{ |
|
|
|
|
static char path[PATH_MAX] = ""; |
|
|
|
|
|
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(config, NULL); |
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(config->theme, NULL); |
|
|
|
|
|
|
|
|
|
if (path[0]) return path; |
|
|
|
|
|
|
|
|
|
snprintf(path, sizeof(path), "%s/themes/default.edj", |
|
|
|
|
elm_app_data_dir_get()); |
|
|
|
|
return path; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Eina_Bool |
|
|
|
|
theme_apply(Evas_Object *edje, const Config *config, const char *group) |
|
|
|
|
{ |