diff frontends/wix/main_window.py @ 180:fdb961f27ae9

Primitivus: file sending and progress management - added "send file" in one2one chat's menu - new progress widget which is linked to the notification bar - the notification bar show the average progress of all the current progress bars, and is used to show progress details - if present, pudb is used for debugging (can continue without breaking terminal's setting)
author Goffi <goffi@goffi.org>
date Mon, 16 Aug 2010 21:16:43 +0800
parents 1ca5f254ce41
children 556c2bd7c344
line wrap: on
line diff
--- a/frontends/wix/main_window.py	Mon Aug 16 21:11:00 2010 +0800
+++ b/frontends/wix/main_window.py	Mon Aug 16 21:16:43 2010 +0800
@@ -324,13 +324,11 @@
     def progressCB(self, id, title, message):
         data = self.bridge.getProgress(id)
         if data:
-            if not data['position']:
-                data['position'] = '0'
             if not self.pbar:
                 #first answer, we must construct the bar
-                self.pbar = wx.ProgressDialog(title, message, int(data['size']), None,
+                self.pbar = wx.ProgressDialog(title, message, float(data['size']), None,
                     wx.PD_SMOOTH | wx.PD_ELAPSED_TIME | wx.PD_ESTIMATED_TIME | wx.PD_REMAINING_TIME) 
-                self.pbar.finish_value = int(data['size'])
+                self.pbar.finish_value = float(data['size'])
                 
             self.pbar.Update(int(data['position']))
         elif self.pbar: