Enlightenment CVS committal Author : leviathan Project : e17 Module : apps/exhibit
Dir : e17/apps/exhibit/src/bin Modified Files: exhibit_image.c Log Message: Fix rename issue (thanx for mcalamelli for pointing those out) =================================================================== RCS file: /cvs/e/e17/apps/exhibit/src/bin/exhibit_image.c,v retrieving revision 1.55 retrieving revision 1.56 diff -u -3 -r1.55 -r1.56 --- exhibit_image.c 5 Sep 2007 10:36:05 -0000 1.55 +++ exhibit_image.c 5 Sep 2007 10:56:11 -0000 1.56 @@ -840,9 +840,10 @@ newpath = malloc(PATH_MAX); oldpath = malloc(PATH_MAX); snprintf(newpath, PATH_MAX, "%s%s", tab->set_img_path, string); - snprintf(oldpath, PATH_MAX, "%s%s", tab->set_img_path, tab->cur_file); + snprintf(oldpath, PATH_MAX, "%s", tab->cur_file); D(("Renaming from %s -> %s\n", oldpath, newpath)); +printf("Rename '%s' to '%s' \n", oldpath, newpath); ret = rename(oldpath, newpath); if (ret == -1) _ex_main_dialog_show("Error renaming file!", ETK_MESSAGE_DIALOG_ERROR); @@ -869,7 +870,7 @@ char string[PATH_MAX]; char labeltext[PATH_MAX + 100]; - snprintf(string, sizeof(PATH_MAX), "%s%s", tab->set_img_path, tab->cur_file); + snprintf(string, sizeof(string), "%s", basename(tab->cur_file)); dialog = etk_dialog_new(); snprintf(labeltext, sizeof(labeltext), "Rename file '%s'", string); @@ -884,6 +885,7 @@ ETK_BOX_START, ETK_BOX_NONE, 2); entry = etk_entry_new(); + etk_entry_text_set(ETK_ENTRY(entry), string); etk_dialog_pack_in_main_area(ETK_DIALOG(dialog), ETK_WIDGET(entry), ETK_BOX_START, ETK_BOX_NONE, 0); ------------------------------------------------------------------------- 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 enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs