Hans Leidekker : msi: Add support for the ProgressAddition progress message subtype.

Alexandre Julliard julliard at winehq.org
Tue May 15 12:55:58 CDT 2012


Module: wine
Branch: master
Commit: 6c7d0993f055fb4b2181d265e12c54b8a8c54568
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6c7d0993f055fb4b2181d265e12c54b8a8c54568

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Tue May 15 09:40:06 2012 +0200

msi: Add support for the ProgressAddition progress message subtype.

---

 dlls/msi/dialog.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
index a90d379..f4881fd 100644
--- a/dlls/msi/dialog.c
+++ b/dlls/msi/dialog.c
@@ -644,11 +644,11 @@ void msi_dialog_handle_event( msi_dialog* dialog, LPCWSTR control,
 
         TRACE("progress: func %u val1 %u val2 %u\n", func, val1, val2);
 
+        units = val1 / 512;
         switch (func)
         {
         case 0: /* init */
             SendMessageW( ctrl->hwnd, PBM_SETRANGE, 0, MAKELPARAM(0,100) );
-            units = val1 / 512;
             if (val2)
             {
                 ctrl->progress_max = units ? units : 100;
@@ -667,7 +667,6 @@ void msi_dialog_handle_event( msi_dialog* dialog, LPCWSTR control,
         case 1: /* FIXME: not sure what this is supposed to do */
             break;
         case 2: /* move */
-            units = val1 / 512;
             if (ctrl->progress_backwards)
             {
                 if (units >= ctrl->progress_current) ctrl->progress_current -= units;
@@ -680,6 +679,9 @@ void msi_dialog_handle_event( msi_dialog* dialog, LPCWSTR control,
             }
             SendMessageW( ctrl->hwnd, PBM_SETPOS, MulDiv(100, ctrl->progress_current, ctrl->progress_max), 0 );
             break;
+        case 3: /* add */
+            ctrl->progress_max += units;
+            break;
         default:
             FIXME("Unknown progress message %u\n", func);
             break;




More information about the wine-cvs mailing list