Enlightenment CVS committal
Author : jethomas
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/bin/tests/image
Modified Files:
ewl_image.c
Log Message:
Fix tests as filedialog now returns full path to file
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/bin/tests/image/ewl_image.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- ewl_image.c 11 Nov 2007 08:03:39 -0000 1.10
+++ ewl_image.c 15 Nov 2007 04:05:48 -0000 1.11
@@ -343,32 +343,14 @@
e = ev;
if (e->response == EWL_STOCK_OK) {
- const char *path;
char *filename;
- char *file;
- int l1;
- int l2;
- path = ewl_filedialog_directory_get (EWL_FILEDIALOG (w));
filename = ewl_filedialog_selected_file_get (EWL_FILEDIALOG
(w));
- l1 = strlen (path);
- l2 = strlen (filename);
-
- if (!path || (path[0] == '\0'))
- file = strdup (filename);
- else {
- file = (char *)malloc (sizeof (char) * (l1 + l2 + 2));
- memcpy (file, path, l1);
- file[l1] = '/';
- memcpy (file + l1 + 1, filename, l2);
- file [l1 + l2 + 1] = '\0';
- }
-
- printf("File open from image test: %s\n", file);
- if (file) {
- ewl_text_text_set(EWL_TEXT(entry), file);
+ printf("File open from image test: %s\n", filename);
+ if (filename) {
+ ewl_text_text_set(EWL_TEXT(entry), filename);
image_load();
- free (file);
+ free (filename);
// free(path); FIXME: Is text widget allocated
correctly?
}
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs