From 29f275d5e7b270af22e40934d29237adc4641be0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 27 Feb 2015 17:57:05 +0100
Subject: shell32: Show animation during SHFileOperation.

---
 dlls/shell32/shlfileop.c | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c
index cef2246..05fade1 100644
--- a/dlls/shell32/shlfileop.c
+++ b/dlls/shell32/shlfileop.c
@@ -1992,7 +1992,7 @@ static void progressbar_calc_totalsize(FILE_OPERATION *op, const FILE_LIST *from
 static void progressbar_update_title(FILE_OPERATION *op)
 {
     WCHAR buf[64];
-    UINT title_id, builder_id;
+    UINT title_id, builder_id, animation_id;
 
     if (op->progress == NULL)
         return;
@@ -2000,18 +2000,21 @@ static void progressbar_update_title(FILE_OPERATION *op)
     switch (op->req->wFunc)
     {
         case FO_COPY:
-            title_id   = IDS_FILEOP_COPYING;
-            builder_id = IDS_FILEOP_FROM_TO;
+            title_id      = IDS_FILEOP_COPYING;
+            builder_id    = IDS_FILEOP_FROM_TO;
+            animation_id  = IDR_AVI_FILECOPY;
             break;
 
         case FO_DELETE:
-            title_id   = IDS_FILEOP_DELETING;
-            builder_id = IDS_FILEOP_FROM;
+            title_id      = IDS_FILEOP_DELETING;
+            builder_id    = IDS_FILEOP_FROM;
+            animation_id  = IDR_AVI_FILEDELETE;
             break;
 
         case FO_MOVE:
-            title_id   = IDS_FILEOP_MOVING;
-            builder_id = IDS_FILEOP_FROM_TO;
+            title_id      = IDS_FILEOP_MOVING;
+            builder_id    = IDS_FILEOP_FROM_TO;
+            animation_id  = IDR_AVI_FILEMOVE;
             break;
 
         default:
@@ -2026,6 +2029,8 @@ static void progressbar_update_title(FILE_OPERATION *op)
 
     LoadStringW(shell32_hInstance, IDS_FILEOP_PREFLIGHT, buf, sizeof(buf)/sizeof(WCHAR));
     IProgressDialog_SetLine(op->progress, 1, buf, FALSE, NULL);
+
+    IProgressDialog_SetAnimation(op->progress, shell32_hInstance, animation_id);
 }
 
 static void progressbar_update_files(FILE_OPERATION *op, LPCWSTR src, LPCWSTR dst)
-- 
2.3.0

