How to fix menu icons in GNOME 2.28

23 September 2009

For some reason, the folks at GNOME (the “usability” team) decided to turn off icons in menus. Not only does it make them look ugly as hell, but it is nigh on impossible to navigate menus visually.

I am a very visually-oriented person, so this makes GNOME very difficult to use. I find myself constantly selecting the wrong items, even though removing the icons doesn’t actually change their position.

But as if that wasn’t bad enough, the “usability” team has taken the KDE approach to the problem. Rather than setting an obvious and sane default (i.e. enable icons in menus), there is a checkbox to enable the icons again. Brilliant! (not)

So you can go to System → Preferences (the first item in the menu, in case you prefer to navigate visually with icons like me) → Appearance (the second item in the menu), and under the Interface tab, you can check the box “Show icons in menus” to get the menu icons back, which gives temporary relief.

Enable menu icons illustration

Like many GNOME features, this one is only partly implemented. GNOME’s new ‘feature’ also removes stock icons from buttons, and the above option does not put them back (well, seeing as though it is captioned “Show icons in menus” I don’t see why it would, but if you’re going to take the KDE approach, you may as well go the whole hog and add another option still).

At first, I thought this was a bug in Ubuntu Karmic (I am running the alpha on my desktop right now). While there’s nothing like being able to have the suspense of not knowing whether your computer will boot up in the morning, I thought this was preposterous. After I found out it was an intentional change (167 KB PDF), it now seems that it’s plain baloney.

New release: Haiku R1 Alpha 1

21 September 2009

The Haiku Project, whom I wrote about earlier this year, have released version R1 Alpha 1 of their operating system.

It’s a very exciting milestone, both for me as a fan, and for them as developers. Despite being usable for a couple of years now, and having the ability to run many legacy BeOS applications, it has had no major milestones or releases made. Now that they have made a release, I hope the momentum they create will help them to follow the old adage, Release Early, Release Often.

If you haven’t heard of or tried Haiku yet, I would highly recommend it. The OS isn’t packed with bling; nor does it run the latest games with the highest FPS. What it is, though, is an awesome OS with a simple easy-to-use GUI, with a POSIX-compatible shell, built on top of a hybrid kernel (very microkernel-like), which means it always remains responsive, even under heavy load. Haiku can give you responsiveness and real-time-ness that you will never see under Linux, nor OS X or Windows.

R1 Alpha 1 release images have been built with GCC 2.95.3, not the more modern GCC 4. This has been done to ensure binary compatibility with legacy BeOS applications. It comes as a CD image, a raw image (for writing straight to a hard disk or USB flash drive), and a VMware/VirtualBox VM for those that only like to get their toes wet (see the downloads page).

Linked lists

6 September 2009

A word of warning: don’t read this post. You’ll regret it. It’s basically a convoluted regurgitation of my brain with regards to using linked lists in C. Here be dragons.

In C, creating variables, and storing values in them is quite easy. You just declare them as such:

int i;

And then perform whatever operations you want with them:

i = 2;
i = i * 2;
printf("%d", i); /* 4 */

There is also a cool thing called struct, which lets you create a big variable that contains lots of sub-variables. It works a bit like this:

typedef struct tagGameObject {
	int x;
	int y;
} GameObject;

Then, you can create ‘instances’ of it like this: (note the scare quotes, because C isn’t really object-oriented)

GameObject rocket;
GameObject monster;

rocket.x = 20;
rocket.y = 25;

monster.x = 300;
monster.y = 250;

printf("rocket is at (%d,%d)", rocket.x, rocket.y); // rocket is at (20,25)
printf("monster is at (%d,%d)", monster.x, monster.y); // monster is at (300,250)

Now, let’s just say I wanted to have 3 monsters. I could create three of them like this:

GameObject monster_1;
GameObject monster_2;
GameObject monster_3;

monster_1.x = 100; /* ...etc. */

However, that’s a bit tedious. What if I wanted 20 monsters? Surely I don’t declare each one individually. Nope — you can use arrays for that, which are pretty easy.

GameObject monsters[20];

monsters[0].x = 100;
monsters[1].x = 110;
monsters[2].x = 120; /* ...etc. */

But that has a problem. I’m stuck with 20 monsters all at the same time. Even if you are not using all monsters in the array, the memory is always allocated for each one. Sometimes that is what you want. Sometimes it is not. What if you wanted to be able to create and delete monsters at wish, and it didn’t matter how many you had at any one time?

Read more…