Jim Rogers

Lives in Baton Rouge, LA, with two dogs, one cat, and one lovely wife. I'm a lead developer for GCR & Associates.

Katrin and Jim

Month List

Bug Fix

by Jim Feb 03, 2007 7:33 AM

Here's a bug fix for the Battery Information gadget. It doesn't refresh its display on reboot, so it opens up blank.

Go to the folder C:\Users\[your login]\AppData\Local\Microsoft\Windows Sidebar\Gadgets\Battery.Gadget\Include.
Right click to edit (not open) the battery.js file
Change the Initialize() function so that it reads like this:

function Initialize()
{
    // Apply appropriate style at reboot
    if (System.Gadget.docked)
        AppyDockedStyle();
    else 
        ApplyUndockedStyle();
    System.Machine.PowerStatus.powerLineStatusChanged = Refresh;
    ...

Note that the 'Appy' mispelling is intentional; that is the actual function name.

Tags:

Code

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading