summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@samsung.com>2013-11-21 16:51:28 +0900
committerCedric Bail <cedric.bail@samsung.com>2013-11-21 16:52:48 +0900
commit46ee3c3226e69dad43998574c63eccf7e1fe3f59 (patch)
treecd5daf5b1bed88ddb0be66c0e75324750b2c52eb
parentbedf56c457939c897e1eac1f3a2b27c945166178 (diff)
e: fix generation of the wallpapper from a picture.
NOTE; eina_mkstemp doesn't alter it's parameter, you need to ask the filename if you want it.
-rw-r--r--src/bin/e_import_config_dialog.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/bin/e_import_config_dialog.c b/src/bin/e_import_config_dialog.c
index 31596853a..5248f6120 100644
--- a/src/bin/e_import_config_dialog.c
+++ b/src/bin/e_import_config_dialog.c
@@ -20,6 +20,7 @@ _import_edj_gen(E_Import_Config_Dialog *import)
20 int w = 0, h = 0; 20 int w = 0, h = 0;
21 const char *file, *locale; 21 const char *file, *locale;
22 char buf[PATH_MAX], cmd[PATH_MAX], tmpn[PATH_MAX], ipart[PATH_MAX], enc[128]; 22 char buf[PATH_MAX], cmd[PATH_MAX], tmpn[PATH_MAX], ipart[PATH_MAX], enc[128];
23 Eina_Tmpstr *path = NULL;
23 char *imgdir = NULL, *fstrip; 24 char *imgdir = NULL, *fstrip;
24 int cr, cg, cb, ca; 25 int cr, cg, cb, ca;
25 FILE *f; 26 FILE *f;
@@ -51,7 +52,7 @@ _import_edj_gen(E_Import_Config_Dialog *import)
51 } 52 }
52 53
53 strcpy(tmpn, "e_bgdlg_new.edc-tmp-XXXXXX"); 54 strcpy(tmpn, "e_bgdlg_new.edc-tmp-XXXXXX");
54 fd = eina_file_mkstemp(tmpn, NULL); 55 fd = eina_file_mkstemp(tmpn, &path);
55 if (fd < 0) 56 if (fd < 0)
56 { 57 {
57 printf("Error Creating tmp file: %s\n", strerror(errno)); 58 printf("Error Creating tmp file: %s\n", strerror(errno));
@@ -262,7 +263,7 @@ _import_edj_gen(E_Import_Config_Dialog *import)
262 fclose(f); 263 fclose(f);
263 264
264 snprintf(cmd, sizeof(cmd), "%s/edje_cc -v %s %s %s", e_prefix_bin_get(), 265 snprintf(cmd, sizeof(cmd), "%s/edje_cc -v %s %s %s", e_prefix_bin_get(),
265 ipart, tmpn, e_util_filename_escape(buf)); 266 ipart, path, e_util_filename_escape(buf));
266 267
267 import->tmpf = strdup(tmpn); 268 import->tmpf = strdup(tmpn);
268 import->fdest = eina_stringshare_add(buf); 269 import->fdest = eina_stringshare_add(buf);
@@ -270,6 +271,8 @@ _import_edj_gen(E_Import_Config_Dialog *import)
270 ecore_event_handler_add(ECORE_EXE_EVENT_DEL, 271 ecore_event_handler_add(ECORE_EXE_EVENT_DEL,
271 _import_cb_edje_cc_exit, import); 272 _import_cb_edje_cc_exit, import);
272 import->exe = ecore_exe_run(cmd, import); 273 import->exe = ecore_exe_run(cmd, import);
274
275 eina_tmpstr_del(path);
273} 276}
274 277
275static Eina_Bool 278static Eina_Bool