Oct
26
2005

preserving my sanity

I’m a big fan of Apple’s Safari browser. (I like Firefox, too, but I find that Safari tends to be a bit speedier and more responsive than Firefox.) I’m also a HUGE fan of tabbed browsing, to the point where, after a few days’ browsing, I might have a couple browser windows open with several tabs open in each of articles to read or bookmark or blog. It’s a dangerous thing to have so many tabs open, though: If the application crashes or accidentally closes, I’ll lose everything. (Sure, I can probably retrace my steps through the History window, but it’s usually more trouble than it’s worth.)

What really threatens my sanity is when I accidentally close my browser window, hitting cmd-Q instead of cmd-W — something that’s surprisingly easy to do because the Q and W keys are right next to each other. If I make that bonehead move while using Firefox, the browser will give me a “Do you really want to close all those tabs, dummy?” warning before it closes out. But Safari will just quietly, obediently close, not pausing to ask whether I really wanted to close the 20 open tabs I’ve been collecting for the past three days.

After a bit of surfing this morning, I’ve found a temporary fix: Re-map the key command to quit Safari from cmd-Q to cmd-option-Q, so there’s no chance I’ll accidentally close my browser. Simple solution, but surprisingly complicated to do:

  1. Install Apple’s Developer Tools. If you can’t find your original OS X CDs, you can download XCode from the Apple Web site (it’s a long download, to the tune of a 700 MB disk image).
  2. In the Applications folder, right-click on the Safari icon and choose “Show Package Contents.”
  3. Open the Resources/English.lproj folder and find the MainMenu.nib file. Open that file with Interface Builder, which comes with the XCode developer tools.
  4. In Interface Builder, click on “Safari” and then double-click on the “cmd-Q” icon to the right of the “Quit Safari” menu icon so that a white border appears around the icon. Press option-Q to re-map the key command.
  5. Save your work, and quit out of Interface Builder. To activate the new key command, restart Safari.

All that said, going through all this trouble isn’t the ideal solution to the problem. The ideal would be if Safari would add the same “Do you really want to do this?” warning that Firefox has. I shouldn’t have to hack my browser to get it.

Post a comment

As a spam-control measure, your comment may require my approval before it will appear on the entry. Thanks for waiting. To avoid the moderation delay, consider filling in your e-mail address. It won't appear on the site, but I use it to whitelist frequent commenters so their comments appear automatically.


The following HTML tags are permitted (if you want to use them):
p, br, a href, b, strong, u, i, em, ol, ul, li, cite, blockquote

TrackBack

TrackBack URL for this entry: http://www.morethanthis.net/mtadmin/mt-tb.cgi/1232

interface niceties: I've noticed an interesting bug with Google Calendar when entering new events. When I create a new event, Google Calendar tries to take what I've typed and turn it into a new calendar item. Usually, it's pretty smart. However, when... read more »

Posted by rants and ramblings on January 28, 2008 2:21 AM