Cool tools to avoid suffering with Windows

After two years working only with Linux and Mac OS, I received a new task that requires using Windows for two months (only two months, happily). It’s hard to get back to this bugful, unstable and confusing world: I do believe Linux and Mac OS are easier to use than Windows, that big world of icons that lead to icons that lead to icons that lead to nowhere, but I’m doing my best.

I tried to find a set of useful and free (as in “free beer” and/or as in “free speech”) tools to make my work easier. They are:

Classic Shell Setup

I don’t know why Microsoft removed the toolbar from Windows Explorer since Windows Vista, but this application tries to put it back there. It also allows you to get some customisation of Start Menu, and get a simple, fast and useful menu like the Windows 9x/ME/2000 times.

Notepad++

I like gedit and kate, and the native alternative for Windows is Notepad++: a good editor for plain text files, like source code.

Pidgin

With support for MSN/Live/whatever network, Google Talk, ICQ, etc. Pidgin is one of the best chat clients. I’d rather use it than the fancy MSN Live Messenger.

Winamp

Why use iTunes or the suffering Windows Media Player if you can use Winamp? It has a clean interface, a good way to organise library (although it’s a little bit iTunesy) and a simple playlist, everything in the same screen. I really love the good and old Winamp.

VLC

Winamp can play some videos, but I think VLC is a better tool for this job. Besides, it has a great support for a huge range  of video formats and features for users with any needs and all experience levels.

Firefox 4.0 pre-beta released

Lifehacker shown a screenshot of the new Firefox 4.0 pre-beta for Windows. Here it is (Mozilla names Firefox beta versions “Minefield”):

Nice, isn’t it? So, I downloaded the new beta for Linux, and it looks like the screenshot below. I had to set the tabs to be on top; Windows version brings this for default (at least the one that I installed using Wine).

Firefox 4.0 pre-beta on Linux

Compare. The screenshot below is Firefox 3.6.4.

Firefox 3.6.4 on Linux

It’s a little far from the mockups of Firefox for Linux at Mozilla’s site. I hope I can see it soon. 🙂

VolumeSlider’s tooltip misbehaviour

I was developing a Qt application that makes use of a Phonon::VolumeSlider object. But after clicking the mute button beside of the VolumeSlider and verifying its tooltip, I noticed it was showing the wrong volume. A video can explain this better than me:

httpv://www.youtube.com/watch?v=rJcqZ2SVTK0

If you want to reproduce this problem, you can download its source code as a Qt Creator project. Please keep in mind that it’s the source code with errors!  But there’s a workaround to this problem:

1. In the class where you create the Phonon::AudioOutput whose volume is handled by the VolumeSlider, put this:

[code language=”cpp”]
connect(audioOutput, SIGNAL(mutedChanged(bool)), this, SLOT(handleMute(bool)));
connect(audioOutput, SIGNAL(volumeChanged(qreal)), this, SLOT(handleVolume(qreal)));
[/code]

2. Create the slots you used above using the following code:

[code language=”cpp”]
void MainWindow::handleMute(bool mute) {
if (!mute) {
audioOutput->setVolume(outputVolume);
}
}
void MainWindow::handleVolume(qreal volume) {
outputVolume = volume;
}
[/code]

3. Declare the slots and the outputVolume variable in your header file:

[code language=”cpp”]
private:
qreal outputVolume;

private slots:
void handleMute(bool mute);
void handleVolume(qreal volume);
[/code]

You can download the fixed source code. I don’t know if this behaviour is the expected in Qt, but I filed a bug for it.

Fixing problem with Subclipse and svn+ssh repositories

I was trying to synchronise a Java project with a SVN repository that runs over a SSH tunnel. It was working right in the command line, but in Subclipse it was showing a “network connection closed unexpectedly” error.

It was fixed changing the SVN interface from JavaHL to SVNKit in Eclipse preferences (click to zoom):

Changing SVN interface in Eclipse

How to fix ugly fonts in Qt-based applications

I was using Qt Creator and tried to change the editor’s font to Monaco, 9. But hey, Monaco is not that ugly:

Monaco before fix

So I googled a way to fix for this problem, and found the fix at Arch Linux forums. You’ll need to create a file called .fonts.conf in your home directory with this content:

[sourcecode language=”xml”]
<?xml version=’1.0′?>
<!DOCTYPE fontconfig SYSTEM ‘fonts.dtd’>
<fontconfig>
<match target="font" >
<edit mode="assign" name="rgba" >
<const>rgb</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hinting" >
<bool>true</bool>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hintstyle" >
<const>hintslight</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="antialias" >
<bool>true</bool>
</edit>
</match>
</fontconfig>
[/sourcecode]

I closed Qt Creator and reopened it. The result was this:

Monaco after fix