Hacklet: Remove Gwibber tray icon

Like Pidgin, Gwibber offers you the option to “minimize to tray” when you close the Gwibber window, it also has an option to not show a tray icon.  However, I’d imagine to keep the window from being lost to the user, you can’t do both.  If you make Gwibber minimize to the system tray, it will automatically turn on the tray icon.

Ubuntu 9.04 (Jaunty) introduced the new Indicator Applet, which lets applications that need to show indications/notifications to a user congregate all in one place.  Gwibber is one such application that makes use of the Indicator Applet, but the sanity check I mentioned above means you still get tray clutter.  Here is a quick, simple hack you can make to the Gwibber code to override this behavior.

1. sudo gedit /usr/share/pyshared/gwibber/client.py (If you installed Gwibber from the repos, if you’ve checked out the source it’s under $src/gwibber/client.py)

2. Locate the on_window_close method.

3. Comment out the line: self.preferences["show_tray_icon"] = True (Put a # at the beginning of the line)

4. Save and restart Gwibber!  Now you can minimize to tray without showing a tray icon.  Use the Gwibber entry in the Indicator Applet menu to bring the window back up.

client.py changes

client.py changes

Tagged as: , ,

Leave a Response