Committed: Re: Patch file_Pulsing progress bar in windows_chenxiajian

From: Martin Sevior <msevior_at_gmail.com>
Date: Mon Apr 18 2011 - 05:58:24 CEST

Author: msevior
Date: 2011-04-18 05:53:07 +0200 (Mon, 18 Apr 2011) New Revision: 29720

Modified:
   abiword/trunk/src/text/ptbl/xp/pd_Document.cpp
   abiword/trunk/src/wp/ap/win/ap_Win32StatusBar.cpp
Log:

Commit a patch to implement a pulsing progress bar for Windows.
I changed the update rate in pd_Document from 20 paragraphs to 100,
otherwise I left the patch as is.

Thanks very much Chen!

Modified: abiword/trunk/src/text/ptbl/xp/pd_Document.cpp
===================================================================
--- abiword/trunk/src/text/ptbl/xp/pd_Document.cpp 2011-04-18 03:46:39
UTC (rev 29719)
+++ abiword/trunk/src/text/ptbl/xp/pd_Document.cpp 2011-04-18 03:53:07
UTC (rev 29720)
@@ -728,7 +728,7 @@
 void PD_Document::updateStatus(void)
 {
         m_iStruxCount++;
- UT_sint32 updateRate =200;
+ UT_sint32 updateRate =100;
         UT_sint32 iStruxDiv = m_iStruxCount/updateRate;
         if(iStruxDiv*updateRate == m_iStruxCount)
         {

On Sat, Apr 16, 2011 at 5:17 AM, Chen Xiajian <chenxiajian1985@gmail.com> wrote:
> Hi,�all.
> The�attachment�is�the�patch�file�that�I�implement�the�Pulsing�progress
> bar�in�Windows�and�the�screenshot.�I�have�checked�in
> my�computer,�it�works�well.
> The�places�I�modified:
> ======================1�pd_Document.cpp=========
> In�Windows�there�is�not�function�like�gtk�"gtk_progress_bar_pulse"��we
> do�like�this:
> 1.�set�the�process�bar�style�to�PBS_MARQUEE
> 2.�change�the�notify�function.�the�varible�"m_isMARQUEEState"�is�used
> to�control�the�pluse�state
> use�dwStyle&=~PBS_MARQUEE;�and�dwStyle|=PBS_MARQUEE;�to�control�the
> process�bar's�style
> void�ap_usb_ProgressListener::notify()
> {
> ��if(pProgress->isDefinate())
> {
> if(m_isMARQUEEState)
> {
> DWORD�dwStyle;
> dwStyle=GetWindowLong(m_ProgressWND,�GWL_STYLE);
> dwStyle&=~PBS_MARQUEE;
> SetWindowLong(m_ProgressWND,�GWL_STYLE,�dwStyle�);
> m_isMARQUEEState=false;
> }
> double�fraction�=�pProgress->getFraction();
> SendMessage(m_ProgressWND,PBM_SETPOS,fraction*100,0);
> }
> else
> {
> if(!m_isMARQUEEState)
> {
> DWORD�dwStyle;
> dwStyle=GetWindowLong(m_ProgressWND,�GWL_STYLE);
> dwStyle|=PBS_MARQUEE;
> SetWindowLong(m_ProgressWND,�GWL_STYLE,�dwStyle�);
> SendMessage(m_ProgressWND,PBM_SETMARQUEE,1,100);
> m_isMARQUEEState=true;
> }
> }
> }
> ======================2�pd_Document.cpp=========
> Because�the�Pulsing�progress�bar�in�windows�need�to�be�update
> manually,�so�I�change�the�updateRate.
> UT_sint32�updateRate�=200;-->�UT_sint32�updateRate�=20;
> 200�don't�has�a�good�effect
>
> ===============================================
> If�there�is�some�other�functon�need�to�be�implemented�in�Windows,�pls
> tell�me,I�can�implement�it!
>
>
> Thanks
> Chen�Xiajian
>
Received on Mon Apr 18 05:58:35 2011

This archive was generated by hypermail 2.1.8 : Mon Apr 18 2011 - 05:58:36 CEST