Update: TPG Usage Widget

Update: Make sure you get the latest version of the widget!

Another minor update to fix some display issues that may show up at the very end and start of the billing cycles.

What’s changed this time:

  • Fixed bug in calculating offpeak usage (typo). Previously, offpeak was always green
  • If you’re over your total limit for the month, default to 75% warning and 90% critical for color coding. Otherwise, the entire bar is green
  • Fixed display bug: the short horizontal usage bars don’t have the granularity to show really small percentages (eg at the start of the billing period). So, we overwrite them with some friendlier values (10% of total for warning, 15% for critical). It’s less accurate, but clearer than showing a single red light
  • Don’t save empty values for settings (ensure the widget won’t forget your username or password)
  • Removed unnecessary saveSettings call
  • Converted all ints to floats, so we keep fractions of gb/mb

Download TPG Usage Widget for OSX (version 1.6, 96kb)

And if anyone was wondering, yes, you can use subversion to manage a Dashcode widget project…

Once you have created a dashcode project, go to the widget project file in terminal, cd into it and commit the contents to a repository.

You can then delete (or rename) the original and check out the contents of the repository to a new directory; so long as the directory has a .wdgtproj suffix you can use it as per usual in Dashcode. When you’re done, you can just do an svn commit from the .wdgtproj directory.

Dashcode seems to do some weird stuff to the files when it saves them (ie if you’re in the directory in terminal when you save, all the files appear to disappear and you need to change directory back into the .wdgtproj to see them again), so I’d recommend doing the commit with Dashcode closed.

An example of my version-controlled widget directory:

Leave a Reply