[mythtv-commits] Ticket #79: patch to make LCD progressbars correct

MythTV mythtv at cvs.mythtv.org
Sat Jul 9 00:56:01 EDT 2005


#79: patch to make LCD progressbars correct
---------------------+------------------------------------------------------
       Id:  79       |      Status:  new                     
Component:  mythtv   |    Modified:  Sat Jul  9 04:56:01 2005
 Severity:  low      |   Milestone:                          
 Priority:  trivial  |     Version:  0.18.1                  
    Owner:  ijr      |    Reporter:  myth at eskil.org          
---------------------+------------------------------------------------------
 This fixes the LCD progress bar when myth is displaying a
 MythProgressDialog. It's based of a previous reject patched and fixed
 according to Isaac's comments :

 --- 8< ---

 On Tue, 2005-05-03 at 03:17 -0400, Isaac Richards wrote:

 > I've applied this, minus:
 > > - fix in mythdialogs to ensure that generic progress bars look proper
 on
 > > LCD.
 >
 > The / 1000's there to keep it from updating the UI too often.

 Do you mean the LCD or the UI ? The "curprogress % steps" check is only
 there for the QT, so it'll update normally, where as the LCD will update
 every time it's called (and the LCD is probably much slower than QT).

 The problem is, that the rounding makes the progress bar incorrect.

 Ie.

 MythProgressDialog p ("foo", 1500); // int steps = 1500/1000 = 1.
 p->setProgress (1100); // float fProgress = 1100/(1*1000.0) = 110%
 instead of 73%.

 so the LCD progress bar finishes too early depending on the total steps.

 How about if I change the patch so the LCD also only gets updated if
 "curprogress % steps == 0", but then keep the tsteps so the LCD updates
 correctly ?

 And thanks for applying the patches.

 --- 8< ---

-- 
Ticket URL: <http://cvs.mythtv.org/trac/ticket/79>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list