Rested

I’ve been back from my long weekend in southern California for a couple of days, and it’s a bit difficult to get back into things here. The weekend was incredibly relaxing: 3 full days of warm weather and nothing to do but sit on the beach. If only I had a few more days of that.

DSCF9293

While I was out slacking off, Dodji finished up and cut loose the first release of Nemiver, so go download, debug, and send in your comments and bug reports.

That sure is Edgy

Well, I upgraded my main laptop to Ubuntu Edgy last weekend, and for the most part things went OK (I used the official ‘update-manager -c’ procedure, so I didn’t get any severe breakage). Unfortunately, my wireless doesn’t work anymore. Sigh… I know I should have done more research into which laptops have good driver support for linux before I bought it, but it’s still frustrating. In the past I had to resort to the ndiswrapper driver to get it to work, but that doesn’t seem to work anymore. And I can’t seem to get the new bcm43xx driver to work right either. Alas, if only I were a hardware wizard. But congrats to the Ubuntu team. If I had the right hardware, I’m sure it’d be a fantastic release 🙂 And at least I get to play with the new GNOME stuff now.

Oh wait, I do have one more complaint about the upgrade: Bug #350053 drives me insane. I love Epiphany, but that bug completely screws up the way I use browse. I can use the ‘smart bookmarks’ feature, but it’s hard to reprogram my brain after getting used to just typing search terms in the location bar and hitting enter. If anyone can get the fix for that into Edgy, I’d be eternally grateful.

Also, if any of the brilliant Tango Friday participants want to make a nice little icon for the Nemiver debugger, that’d be great.

Joanne and I are heading out to the L.A. area for a long weekend tomorrow. Hopefully the weather out there’s nice and warm there. It’s certainly feeling a lot like winter up here. I could really use a few days off work, so I’m hoping for a few nice relaxing days, and the computer’s staying home.

Icon theme cache issues

So I spent a good deal of saturday chasing down a bug in Agave that was reported by somebody trying to make a Debian package of it. Some time ago, when the second “GNOME Goal” was introduced for Installing theme-friendly icons, I decided I’d do that to Agave as well. (By the way, those little goals were kind of a nice way for new contributors to feel useful, are there plans for any more?). Everything worked fine until a couple days ago when I had a report of a crash when installing the application to /usr due to an icon not being found in /usr/local/share/icons/hicolor/...

Why was it looking in /usr/local/...??? I scoured my source code for hard-coded references to /usr/local, and not finding any, I sat scratching my head for a good long while. Now, somebody more familiar with gtk icon theme issues may have recognized the problem immediately, but it took me quite a while to figure it out, so I thought I’d post the solution in case anybody else runs in to the same issue. The problem only shows up if you’ve first installed the application to /usr/local (the default) and then uninstalled it and installed it to /usr.

The GNOME Goal page mentioned above suggests an install-data-hook rule which updates the gtk icon cache after the program’s icons are installed. So the icon cache in /usr/local gets updated when you first install the program to /usr/local. Unfortunately, after uninstalling the application, the icon cache is not updated, so gtk still thinks there are application icons located under /usr/local.

Since /usr/local/ is in the icon theme search path before /usr, when the application is installed to /usr, it will find the stale icon cache in /usr/local and think it found the icon you’ve requested. Unfortunately the icon that it ‘found’ has already been deleted, so it will try to load an icon from /usr/local that doesn’t exist, and the program crashes. The solution is to simply add an uninstall-hook that also updates the gtk icon cache so that you don’t have a stale icon cache after you run `make uninstall`. Something like the following:


gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
install-data-hook: update-icon-cache
uninstall-hook: update-icon-cache
update-icon-cache:
        @-if test -z "$(DESTDIR)"; then
                 echo "Updating Gtk icon cache.";
                 $(gtk_update_icon_cache);
         else
                 echo "*** Icon cache not updated.  After install, run this:";
                 echo "***   $(gtk_update_icon_cache)";
         fi

Hacking on GNOME, but with a healthy dose of C++

This work is licensed under a Attribution-NonCommercial-NoDerivs 3.0.