*** 19.1.4.linden/indra/llui/llbutton.cpp	2008-04-08 04:37:56.000000000 +0200
--- 19.1.4/indra/llui/llbutton.cpp	2008-04-18 09:12:17.000000000 +0200
***************
*** 60,65 ****
--- 60,68 ----
  S32 BTN_GRID		= 12;
  S32 BORDER_SIZE = 1;
  
+ // static
+ LLFrameTimer	LLButton::sFlashingTimer;
+ 
  LLButton::LLButton(	const LLString& name, const LLRect& rect, const LLString& control_name, void (*click_callback)(void*), void *callback_data)
  :	LLUICtrl(name, rect, TRUE, NULL, NULL),
  	mClickedCallback( click_callback ),
***************
*** 437,446 ****
  		BOOL flash = FALSE;
  		if( mFlashing )
  		{
! 			F32 elapsed = mFlashingTimer.getElapsedTimeF32();
  			S32 flash_count = S32(elapsed * LLUI::sConfigGroup->getF32("ButtonFlashRate") * 2.f);
  			// flash on or off?
! 			flash = (flash_count % 2 == 0) || flash_count > (F32)LLUI::sConfigGroup->getS32("ButtonFlashCount");
  		}
  
  		BOOL pressed_by_keyboard = FALSE;
--- 440,454 ----
  		BOOL flash = FALSE;
  		if( mFlashing )
  		{
! 			F32 elapsed = LLButton::sFlashingTimer.getElapsedTimeF32();
  			S32 flash_count = S32(elapsed * LLUI::sConfigGroup->getF32("ButtonFlashRate") * 2.f);
  			// flash on or off?
! 			S32 no_flash = LLUI::sConfigGroup->getS32("ButtonFlashCount");
! 			if(no_flash > 0 && flash_count > (F32)no_flash) {
! 			    flash = true;
! 			} else {
! 			    flash = (flash_count % 2 == 0);
! 			}
  		}
  
  		BOOL pressed_by_keyboard = FALSE;
***************
*** 789,795 ****
  	if (b != mFlashing)
  	{
  		mFlashing = b; 
- 		mFlashingTimer.reset();
  	}
  }
  
--- 797,802 ----
*** 19.1.4.linden/indra/llui/llbutton.h	2008-04-08 04:37:56.000000000 +0200
--- 19.1.4/indra/llui/llbutton.h	2008-04-18 07:13:26.000000000 +0200
***************
*** 297,303 ****
  
  	LLPointer<LLUIImage> mImagep;
  
! 	LLFrameTimer	mFlashingTimer;
  };
  
  #endif  // LL_LLBUTTON_H
--- 297,303 ----
  
  	LLPointer<LLUIImage> mImagep;
  
! 	static LLFrameTimer	sFlashingTimer;
  };
  
  #endif  // LL_LLBUTTON_H
*** 19.1.4.linden/indra/newview/llcontroldef.cpp	2008-04-08 04:38:04.000000000 +0200
--- 19.1.4/indra/newview/llcontroldef.cpp	2008-04-18 06:59:32.000000000 +0200
***************
*** 170,176 ****
  	gSavedSettings.declareS32("ButtonHeightSmall", 16, "Default height for small buttons (pixels)");
  	gSavedSettings.declareS32("ButtonHeight", 20, "Default height for normal buttons (pixels)");
  	gSavedSettings.declareF32("ButtonFlashRate", 2.f, "Frequency at which buttons flash (hz)");
! 	gSavedSettings.declareS32("ButtonFlashCount", 3, "Number of flashes after which flashing buttons stay lit up");
  	//gSavedSettings.declareS32("ButtonHeightToolbar", 32, "[NOT USED]");
  
  	//gSavedSettings.declareS32("DefaultButtonWidth", DEFAULT_BUTTON_WIDTH, "[NOT USED]");
--- 172,178 ----
  	gSavedSettings.declareS32("ButtonHeightSmall", 16, "Default height for small buttons (pixels)");
  	gSavedSettings.declareS32("ButtonHeight", 20, "Default height for normal buttons (pixels)");
  	gSavedSettings.declareF32("ButtonFlashRate", 2.f, "Frequency at which buttons flash (hz)");
! 	gSavedSettings.declareS32("ButtonFlashCount", -1, "Number of flashes after which flashing buttons stay lit up");
  	//gSavedSettings.declareS32("ButtonHeightToolbar", 32, "[NOT USED]");
  
  	//gSavedSettings.declareS32("DefaultButtonWidth", DEFAULT_BUTTON_WIDTH, "[NOT USED]");
