summaryrefslogtreecommitdiff
path: root/src/bin/utils.c
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2019-09-08 19:28:52 +0200
committerBoris Faure <billiob@gmail.com>2019-09-08 19:28:52 +0200
commit67805411a411487d4821d11a3b4d271b4f42da98 (patch)
tree665eead9da230e7f09930624a6658ae1bafad416 /src/bin/utils.c
parent48a8a93900419883c2aba7a88971764792e9668e (diff)
add wizard to set scaling when config does not exist
Diffstat (limited to 'src/bin/utils.c')
-rw-r--r--src/bin/utils.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/bin/utils.c b/src/bin/utils.c
index ecd2da3..fddb016 100644
--- a/src/bin/utils.c
+++ b/src/bin/utils.c
@@ -145,6 +145,36 @@ homedir_get(char *buf, size_t size)
145} 145}
146 146
147Eina_Bool 147Eina_Bool
148utils_need_scale_wizard(void)
149{
150 static char path[PATH_MAX] = "";
151 struct stat st;
152 int res;
153 char *tmp;
154 Eina_Bool use_xdg_config;
155
156
157 snprintf(path, sizeof(path) -1, "%s/terminology/config/",
158 efreet_config_home_get());
159 res = stat(path, &st);
160 if (res == 0)
161 return EINA_FALSE;
162
163 use_xdg_config = (getenv("ELM_CONFIG_DIR_XDG") != NULL);
164
165 if (use_xdg_config)
166 tmp = eina_vpath_resolve("(:usr.config:)/elementary");
167 else
168 tmp = eina_vpath_resolve("(:home:)/" ".elementary");
169 res = stat(tmp, &st);
170 free(tmp);
171 if (res == 0)
172 return EINA_FALSE;
173
174 return EINA_TRUE;
175}
176
177Eina_Bool
148link_is_protocol(const char *str) 178link_is_protocol(const char *str)
149{ 179{
150 const char *p = str; 180 const char *p = str;