show fail popup when rename failed
authorJisung Ahn <jcastle.ahn@samsung.com>
Mon, 25 Feb 2013 02:58:03 +0000 (11:58 +0900)
committerJisung Ahn <jcastle.ahn@samsung.com>
Tue, 26 Feb 2013 05:14:30 +0000 (14:14 +0900)
Change-Id: I19f5c1e41ca9f697b624129687778f0bb0f9628d

common/src/ivug-util.c
main/src/view/ivug-main-view-menu.cpp

index 2a37f92..dca0e1c 100755 (executable)
@@ -140,6 +140,12 @@ bool ivug_rename_file(const char *src, const char *dst)
                return false;
        }
 
+       if (ecore_file_exists(dst) == EINA_TRUE)
+       {
+               MSG_UTIL_ERROR("Destination file is exist : %s", dst);
+               return false;
+       }
+
        if (dst == NULL)
        {
                MSG_UTIL_ERROR("Destination file is NULL");
index 322c56e..a32e5c3 100755 (executable)
@@ -1082,6 +1082,8 @@ static void _on_rename_view_response(ivug_name_response resp, const char *str, v
        if(_rename(mData, str) == false)
        {
                MSG_MAIN_ERROR("_rename to %s failed", str);
+               //ivug_notify_timeout_create(pMainView->layout, IDS_FAILED, 0.0, NULL, NULL); //it does not work
+               ivug_selectioninfo_create(pMainView->layout, IDS_FAILED);
        }
        else
        {