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.
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