Archive for the ‘Projects’ Category

(on Technorati , Del.icio.us)

Rhythmbox Plugin: Jump to Playing 0.2

I’ve updated the Jump-to-Playing plugin for Rhythmbox. The latest version is now 0.2, and it’s a large improvement. Many thanks to Dan Mihai Ile for his work on the configure dialog and the gconf functionality! I’ve been really busy recently, and without his efforts, I wouldn’t have gotten around to working on this.

Screenshots

toolbar button, context menu item, about dialog, configure dialog

small display mode.  notice something missing?

Changes Since 0.1

  • Added preferences dialog based on work from Dan Mihai Ile, allowing either the toolbar button or the context menu item to be displayed.
  • Modifed the UI of the preferences dialog (HIG compliance).
  • Made the preferences dialog act immediately (HIG compliance).
  • Toolbar Jump-to-Playing button hides in small display mode.
  • Browser button also hides in small display mode. This should probably be moved into a different plugin, or the core. But I’ve left it here, for now.
  • Included QueuePlaylistView’s context menu in addition to the Browser Source popup.
    Moved UI XML into strings within __init__.py.
  • Added GPL license to files.
  • Updated plugin description.
  • Checks if small display is active on activation.

Download

jump-to-playing-0.2.tar.gz (Update: Newer version is available.)

Installation

  1. Extract the jump-to-playing folder into your ~/.gnome2/rhythmbox/plugins/ directory. Completely replace any previous versions.
  2. (Re)Start Rhythmbox and enable the plugin in Edit : Plugins.

Todo

  • Force “Properties” to bottom of browser context menu (may depend on placeholder being added to the context menu)
  • Add Configure dialog with checkboxes for toolbar and browser context menu, defaulting to toolbar only (both is a little redundant). Currently, both are added automatically.
    [x] Add button to toolbar
    [_]Add link to browser context menu
  • Hide toolbar button in Small Display mode.

The code could definitely be better and there’s still room for features/general improvements. All patches and code-clean-up are welcome! 😉

Rhythmbox Jump-to-playing Plugin

This plugin will display the View : Jump to Playing Song link as a button in the toolbar and as link in the Browser’s context menu. This is about as simple as a plugin could be (which is partly why I wrote it), but I’ve actually found it quite useful. Maybe you will too.

jump-to-playing-0.1

Download

jump-to-playing-0.1.tar.gz (Update: Newer version is available.)

Installation

  1. Extract the jump-to-playing folder into your ~/.gnome2/rhythmbox/plugins/ directory.
  2. (Re)Start Rhythmbox and enable the plugin in Edit : Plugins.

Todo

  • Add Configure dialog with checkboxes for toolbar and browser context menu, defaulting to toolbar only (both is a little redundant). Currently, both are added automatically.
    [x] Add button to toolbar
    [_]Add link to browser context menu
  • Force “Properties” to bottom of browser context menu (may depend on placeholder being added to the context menu)
  • Hide toolbar button in Small Display mode.

A Bug’s Life

A while ago (a year?!), I made this cute little bug graphic for Nemiver, a C/C++ debugger for GNOME.

No Bug

Nemiver has since changed icons. More recently, Shirley pointed out to me that my bug had been used on a Mac site! 😮 (Of all things!) Heh. I only posted the graphic on the Nemiver mailing list, so I was really curious how the author of the post on the Mac site, Tanya Palta, managed to find my graphic. I’m guessing it was a Google Images search for “dead bug”. 🙂 I’m actually rather flattered that my graphic was picked for this post, but it’s worth mentioning that the license wasn’t followed – which is par for the course with the Internet. The image and it’s source was (and remains) released under the Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License (It’s a mouthful, but it’s pretty simple).

The bug originally started with this:

BBQ Bug

I remember Jesse commenting that it looked like a barbeque. Hah… so it did! 🙂 I went through lots of different iterations:

Dead Squished Bug

Bug in crosshair

And ended up with the graphic at the top of this post. I also tried simplifying it and making the eyes bigger to support lower resolutions, but I didn’t really put any effort into fitting it within the Tango guidelines.

black bug

Anyway, that’s this bug’s life story.

All images and SVG source available in zip file (dead_bug.zip – 330KB) under the Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License. Images created in Inkscape, an excellent opensource vector art program.

New Theme Update

I’ve removed a lot of the noise from the theme. This includes all of the gradients and many of those nasty, sharp lines. Put Categories and Time at the top of each post, with Tags and Comments at the bottom. Made both smaller. Put everything on search results page. Added links to Technorati and del.icio.us from Tags and Categories pages. Changed the gradient images for header and footer (reminds me of rust).

Screenshots of some of the changes:

Original and loud:
Original and loud

Removed gradients:
Removed gradients

Added solids:
Added solids

Changed colours:
Changed colours

Some more touch-ups:
some more touchups

What you should be seeing now:
what you should be seeing now

Comments / suggestions?

New Theme

I finally updated the theme on my blog. Please take a look and try various things (in different browsers, if possible) and report any bugs in the comments section. Suggestions welcome, as well. Demands can go elsewhere… (you know who you are!) 🙂

This theme isn’t 100% done, but it’s functional and I wanted to get it up. The only thing I really miss is the turtle. But he could come back. Or something else….

If I was just writing a theme for Gecko-based browsers (Firefox, Mozilla, Epiphany, etc) I would have been done ages ago. And if I do more wordpress theme stuff in the future, I vow to follow the KISS principle at all times. Would have saved me much time! Rather than try and figure out what’s wrong and how to fix it, just do something simpler! Maybe my next theme will be plain text. 😛 Probably not, though… I’m a sucker for tinkering.

Update: I forgot to mention, my goal with the theme on IE was simply getting it to display reasonably well (no giant bugs, and can be viewed). It will, in fact, look and feel better on Firefox. (I have been using ies4linux to test it for IE 6 on on my computer.) 🙂

GNOME Panel / Ubuntu UI Musings

Reading Ubuntu 7.10 Pragmatic Visual Presentation Critique got me thinking about a better way to position applets and launchers on the panels in GNOME.

Imagine if you have locked all your applets and you’re trying to move a new applet to a specific location, you have to first unlock every applet which involves a right click, left click check-box, and repeating this for all locked applets. Once the applets have been unlocked and you have placed your new applet at the desired location, guess what? Time to lock them all again! Right click, left click check-box, right click, left click check-box, you get the idea. A method of locking/unlocking all the applets at the same time seems like a much welcomed option at this time.

I totally agree here. The panel should have a mode, (“layout mode”?) that darkens the rest of the screen so it’s obvious that you’re operating on the panels. Clicking off the Panel will exit this mode. I’m not sure what the best method would be for entering this mode. (An option on the context menu of every item on the panel?) Once in this mode, applets and launchers can be dragged around with the left mouse button. Moving the mouse cursor over an applet or launcher will highlight it with a red outline or something, so it’s obvious what will be moved. There should be a small lock icon below each. Clicking this will toggle the position lock. Speaking from experience, you usually want to do multiple unlock/move/lock actions at once, and with the current interface, it’s rather painful, as the author points out.

A quick mockup (I found an anchor before I found a lock, but an anchor makes sense):

Layout mode mockup

The author also touches on many other things that I don’t really see as big issues. Blurry icons? And he complains about icons not scaling properly with a resized panel. (See here.) For individual launchers, and the volume applet, the icons will scale fine. I’m not convinced scaling the Notification Area icons up would be desirable, as they would take up a lot of extra space and they can appear and disappear frequently, but that might be the user’s desired effect. Maybe an option for the user to say if they want them to scale, wrap, or neither… but all the icons in the notification area should definitely be consistent in behaviour, just as the launcher icons are on the panel.

notification area

Desktop Effects. He says they feel like a hack. I would agree that the defaults are truly terrible (wobbly windows? seriously?) and they certainly aren’t without their problems. As one would expect, they even introduce new defects. But after installing CCSM, and playing around with what’s available, I must confess I like them and I think they add a valuable layer of communication to the user: windows that aren’t responding fading to dark (see pic), new windows sizing and fading into existence, minimized windows flying to their position on the Window List applet (taskbar), desktop panning, zooming anywhere, live thumbnails for every application, etc. I do wish I could enable the one feature of wobbly windows to act as the system bell, and have the window wobble as a visible bell. I really liked that. But I can’t enable that single wobbly windows option without disabling something else I’m currently using. Also, the workspace switcher seems to be broken. I can’t drag windows from workspace to workspace within it.

not responding

Certainly, I agree the preferences menu could be more sensibly organized, but I think the Appearance capplet is great. A reference to the Appearance capplet within the mouse capplet is all that’s needed to improve the discoverability of the mouse cursor icons.

Two About menu items under the main System menu (one for GNOME and one for Ubuntu): they don’t bother me. There’s only four other items on that menu, and these are both important when users are reporting bugs for checking which versions of software they are running. The “Help” launchers are something I never use, and the first things I remove. But for novice users, maybe they’re helpful. I really wonder how often people read the included documentation, though….

Certain types of behavior should be unacceptable where user experience is concerned. It is unacceptable in my opinion for a Linux Distribution to knowingly ship broken Artwork with the distribution.

He’s clearly never used windows. 🙂 In all seriousness, if usable features had to wait on perfect aesthetics before mass deployment, Apple might be the only company releasing anything. In the Open Source world, users are depended upon for everything, including the aesthetics. If the software never gets out, it doesn’t get the attention it needs, bug reports aren’t filed as soon, and relatively stable (and usable) software is dis-serviced by not being allowed to gather the feedback it should. The article itself is a case in point. It’s also worth mentioning that Ubuntu Gutsy is not an LTS release. The Hardy Heron release will be, and that makes it especially important for Gutsy to get as many new features into users’ hands as possible. Linux distributions depend on the community and can’t evolve as effectively behind closed doors.

Hmmm… I suppose this post turned into more of a response to the post on Architect Fantasy (not my original intention), which I found interesting but didn’t agree with everything (which is totally fine).

Wasn’t in my plans, but…

So I haven’t been working too much on PhotoFile, like wanted to, but I haven’t really been unproductive, either. Giving in to my friend’s incessant nagging to play (and thus, set up) UFO2000 on my computer, I updated the Ubuntu set-up guide I wrote on the forums after doing it again with the latest version on both my laptop (Gutsy beta) and my desktop (Feisty). I’ve played a couple games, so far, and they’ve been fun. But it still doesn’t work flawlessly. On my laptop, with default Gutsy settings, ALSA is used to access the audio. UFO2K uses the Allegro game programming library, and it accurately detects and plays sound on my laptop. However, there is a huge memory leak somewhere when running on my laptop (known issue, I think). Luckily, the game is saved on the server, so if you crash, you can log back in and you have the option of resuming the game. Cool.

On the Desktop side of things, there’s no memory leak, but it doesn’t work with the PulseAudio sound server. This irritated me last time I was looking at UFO2K and put me off of it, but this time, I was determined to figure out what the problem was, exactly. First of all, the problem can be resolved by killing the pulseaudio (pulseaudio -k) daemon before launching the game. But that may mess with your existing applications a little and it’s annoying. Good news: I think I found what the problem was. Bad news: I’m not sure when or if it will be fixed, but the developers are at least aware of it and started talking about it.

I don’t normally do much low-level stuff, so I actually learned quite a bit from the debugging. Unfortunately, I don’t have massive amounts of code to show for my efforts, but I’ve learned a lot and a potentially important bug has been well-documented. So it was well worth it. These are some of the things I did when debugging this problem:

  • Communicated with both PulseAudio and Allegro developers on bug trackers, mailing lists, and IRC.
  • Built the Allegro source and used my own custom (debug-enabled) version without disrupting the installed stable version.
  • Attempted to debug using ‘gdb’ mode in emacs, but I was never able to jump into the ALSA specific functions. I think the debugger wasn’t able to trace the threads as they were mapped with pre-processor statements according to the sound driver. I was able to switch to the thread, but the debugger couldn’t find the associated source, which made stepping rather pointless.
  • Eventually giving up on the fancy way, (but content I had learned something) I resorted to good ‘ol printf statements, and was eventually able to find the values (I think) are causing the problems. (Allegro uses unsigned sample formats, and PulseAudio doesn’t support those.)

I must say, using gdb in emacs is much easier than on the command line (but then, maybe ddd or another graphical debugger is nicer still, depending on how often you debug things). Okay, directing my attention back over to PhotoFile…. Or maybe upgrading WordPress…. or maybe…. 🙂

Hacking the Printer

Look into my eyes, Brother (MFC420-CN)… repeat after me, “I still have ink left.”

This ink never runs out!

This ink never runs out!

I have a Brother MFC420-CN (multifunction printer) and it religiously cleans its heads as long as it is plugged in. This combined with the facts that it will not print unless it has ink and the cost of ink make for a pretty nice business plan for Brother. This is common practice with most budget bubble jets, I suppose, since I’m sure they lose some money on the ~$100 device. Even if you want to print in black, and you’re magenta is empty, it will refuse to print. I’m a little conflicted about how I feel about this, because Brother does provide open support for Linux, which is a good thing. Anyway, the solution is clear: trick the vile thing into thinking it has ink. In fact, all the times I’ve received the “replace ink” message, there has still been a little ink in the cartridge…. and after tricking it, you can still print in that colour (until it actually runs out, of course). Googling resulted in a post on a forum somewhere about applying a strip of black tape to the ink cartridge, but wasn’t very clear. After some trial and error, I hope this picture clarifies things. I guess the tape blocks light of some sort, which it uses to monitor ink level.

(Wasn’t really sure how to classify this post… don’t have a how-to category. I should upgrade to WP 2.3 and use tags….)

Unexpected Revival

Due to various other things, (some within my control, others not), I haven’t worked much on PhotoFile since I last posted. Some of these things continue to require some of my attention. I had planned to have a minimally usable version out by the end of September, but now I’m not sure that will happen.

One of these things has been my laptop. What’s that, you say? I thought you said your laptop was dead….? I did. Or, at least, I thought I knew what the problem was but I wasn’t able to open the laptop to take a peek. A couple days ago, my dad showed up and convinced me to call around about getting someone to fix it. After hearing that there was an $85 assessment fee, as well as $85/hr rate, I decided it was time to attempt to open it up again. We got to the same stage, which was removing all visible screws and it was still refusing to reveal it’s secrets. Lots of poking around resulting in lots of failure continued. Note: It’s fun prying off laptop keyboard keys! 😀 The first one was a little unnerving, because I wasn’t sure if it would break. And they’re like little puzzles to put back together!

Feeling discouraged, I decided to take a break. Now here’s where something truly magical happened. Seriously, I hope you’re sitting down for this: I focused my mind and used the vast powers of the Internet. I think it was maybe the first Google result for “taking apart Toshiba laptops” that led to me finding a picture and a short description for disassembling a different Toshiba laptop. Luckily, this was pretty much the same as mine. Soon, I was excitedly prying off a plastic strip above the keyboard, which revealed more screws! Jackpot!

triumphant!

So I’m happy to say, the problem was something that was loose and connected to the hard drive. After snapping it back in proper-like, everything seems to be working! The combo drive was also loose (caused by my last attempt). I’ve since done a fresh install/upgrade to Ubuntu Gutsy. Unfortunately, I’m missing my customized Xorg configuration file, so I can’t use the nVidia binary drivers quite yet. I forget what options I had to enable…. But the fact that I have a laptop again is pretty sweet! I was kind of lazy about re-assembling it, though. I wonder where these 7 screws are supposed to be….

nvidia and Compiz on Gutsy

With this recent revival of one in the family, I had to try out the latest 3D whiz-bang (compiz-fusion) on my laptop. I have an nVidia 16MB GeForce4 420 Go on my laptop. After lots of troubleshooting, it looks like the new drivers resolve all the issues I was having (no window borders, black windows, etc). Only one problem, those new universal drivers do not support my chipset. I’m guessing that means I will no longer get any proprietary driver updates… great. I might have to look at the nouveau project for any kind of 3d performance/stability in the future. Would be nice if nVidia decided to follow in AMD’s footsteps and open up their specs.

Getting Tabs Closed

You know you’re trying to do too many things at once when…

ZOMG that’s a lot of tabs!

Managing browser tabs needs its own methodology, like GTD: Every week, go through your open tabs and close as many as you can. I don’t actually need to read that article. Not interested in this, any more. etc.

A bit better…  :-/

Clearly, I fail. >.< Restoring this session of 20 tabs brings Firefox up to 80MB, right away. Most of my current tabs are about different programming things: various references, tutorials, articles… as well as a tab to feedburner – for some reason, I’m addicted to looking at my blog’s meagre statistics. It’s fun!

Side Note: One thing that’s pretty cool, that can help minimize the tabs open for Python reference, is the Python sidebar. If there was only a pyGTK section in the sidebar….

When I’ve had tabs sitting open with no activity… I copy the link into a “would-be-nice” Tomboy note and close the tab. This helps a little… but I still have generally too many tabs open to help with the task at hand – and I prefer tabs to new windows (opening new windows is painfully slow on my setup, not sure why). If you have a similar problem of many tabs open at one time, I highly recommend the Tab Groups Firefox extension. Take a look:

Tab Groups Firefox Extension

Wow. The extension is still super early (I think it’s already caused FF to crash once), it takes a little while to sort the tabs when restoring a session, and you can’t move the Tab Groups around… but I’m definitely going to continue using it. It allows for much easier navigation of your current session, rather than scroll-click-is-this-what-i’m-looking-for-if-not-repeat. And for some reason, it even feels snappier! 😮 So this helps you Get Tabs Organized, which helps GTC, which helps GTD. Yay. 🙂