diff mac/dw.m @ 1190:76262040ed5f

Added DW_PERCENT_INDETERMINATE which can be passed to dw_percent_set_pos() to show a rotating or otherwise indeterminate percent bar on supported platforms. Platforms which don't support it will either show no progress or potentially growing and contracting progress in the future if that doesn't look too weird. Committed from Windows so may be fixes coming for the other platforms soon.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 28 Sep 2011 08:22:48 +0000
parents 408ea33b19cf
children 698875cfe8e5
line wrap: on
line diff
--- a/mac/dw.m	Tue Sep 27 22:38:25 2011 +0000
+++ b/mac/dw.m	Wed Sep 28 08:22:48 2011 +0000
@@ -3740,7 +3740,17 @@
 void API dw_percent_set_pos(HWND handle, unsigned int position)
 {
     DWPercent *percent = handle;
-    [percent setDoubleValue:(double)position];
+
+    /* Handle indeterminate */
+    if(position == DW_PERCENT_INDETERMINATE)
+        [percent setIndeterminate:YES];
+    else
+    {
+        /* Handle normal */
+        if([percent isIndeterminate])
+            [percent setIndeterminate:NO];
+        [percent setDoubleValue:(double)position];
+    }
 }
 
 /*