M3U2iTunes



M3U2iTunes has been moved here. Please update your bookmarks.

 

/Entries/M3U2iTunes | permanent link

 

Subversion

I tend to go through phases in thinking that I do or don't need some sort of personal source code control. I'm currently in the "need it" phase (which I fully expect to continue in perpetuity) since I have about 5 projects on the go on two different operating systems in three different languages.

Subversion seems to be the logical choice as the most modern system. Visual Source Safe is arguably the easiest to use, but it isn't cross platform so it's out.

As one might expect, I've been running into some annoying "gotchas" in the process of setting this up.

I wanted to avoid a server based system since it's just me (at the moment, anyways) and it's a bit of overkill. Easy, I think. I have a FireWire drive that I use mostly to boot Leopard and back up my MacBook. Lots of space left for an SVN repository for both my Mac and Windows code. Here's the rub, though...

In order to boot Leopard (or anything else), my drive needs to be partitioned using a Guid Partition Table. This is, apparently, a requirement of the Intel Macs. Even if I were to get a FireWire card for my PC, I still couldn't use the drive since Windows XP (the non-64 bit version, anyways) doesn't support GPT. There's no way I can use this drive as a general purpose carry-around SVN repository, and still use it to boot other versions of Mac OS X.

This is one of those incompatibility things that boggles me. Luckily Wendy just got herself a 300gb drive for her photography archives and happened to have an 80gb external USB drive that she doesn't need any more. It annoys me that I'm going to have to take a performance hit using USB instead of FireWire, but I have no intention of buying yet another drive.

So I've started importing projects into the SVN repository on this drive. On the PC side, AnkhSVN is an awesome addon for Visual Studio 2005 that adds integrated source code control management for Subversion. TortoiseSVN (I used the CVS version at one point) is a great Windows Explorer extension for same.

Xcode...well, it seems that Xcode has a problem with SVN which is fixed in the latest revision. I just received the ADC DVD today so hopefully the update is on it.

The last step in this adventure (once I finish getting the Windows projects checked in) will be to see if I can plug the drive into my MacBook and add Xcode projects. I'm pretty hopeful that this will all work just fine, although I'm prepared for some tussling.

/Entries/Code | permanent link

 

Colorizing Bitmaps

I've been enjoying working on the new, more, umm, "modern" looking pTravelAlarm lately. One of the fun things about opening up development on new versions of applications is that you tend to get a flood of suggestions, and since development is open, you tend to implement them ;-)

A repeated request is to allow the user to change the color of the text on the screen. This would, of course, be trivially easy if we were using text exclusively, but a lot of what you see is actually bitmaps.

In actuality, mapping a color in a bitmap to another color isn't all that hard either - although certainly more difficult that simply setting the color of a piece of text, since it involves modifying the actual RGB values in the bitmap. Luckily I had a piece of code lying around from Phone Today, which has the need to map its icons to the Windows Mobile Today Screen theme color.

The code to do the colorizing is presented below for those who might have the need to do something like this. Basically the LoadAndColorizeBitmap method does the actual loading of the bitmap resource as well as mapping one particular color to another.

All of the bitmaps which will have their color changed are saved using a particular color (yellow, in my case). When the Windows Mobile application starts and loads the required bitmaps, it calls LoadAndColorizeBitmap, passing in the resource id and the requested color. LoadAndColorizeBitmap loads the bitmap and changes the color, returning a normal HBITMAP handle to the caller. No further work is required (except, of course, to call DeleteObject when done with the bitmap).

I only had the need to map yellow to something else, so you'll see #define statements for the red, green and blue values of the source color, but the function could be generalized if necessary.

The code

/Entries/Code/WindowsMobile | permanent link

 

 Site Search


 Categories
» Entries (87)
  » Code (2)
    » WindowsMobile (1)
  » M3U2iTunes (2)
  » Mac (35)
  » MediaCenter (6)
  » Programming (3)
  » StoryGrinder (4)
  » Venom (1)
  » Windows (1)
  » WindowsMobile (5)
  » iPod-iTunes (7)

 Archives
» November 2006 (3)
» October 2006 (2)
» September 2006 (3)
» August 2006 (4)
» July 2006 (2)
» June 2006 (3)
» May 2006 (2)
» April 2006 (3)
» March 2006 (3)
» February 2006 (4)
» January 2006 (4)
» December 2005 (2)
» November 2005 (4)
» October 2005 (2)
» September 2005 (4)
» August 2005 (3)
» July 2005 (4)
» June 2005 (1)
» May 2005 (6)
» April 2005 (3)
» March 2005 (6)
» February 2005 (7)
» January 2005 (4)
» November 2004 (4)
» July 2004 (2)
» June 2004 (2)

 Downloads  

StoryGrinder


Version: 1.0RC1
Download page

BSD Fortune Dashboard Widget


Version: 1.4
Download

M3U2iTunes


Version: 1.0
Download M3U2iTunes



Copyright © 2006 otherslikeyou.com Inc.
All trademarks and copyrights on this page are owned by their respective owners.