Prevention is often the best remedy. Rather than installing source/tar.gz packages, it might just be best to stick with debian packages, and use either synaptic, aptitude, or apt-get to worry about dependencies, rather than worrying about them on your own.
If you want newer software than is provided with Debian Lenny, but still want the stability of Lenny, then I suggest trying http://www.backports.org
Backports, admittedly, only provides newer releases of the more common and popular packages, such as OpenOffice.org. If you want an overall system that is more cutting edge, but still relatively stable, then try the Debian testing distribution (codenamed Squeeze). If you don't care about stability (as evidenced by installing source packages on your own), and want the latest, then go for Debian unstable, which is always codenamed Sid (these codenames are characters from the movie Toystory, with Sid being the little boy who liked to hurt and destroy his toys).
Open the program "synaptic", which is the gui for installing programs, and for updating the system. Using this program, you can install what you need. Note, it's best to install the actual programs you plan to use, and let synaptic find the background dependencies for you, rather than installing all the background stuff yourself like jpeg library or glib or gtk or whatever. For your desktop environment, try installing gnome-core. Then, consider uninstalling the things you previously installed (pkg-config-0.23, glib-2.20.4, etc). Afterward, reinstall gnome-core, just to be sure.
If uninstalling the stuff you had previously installed breaks your system, you may need to reboot and go into single-user maintenance mode (this is a choice that will be given from the initial grub prompt -- select it with your arrow keys). You'll need to enter your root password, and then I'd suggest entering the command "apt-get install gnome-core". Exit from this (by typing "exit" or "quit" or "halt"). Reboot and hope for the best.
Assuming everything goes fine, if you want newer software, then with synaptic, you can select "S
ettings" from the top menu, and then select R
epositories. From here you can change it from lenny (stable) to squeeze (testing) if you desire. Reload, and then do a safe-upgrade first, following by a full-upgrade (press "Mark All Upgrades", and I think it'll give you some choices. If not, just go with the Upgrade).
I myself use Stable (Lenny) with a backported OpenOffice.org, and I'm happy with that. But, some people desire more recent software. So, getting this from the testing repositories (or unstable, if you're truly adventurous) is the proper way to go. It's never a good idea to just randomly deviate from the distribution by installing outside source packages, as I suspect you've done (muddling up some of the font displays).