Should a single click open the Applications window?

1 view
Skip to first unread message

David Phillip Oster

unread,
May 1, 2008, 1:52:55 PM5/1/08
to AppMenuBoy
I tried adding the following at the end of AppMenu.m

// Single click on the app's Dock icon, when app is already running,
should
// do SOMETHING. Make it open the Applications folder.
- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication
hasVisibleWindows:(BOOL)flag {
NSString *openAppS =
@"tell application \"Finder\"\n"
"activate\n"
"open POSIX file \"/Applications\"\n"
"end tell\n";
NSAppleScript *openAppWin = [[[NSAppleScript alloc]
initWithSource:openAppS] autorelease];
NSDictionary *errorInfo = nil;
[openAppWin executeAndReturnError:&errorInfo];
return NO;
}

It changes the behavior of AppMenuBoy, so if you just single click on
AppMenuBoy it opens the Applications window in Finder.

But, I'm not checking this code in, because I didn't like it: With
this in, it is not easy to make AppMenuBoy the fornt application, so
you can look at its menu bar, where there is another copy of the
hierarchical applications menu, this time with icons.

I'm putting the source code here, so you can use it in your copy of
AppMenuBoy, if you like.
-- David Phillip Oster

PWSoftwareProductions

unread,
May 4, 2008, 1:48:21 PM5/4/08
to AppMenuBoy
Better replace that ugly applescript with this:

[[NSWorkspace sharedWorkspace] openFile: @"/Applications"];

David Phillip Oster

unread,
May 5, 2008, 4:49:05 PM5/5/08
to AppMenuBoy

On May 4, 10:48 am, PWSoftwareProductions
<i...@pwsoftwareproductions.nl> wrote:
> Better replace that ugly applescript with this:
>
> [[NSWorkspace sharedWorkspace] openFile: @"/Applications"];

Thank you. You are absolutely right.
Reply all
Reply to author
Forward
0 new messages